Not able to set the changed value from Modalpanel to the corresponding bean.
sandeepgowda Sep 15, 2010 11:16 AMHi,
Not able to set the changed value from Modalpanel to the corresponding bean.
UseCase: when i click the button,a modalpanel comes up having to selectOnemenu, where user select any one value(Individual/Other) and on click of ok, selected value has to be mapped to corresponding property of the bean.
Below is the code, please help me or any alternative.
<f:view>
<h:form>
<h:panelGrid columns="2" id="selectionPanel">
<a4j:commandButton value="Customer Registration Page"
style="text-align:centre;width:200px">
<rich:componentControl for="detailsMp" operation="show"
event="onclick" />
</a4j:commandButton>
<a4j:commandButton value="Search"
style="text-align:centre;width:200px">
</a4j:commandButton>
</h:panelGrid>
<rich:modalPanel id="detailsMp" width="400" height="120" zindex="2000">
<f:facet name="header">Details</f:facet>
<a4j:outputPanel id="modalContent" layout="inline">
<h:panelGrid columns="2">
<h:outputLabel
style="font-size:12px;font-family:Times New Roman,serif;width:100px;font-weight: bold;">Preferred Type
</h:outputLabel>
<h:selectOneMenu id="strPreferredType" style="width:200px;"
value="#{HomePageBean.strPreferredType}">
<f:selectItem itemLabel="Individual" itemValue="Individual" />
<f:selectItem itemLabel="Other" itemValue="Other" />
</h:selectOneMenu>
<a4j:commandButton value="ok" style="text-align:centre;width:200px"
action="#{HomePageBean.onSelectPrefferedType}"
oncomplete="javascript:Richfaces.hideModalPanel('detailsMp')">
</a4j:commandButton>
<a4j:commandButton value="cancel"
style="text-align:centre;width:200px"
onclick="javascript:Richfaces.hideModalPanel('detailsMp')" />
</h:panelGrid>
</a4j:outputPanel>
</rich:modalPanel>
</h:form>
</f:view>
regards