我有三个选择菜单。并且第一个selectonemenu有两个值。关于改变第一选择权的价值。定义了第二或第三选择菜单逻辑的渲染。 但是ajax不起作用。
下面是代码
<f:facet name="output">
<h:outputText value="Global" rendered="#{bean.type eq 'G'}"></h:outputText>
<h:outputText value="Country" rendered="#{bean.type eq 'C'}"></h:outputText>
</f:facet>
<f:facet name="input">
<h:selectOneMenu id="listType" value="#{bean.type}" disabled="#{maintainIdentifierClass.id ne null}" >
<f:selectItems value="#{bean.listType}"></f:selectItems>
<p:ajax event="change" update="rest_edit_local, rest_edit_global"/>
</h:selectOneMenu>
<p:message id="clusterCodeEdit" for="listType" display="icon"></p:message>
</f:facet>
</p:cellEditor>
<p:cellEditor id="rest">
<f:facet name="output" id="rest1">
<h:outputText value="#{bean.parent}"></h:outputText>
</f:facet>
<p:cellEditor>
<f:facet id="restrict" name="input">
<p:selectOneMenu id="rest_edit_global"
styleclass="dropdown-class"
value="#{bean.parent}"
rendered="#{bean.type eq 'G'}" required="true"
requiredMessage="#{msg['Dims.Mandatory']}" style="width:100%"
effect="fold"
editable="true" >
<f:selectItems value="#{maintainIdentifierClassBean.globalList}"></f:selectItems>
<p:ajax event="change" update="resEdit_global">
</p:ajax>
</p:selectOneMenu>
<p:message id="resEdit_global" for="rest_edit_global" display="icon"></p:message>
<h:selectOneMenu id="rest_edit_local" value="#{bean.parentBo}"
rendered="#{bean.type ne 'G'}" required="true"
requiredMessage="#{msg['Dims.Mandatory']}" style="width:100%" >
<f:selectItems value="#{bean.globalList}"></f:selectItems>
<p:ajax event="change" update="resEdit_local">
</p:ajax>
</h:selectOneMenu>
<p:message id="resEdit_local" for="rest_edit_local" display="icon"></p:message>
</f:facet>
</p:cellEditor>