单击时不要隐藏OverlayPanel [英] Don't hide OverlayPanel on click

查看:170
本文介绍了单击时不要隐藏OverlayPanel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想让PrimeFaces 重叠式面板保持可见如果用户点击了工具提示之外的区域。关闭工具提示的唯一方法是关闭按钮。

I would like to make PrimeFaces Overlay Panel to stay visible even if user has clicked area outside the tooltip. The only way to close the tooltip would be Close button on it.

怎么做?

推荐答案

我不是jquery / javascript专家,colud是更优雅的解决方案。

Im not jquery/javascript expert, there colud be more elegant solutions.

<p:commandButton id="chartBtn" value="Basic" type="button" /> 
<p:overlayPanel id="chartPanel" widgetVar="chartPanelWidget" for="chartBtn" hideEffect="fade"
                                    onShow="$(document.body).unbind('mousedown.ui-overlay')">  
   <p:commandButton value="close" onclick="chartPanelWidhget.hide();return false;"/>
</p:overlayPanel> 

这篇关于单击时不要隐藏OverlayPanel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆