以下是我为下拉列表添加的新代码,它调用一个方法并更新文本字段:
<span class="label">
<h:outputLabel for="extIdProvider" value="#{Beanclass.label}"/>
</span>
<span class="formw">
<h:selectOneMenu styleClass="dropDown" id="idprovider" value="#{Bean.idprovider}" required="true" onchange="this.form.submit();" valueChangeListener="#{Bean.idProviderChanged}">
<f:selectItems value="#{Bean.IdProvidersList}"/>
<f:attribute name="fieldRef" value="extIdProvider" />
</h:selectOneMenu>
</span>
下面是按钮代码:
<span class="formw">
<br><br>
<h:commandButton styleClass="commandButton" value="#{Bean class.editcitizendetails_button_save}" action="#{Bean.editCitizen}"/>
<h:commandButton styleClass="commandButton" value="#{Bean class.ebutton_cancel}" immediate="true" action="cancel" actionListener="#{Bean.cancelAction}"/>
<br><br>
</span>
单击“保存”按钮没有任何反应
答案 0 :(得分:0)
这可能是由于两个h:commandButtons格式相同而引起的。 检查一下:Two h:commandButton in the same h:form: one works, the other doesn't