我在p:dialog
内有p:pickList
。如何在p:对话框关闭时清除p:pickList目标列表
<p:dialog id="registerDialog" widgetVar="registerServiceDlg" modal="true"
minimizable="false" draggable="false" position="300,40"
style="background:#E0E0E0;" closable="true" maximizable="false"
resizable="false" visible="#{not empty facesContext.maximumSeverity}">
<p:ajax event="close" update="registerDialog" />
<h:outputLabel value="User" styleClass="label"/>
<p:pickList id="contactBean" value="#{contactBean.contacts}" var="contact"
itemLabel="#{contact}" itemValue="#{contact}" style="margin-left:20px;"
required="true" requiredMessage="one user is needed"/>
</p:dialog>
关闭对话框,我想清除p:pickList
目标列表。我怎样才能做到这一点?该bean在会话范围内,我想将其保留在会话范围内。
您可能希望将选取列表的值属性绑定到其他位置,以便在不干扰会话的情况下清除它,或者清除在会话作用域bean中找到的列表,以便更新值。此外,您需要在您的''标签中有一位听众,以便在关闭时完成其工作。 –
skuntsel
2013-03-01 09:25:09
如果您在问题中添加了功能要求和常规设置(会话中的内容,选择列表中的内容等),这也会很棒。 – skuntsel 2013-03-01 09:28:47
你的具体问题到底是什么?在执行相应的要求时,你到底在哪一步?你知道可能通过'
'调用一个bean方法吗? – BalusC 2013-03-01 13:12:52