开发者

conditionally show Primefaces dialog box

开发者 https://www.devze.com 2023-04-05 22:01 出处:网络
In reference to the query that I have posted Primefaces Dialog box - show it conditionally. javascript code not working

In reference to the query that I have posted Primefaces Dialog box - show it conditionally. javascript code not working

The problem is 开发者_StackOverflow社区that when

<p:outputPanel id="dialogPanel"
            rendered="#{not reqSearchHandler.accStatusFlag}">

is not rendered as rendered turns out to be FALSE , then when I click on the commandbutton , its keep on clocking and I am not able to go the next page , it seems that ajax request is never getting completed as oncomplete="dlg3.show()" needs dialog box in the page.As rendered turns out to be false , it never finds dlg3.

<p:commandLink id="addRequest" immediate="true" value="addreq"
                oncomplete="dlg3.show()" update="dialogPanel">
                <f:setPropertyActionListener
                    value="#{searchHandler.selectedAccIns}"
                    target="#{reqSearchHandler.checkAccStatus}" />
            </p:commandLink>

Can somebody please help me how to avoid opening dialog box when a particular condition is false. Any Idea?


Is the dlg3 inside of dialogPanel? Why don't you post the complete code?
If so, then just before calling dlg3.show)(), change the rendered condition to true (e.g. by adding action listener) or just move the dialog outside the panel.

0

精彩评论

暂无评论...
验证码 换一张
取 消