当前位置: 动力学知识库 > 问答 > 编程问答 >

java - Back bean method not called while using single form for two h:selectonemenus and command button

问题描述:

my back bean method is not called when i execute the following code, hope i will get the solution.

 <rich:panel style="width: 750px" header="Manage Content">

<h:form>

<h:outputText value="Select Division's Id : "/>

<h:selectOneMenu id="divId" value="#{pageDataBean.selectedDivId}" style="width: 150px" >

<f:selectItems value="#{pageServiceBean.retriveDivId}" />

</h:selectOneMenu>

<h:outputText value="Select Content Type : "/>

<h:selectOneMenu id="firstDropDown" value="#{pageDataBean.selectedBlockType}" style="width: 150px">

<f:selectItems value="#{pageServiceBean.blockType}" />

<a4j:support event="onchange" reRender="secondDropDown" ajaxSingle="true" />

</h:selectOneMenu>

<h:outputText value="Select Content : "/>

<h:selectOneMenu id="secondDropDown" value="#{pageDataBean.selectedBlock}" style="width: 150px">

<f:selectItems value="#{pageServiceBean.blockName}" />

</h:selectOneMenu>

<h:commandButton value="Add" action="#{pageServiceBean.addContentToDiv}" style="width: 75px">

</h:commandButton>

</h:form>

</rich:panel>

分享给朋友:
您可能感兴趣的文章:
随机阅读: