[seam-issues] [JBoss JIRA] Updated: (JBSEAM-4776) Add a prependId attribute on s:decorate
Anthony O. (JIRA)
jira-events at lists.jboss.org
Mon Feb 7 10:58:39 EST 2011
[ https://issues.jboss.org/browse/JBSEAM-4776?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anthony O. updated JBSEAM-4776:
-------------------------------
Description:
(Cloned from JBSEAM-2652 because it is a feature requirement)
Given the following code:
{noformat}
<h:form id="login" prependId="false">
<s:validateAll>
<f:facet name="afterInvalidField">
<s:label styleClass="error">
<s:message/>
</s:label>
</f:facet>
<div class="labelinputcombo ilcblock">
<h:outputLabel for="username">User name:</h:outputLabel>
<s:decorate>
<h:inputText id="username" value="#{registrationService.newUser.userName}" required="true"/>
</s:decorate>
</div>
</s:validateAll>
<div>
<h:commandButton value="Register" action="#{registrationService.registerUser}"/>
</div>
</h:form>
{noformat}
One would expect that none of the generated <input> elements would have prepended IDs, since the h:form has prependId="false". However, since s:decorate insists on inserting a superfluous <div> with a generated ID around the <input> elements it surrounds, those <input> elements end up having prepended IDs from that <div>. The relevant generated HTML:
{noformat}
<div class="labelinputcombo ilcblock">
<label for="j_id31:username">User name:</label><div id="j_id31"><input id="j_id31:username" type="text" name="j_id31:username" /></div>
</div>
{noformat}
I did not ask for either the <div> or it's ID (<div id="j_id31">), or its insertion into my <input> element's ID (id="j_id31:username").
Is it possible to add a {{prependId}} attribute on {{s:decorate}} in order to control that ? Or perhaps {{s:decorate}} should takes care of its {{h:form}} {{prependId}} attribute value ?
was:
(Cloned from JBSEAM-2652 because it is a feature requirement)
Given the following code:
<h:form id="login" prependId="false">
<s:validateAll>
<f:facet name="afterInvalidField">
<s:label styleClass="error">
<s:message/>
</s:label>
</f:facet>
<div class="labelinputcombo ilcblock">
<h:outputLabel for="username">User name:</h:outputLabel>
<s:decorate>
<h:inputText id="username" value="#{registrationService.newUser.userName}" required="true"/>
</s:decorate>
</div>
</s:validateAll>
<div>
<h:commandButton value="Register" action="#{registrationService.registerUser}"/>
</div>
</h:form>
One would expect that none of the generated <input> elements would have prepended IDs, since the h:form has prependId="false". However, since s:decorate insists on inserting a superfluous <div> with a generated ID around the <input> elements it surrounds, those <input> elements end up having prepended IDs from that <div>. The relevant generated HTML:
<div class="labelinputcombo ilcblock">
<label for="j_id31:username">User name:</label><div id="j_id31"><input id="j_id31:username" type="text" name="j_id31:username" /></div>
</div>
I did not ask for either the <div> or it's ID (<div id="j_id31">), or its insertion into my <input> element's ID (id="j_id31:username").
Is it possible to add a {{prependId}} attribute on {{s:decorate}} in order to control that ? Or perhaps {{s:decorate}} should takes care of its {{h:form}} {{prependId}} attribute value ?
> Add a prependId attribute on s:decorate
> ---------------------------------------
>
> Key: JBSEAM-4776
> URL: https://issues.jboss.org/browse/JBSEAM-4776
> Project: Seam
> Issue Type: Enhancement
> Components: JSF Controls
> Affects Versions: 2.2.0.GA
> Reporter: Anthony O.
>
> (Cloned from JBSEAM-2652 because it is a feature requirement)
> Given the following code:
> {noformat}
> <h:form id="login" prependId="false">
> <s:validateAll>
> <f:facet name="afterInvalidField">
> <s:label styleClass="error">
> <s:message/>
> </s:label>
> </f:facet>
> <div class="labelinputcombo ilcblock">
> <h:outputLabel for="username">User name:</h:outputLabel>
> <s:decorate>
> <h:inputText id="username" value="#{registrationService.newUser.userName}" required="true"/>
> </s:decorate>
> </div>
> </s:validateAll>
> <div>
> <h:commandButton value="Register" action="#{registrationService.registerUser}"/>
> </div>
> </h:form>
> {noformat}
> One would expect that none of the generated <input> elements would have prepended IDs, since the h:form has prependId="false". However, since s:decorate insists on inserting a superfluous <div> with a generated ID around the <input> elements it surrounds, those <input> elements end up having prepended IDs from that <div>. The relevant generated HTML:
> {noformat}
> <div class="labelinputcombo ilcblock">
> <label for="j_id31:username">User name:</label><div id="j_id31"><input id="j_id31:username" type="text" name="j_id31:username" /></div>
> </div>
> {noformat}
> I did not ask for either the <div> or it's ID (<div id="j_id31">), or its insertion into my <input> element's ID (id="j_id31:username").
> Is it possible to add a {{prependId}} attribute on {{s:decorate}} in order to control that ? Or perhaps {{s:decorate}} should takes care of its {{h:form}} {{prependId}} attribute value ?
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list