Jsf 2 我在jsf中的模态don´;隐藏
我有一个问题 我使用一种模式来获取信息并将其放入数据表中Jsf 2 我在jsf中的模态don´;隐藏,jsf-2,richfaces,hide,popuppanel,Jsf 2,Richfaces,Hide,Popuppanel,我有一个问题 我使用一种模式来获取信息并将其放入数据表中 <rich:popupPanel id="panelorcamento" domElementAttachment="form" modal="true" width="600" height="500" zindex="2" show="#{demandasMB.mostraOrcamento}" showWhenRendered="#{demandasMB.mostraOrcamento}"> ShowOrcamento
<rich:popupPanel id="panelorcamento" domElementAttachment="form" modal="true" width="600" height="500" zindex="2" show="#{demandasMB.mostraOrcamento}" showWhenRendered="#{demandasMB.mostraOrcamento}">
ShowOrcamento是:
public void showOrcamento(){
mostraOrcamento=true;
}
它起作用了。我的模型没有问题
在我的模式中,我有一个按钮隐藏我的模式:
public void hideOrcamento(){
orcamentoSelecionado = new Orcamentos();
mostraOrcamento=false;
}
要隐藏的按钮是:
<h:commandButton value="Fechar">
<f:ajax render="panelorcamento"
event="click"
listener="#{demandasMB.hideOrcamento()}"
/>
</h:commandButton>
我的问题是,当我点击“Fechar”按钮时,我的方法正在调用,但我的模式没有关闭
有人知道我在干什么吗
谢谢这是一个bug,因为面板上的屋顶附件不是渲染所指向的位置。可以通过渲染整个表单来解决此问题 也就是说,您控制面板的方式非常不寻常,关闭面板所需做的只是:
<h:commandButton value="Fechar"
onclick="#{rich:component('panelorcamento')}.hide()">
您可以使用show()
以相同的方式打开它,无需控制show属性
最后,显示了RF 4中未使用渲染的
<h:commandButton value="Fechar">
<f:ajax render="panelorcamento"
event="click"
listener="#{demandasMB.hideOrcamento()}"
/>
</h:commandButton>
<h:commandButton value="Fechar"
onclick="#{rich:component('panelorcamento')}.hide()">