这是我的代码<h:selectOneMenu>
。
在支持 bean execdirectorRC="XXXvalue" 中分配值后,我试图从支持 bean 更新它的值。在这里,executivedirectorslist
确实有一个列表值。
这是表格中的代码
<h:form id="ipdpform">
<h:selectOneMenu id="exedirectors" value="#{Bean.execdirectorRC}">
<f:selectItems value="#{Bean.executivedirectorslist}"
var="s" itemLabel="#{s.label}" itemValue="#{s.value}" />
<p:ajax listener="#{Bean.getDirectReporters}"
update="rpt2 :growl :error" execute="@this"
partialSubmit="true" />
<f:param name="rpt1" value="rpt1" />
</h:selectOneMenu>
</h:form >
这是我试图从支持 bean 更新值的代码
RequestContext context = RequestContext.getCurrentInstance();
execdirectorRC = "XXX,Name";
context.update("ipdpform:exedirectors");
我的问题是值“XXX,Name”没有得到更新,<h:selectOneMenu>.
并且值已经在Bean.executivedirectorslist
.How 可以从支持 bean 更新它?