[jboss-user] [JBoss Seam] - ui example: How to add ajax support for selectItems
jneubert
do-not-reply at jboss.com
Fri Jan 18 06:14:57 EST 2008
I have a use case very similar to the continent/country fields in the ui example, and try to add ajax: The selectItems list for countries should be updated and rerendered when the user selects a continent.
I tried the straightforward approach:
| <s:decorate template="decorateField.xhtml">
| <ui:define name="label">Continent of Birth</ui:define>
| <h:selectOneMenu value="#{personHome.instance.continent}" required="true" id="continent">
| <s:selectItems value="#{continents.resultList}" var="continent" label="#{continent.name}" noSelectionLabel="Please Select..."/>
| <s:convertEntity />
| <a:support event="onchange" reRender="countrySelect" />
| </h:selectOneMenu>
| </s:decorate>
|
| <s:decorate template="decorateField.xhtml">
| <ui:define name="label">Country of Birth</ui:define>
| <h:selectOneRadio id="countrySelect" value="#{personHome.instance.country}" required="true" disabled="#{empty person.continent}">
| <s:selectItems value="#{personHome.instance.continent.countries}" var="country" label="#{country.name} (#{country.continent.name})" noSelectionLabel="Please Select..." hideNoSelectionLabel="true"/>
| <s:convertEntity />
| </h:selectOneRadio>
| </s:decorate>
|
(and a lot more), but nothing worked, the country selection is not rerendered. Can anybody help, please?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121245#4121245
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121245
More information about the jboss-user
mailing list