[英]How to properly update (render) <h:selectManyListbox…/>?
What is wrong whit this code? 这段代码有什么问题? I can not update the idOfForm (selectManyListbox )?
我无法更新idOfForm(selectManyListbox)?
<h:form id="idOfForm">
<h:selectManyListbox id="userListId" size="10" value="#{userBean.selectedAvailableUsers}">
<f:selectItems
value="#{userBean.availableUsers}" />
<f:converter converterId="userConverter" />
</h:selectManyListbox>
</h:form>
<h:commandLink value="#{userBean.id}"
action="#{userBean.update()}">
<f:setPropertyActionListener
target="#{userBean.selectedUser}" value="#{userBean}" />
<f:ajax execute="@form" render=":idOfForm" />
</h:commandLink>
you can execute an update from your managedBean like this 您可以像这样从ManagedBean执行更新
RequestContext.getCurrentInstance().update("form1");
also read this question Render multiple components with f:ajax it's look like a similar question. 也阅读了这个问题使用f:ajax渲染多个组件,这看起来像是一个类似的问题。
Try it 试试吧
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.