jsf-2 - 如何关闭 rich :popupPanel on press of Esc key?

标签 jsf-2 richfaces

如何在按下 Esc 键时关闭 rich:popupPanel?

如何让它适用于键盘上的热键?

最佳答案

我会尝试以下方法:

   <rich:hotKey key="Esc">
        <rich:componentControl target="popupId" operation="hide" />
   </rich:hotKey>

   <rich:popupPanel id="popupId">
      ...
   </rich:popupPanel>

更多信息请参见 <rich:hotKey> 文档。

关于jsf-2 - 如何关闭 rich :popupPanel on press of Esc key?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12090057/

相关文章:

java - 根据 Controller 返回值调用javascript方法

javascript - 如何使用 RichFaces 从 JSF Bean 调用 JavaScript 函数?

JSF Composite 组件迭代并显示对象列表

jsf - <p :ajax event ="rowEditCancel"> on my primeface's datatable don't update datatable

JSF/PrimeFaces selectOneMenu 更改 url 参数并重定向

javascript - a4j :support event onkeyup not working with right click copy and paste

java - RichFaces 列 : Saving value of attribute on a row for comparisons

java - 如何为 Primefaces/JSF 应用编写单元测试

jsf - 实现NamingContainer的组件列表

java - 如何在 WebContent 的子文件夹下公开 JSF (.xhtml)