I created a JSF composite component for the h: inputBox extension
<p class="label clear">
<label for="#{cc.attrs.id}" class="">
#{cc.attrs.label}:
</label>
</p>
<p>
<h:inputText id="#{cc.attrs.id}" value="#{cc.attrs.value}"
size="#{cc.attrs.size}" />
<ui:fragment rendered="#{cc.attrs.optional eq 'optional'}">
<span class="optional">Optional</span>
</ui:fragment>
</p>
To use this component.
<my:inputText id="firstName" label="First Name" value="#{nameTO.firstName}"/>
When this component is displayed in the browser, the identifier is in the format "firstName: firstName".
<input type="text" value="" name="firstName:firstName" id="firstName:firstName" gtbfieldid="3028">
Is this the standard JSF 2.0 template naming convention? I did not get this with JSF 1.2 Facelets templates. Is there a way to generate an identifier like "firstName" instead of "firstName: firstName"
source
share