I'm having some difficulty getting an a4j action trigger a re-evaluation of the
value in a h:selectOneMenu using s:selectItems.
Is there anything wrong with the following?
| <h:form id="mainForm">
| <f:facet name="afterInvalidField">
| <h:panelGroup><br/><s:message/></h:panelGroup>
| </f:facet>
| <f:facet name="aroundInvalidField">
| <s:span styleClass="error"/>
| </f:facet>
| <s:validateAll>
| <h:panelGrid columns="2" columnClasses="object,value">
| <h:outputText value="Destination: "/>
| <h:panelGroup>
| <h:selectOneMenu
value="#{pressArticle.destination}" >
| <s:selectItems
value="#{destinations.resultList}"
| var="destination"
| label="#{destination.name}"
| noSelectionLabel="Please
select"/>
| <s:convertEntity/>
| <a4j:support ajaxSingle="true"
event="onchange" reRender="mainForm,mainForm:dothis"
actionListener="#{pressArticleManager.setDestination}"/>
| </h:selectOneMenu>
| <h:commandButton styleClass="button"
style="margin:0px 0px 0px 5px; padding: 0px"
actionListener="#{pressArticleManager.setDestination}" value="Set destination"/>
| </h:panelGroup>
| <h:outputText value="Region: "/>
| <h:panelGroup>
| <s:decorate id="dothis">
| <h:selectOneMenu
value="#{pressArticle.region}" >
| <s:selectItems
value="#{regions.resultList}"
| var="region"
| label="#{region.name}"
|
noSelectionLabel="Please select"/>
| <s:convertEntity/>
| </h:selectOneMenu>
| </s:decorate>
| <h:outputText value="Region:
#{pressArticle.region.name}" rendered="#{pressArticle.region!=null}"/>
| </h:panelGroup>
| </h:panelGrid>
| </s:validateAll>
| </h:form>
The a4j tag does correctly call my backing mething, which logs the change to
pressArticle.region, but the drop down value does not change. Subsequently
calling a standard JSF action back to the same view-id does change the drop
down value..
cheers
p
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4075282#4075282
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4075282
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user