[jboss-user] [JBoss Seam] - Facelets custom tags for input controls
gduq
do-not-reply at jboss.com
Sun Feb 3 13:45:22 EST 2008
In my view pages the input controls look like this:
| <div class="entry">
| <div class="label"><h:outputLabel for="DateofBirth">Date of Birth:</h:outputLabel></div>
| <div class="input">
| <s:decorate id="DateofBirthDecorator">
| <rich:calendar enableManualInput="true" disabled="#{!HomeFoneNameChange.isNewForm()}" id="DateofBirth" value="#{HomeFoneNameChange.dateofBirth}"
| required="true">
| <a:support event="onblur" reRender="DateofBirthDecorator" />
| </h:inputText>
| </s:decorate></div>
| </div>
|
| <div class="entry">
| <div class="label"><h:outputLabel for="Sex">Sex:</h:outputLabel></div>
| <div class="input"><s:decorate id="SexDecorator">
| <h:inputText size="50" disabled="#{!HomeFoneNameChange.isNewForm()}" id="Sex" value="#{HomeFoneNameChange.sex}"
| required="true">
| <a:support event="onblur" reRender="SexDecorator" />
| </h:inputText>
| </s:decorate></div>
| </div>
|
I feel like there should be a way to cut down on the amount of repeated text using facelets but I'm not sure of the best way to do it.
I'd like to be able to do this:
<my:calendar lable="Date of Birth" bean="HomeFoneNameChange" property="dateOfBirth" />
| <my:inputText lable="Sex:" bean="HomeFoneNameChange" property="sex" />
|
or even better, specify the bean once per page and have:
<my:calendar lable="Date of Birth" property="dateOfBirth" />
| <my:inputText lable="Sex:" property="sex" />
|
is this possible? or if not how close to this can I get?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125876#4125876
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125876
More information about the jboss-user
mailing list