Rerender attribute on disabled field problem
igal Oct 19, 2010 4:21 AMI've an a4j:form that contains two h:selectOneListBox that depend on each other. the second is disabled until we select an item from the first one. in some point we choose an item from the first one and rerender the second one with enable=true and then we submit the form values by clicking the save button. the problem is that the value of the second list box isn't being submitted!? is there a problem with the reRender property that doesn't notify the other component that it should be submitted also after the rerendering?
code sample:
<a4j:form id="#{formId}" ajaxSubmit="true">
<h:outputText value="#{msg.CITY_ORIGIN}" />
<h:selectOneListbox id="citiesOrigListbox" size="1"
value="#{profileController.profileBean.origCity}">
<f:selectItem itemDisabled="true" />
<f:selectItems value="#{profileController.citiesForOrigin}" />
<a4j:support event="onchange" reRender=" airportOrigListBox, countryDest,citiesDestListbox" ajaxSingle="true" limitToList="true">
<f:param name="countryIdOrig" value="#{profileController.profileBean.origCountry.id}"/>
<f:param name="countryIdDest" value="#{profileController.profileBean.destCountry.id}"/>
<f:param name="cityDest" value="#{profileController.profileBean.destCity}"/>
<f:param name="cityOrig" value="#{profileController.profileBean.origCity}"/>
</a4j:support>
</h:selectOneListbox>
<h:outputText value="#{msg.ORIGIN} #{profileController.portOriginString}" />
<h:selectOneListbox id="airportOrigListBox" size="1"
value="#{profileController.profileBean.profile.originCargoPoint}"
converter="cargoPointIdConverter"
disabled="#{profileController.cargoPointsDestDisable}">
<f:selectItem itemDisabled="true" />
<f:selectItems value="#{profileController.cargoPointsForOrigin}" />
</h:selectOneListbox>
<a4j:commandButton value="#{msg.SAVE}" alt="#{msg.SAVE}"
reRender="secondListView"
action="#{profileController.saveProfile}" >
</a4j:commandButton>
</a4j:form>
Any ideas whats going on ?