commandbutton inside modalPanel not calling setter method
fluxor Apr 19, 2011 4:07 PMI am having issues with the following code.
modal panel has one text box which has suggestion box attached to it. There is an add button which adds the value to a list in backing bean. All this code is inside a jsp which is included in another jsp surrounded by a4j:form.
When the add button is clicked it won't call the setter method for suggestionBoxFacilityName. all this code works as expected outside a modalpanel. Also it starts calling the setter method when i add 'onclick="Richfaces.hideModalPanel('facilitySelectionModal')"' to the add button.
Can anyone help me with this issue? I am using richfaces 3.3.3 final version.
<rich:modalPanel height="400" id="facilitySelectionModal" width="600" autosized="true" >
<f:facet name="header">
<h:outputText id="fsHeader" value="#{msgs.msg_selectMultipleFacilities}" />
</f:facet>
<h:panelGrid cellpadding="0" cellspacing="0" id="fsErrorMessage" width="100%">
<h:outputText styleClass="standard_error_text" value="#{SEARCH.messages}" />
</h:panelGrid>
<h:panelGrid id="fsMainPanel" rowClasses="top, top, bottom" style="height: 360px;" width="100%" >
<t:panelGrid align="left" columns="4" style="padding-bottom: 5px;">
<h:outputLabel for="facilityInput" styleClass="standard_text" value="#{msgs.label_facilityName}" />
<a4j:region>
<h:inputText id="facilityInput" binding="#{SEARCH.testValue}" style="width: 300px;" styleClass="standard_input" value="#{SEARCH.suggestionBoxFacilityName}"/>
<rich:suggestionbox ajaxSingle="true" border="1" height="100" id="facilitySuggestion" for="facilityInput" minChars="1" selfRendered="true"
shadowOpacity="4" shadowDepth="4" suggestionAction="#{SEARCH.autoComplete}" var="result" width="300" fetchValue="#{result.orgName}">
<rich:column>
<h:outputText id="facilityNmTxt" value="#{result.orgName}" />
</rich:column>
</rich:suggestionbox>
<rich:spacer width="5" />
<a4j:commandButton action="#{SEARCH.addFacilitySelection}" styleClass="standard_button_medium" value="#{msgs.button_add2}"
reRender="fsMainPanel, fsErrorMessage" />
</a4j:region>
</t:panelGrid>
<t:panelGrid align="center" columns="2" style="padding-bottom: 5px;">
<a4j:commandButton action="#{SEARCH.clearFacilitySelection}" onclick="Richfaces.hideModalPanel('facilitySelectionModal')" reRender="distributorExecutionSearchForm, facilitySelectionModal" styleClass="standard_button_large" value="#{msgs.button_clearSel}" />
<a4j:commandButton action="#{SEARCH.closeModal}" onclick="Richfaces.hideModalPanel('facilitySelectionModal')" reRender="distributorExecutionSearchForm, facilitySelectionModal" styleClass="standard_button_medium" value="#{msgs.button_ok}" />
</t:panelGrid>
</h:panelGrid>
</rich:modalPanel>
-
modalPanel.jsp.zip 919 bytes