问题描述
我有以下问题:
我是 JSF2 和 primefaces 的新手.
I'm new to JSF2 and primefaces.
我在页面中有一个表格,在用户输入字符串并单击命令按钮后,该表格将填充信息.单击按钮后,我希望在处理结束之前禁用它.
I have a table in a page that will be populated with information, after the user enters a string and clicks a CommandButton. After clicking the button, I want it to be disabled until processing is over.
要禁用命令按钮,我正在执行以下操作;
To disable the CommandButton I'm doing the following;
<p:commandButton update=":outPanel" widgetVar="btnSend" id="btnsend"
value="Calcular" actionListener="#{calcBean.getTrfs}"
onclick="btnSend.disable()" oncomplete="btnSend.enable()" />
然后我有一个面板,我想在其中显示其内容:
And then I have a panel where I want to show its contents:
<p:panel id="outPanel" widgetVar="outpanel">
#{calcBean.result}
</p:panel>
如何在第一次加载页面时隐藏此面板?
How can I hide this outpanel when the page loads the first time?
如何在单击CommandButton时隐藏它,只有在我的bean中处理成功时才再次显示?
How can I hide it when I click the CommandButton, and only show it again if the processing in my bean is successful?
谢谢.
推荐答案
已解决,
我必须放
closable="true" toggleable="true"
p:panel 中的属性...谢谢
attributes in p:panel... Thanks
这篇关于如何在命令按钮单击时隐藏和显示 p:panel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!