开发者

JSF 2 modal panel

How can i make a modal panel in JSF 2? I tried using javascript as in: http://www.pat-burt.com/web-development/how-to-do-a-css-popup-without-opening-a-new-window/开发者_高级运维

and a jquery plugin called SimpleModal.

but the modal panel at best appears for a split of a second and then disappears. So how can i achieve a modal panel in pure JSF 2 (no richfaces or such)? Thanks in advance.


How are you calling your modal panel? If you are using a commandButton / commandLink with the onclick event, then you will have to finish your call by return false;, like that:

<h:commandButton onclick="popup('...'); return false;" ...>

If you do not set this, then the popup will appear, and then a request is sent to the server. The page will finally be refreshed, which will close this popup.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜