1 Reply Latest reply on May 18, 2009 3:10 PM by nbelaevski

    hotKeys are registered multiple time

    alibsd

      Hi,

      It seems that the events of rich:hotKey are added to a list multiple times,
      regardless of their key. For example, in the code below, as long as
      COMMAND is not pressed, ctrl+up works fine and alert is shown.

      But after COMMAND is clicked, and rich:panel which surrounds rich:hotKey
      is reRendered, ctrl+up shows two alert and so on.

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:a4j="http://richfaces.org/a4j"
       xmlns:rich="http://richfaces.org/rich">
      <body>
      <h:form>
       <a4j:commandButton value="COMMAND" reRender="pnl" ajaxSingle="true" />
       <rich:panel id="pnl">
       <rich:hotKey id="hot1" key="ctrl+up" handler="alert('TTTTTT');" />
       </rich:panel>
      </h:form>
      </body>
      </html>
      


      Did I miss some attribute or it is a bug?

      Thanks in advance