Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jsf 2 我在jsf中的模态don´;隐藏_Jsf 2_Richfaces_Hide_Popuppanel - Fatal编程技术网

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()">