4 Replies Latest reply on Apr 9, 2010 4:08 AM by Ilya Shaikovsky

    How to use a4j:hotKey to submit a form via commandLink

    twolf Newbie

      Hi there,

      I cant figure out what i made wrong. I am trying to submit a form on key-event "enter/return" by invoking an commandLink with javaScript.

      Here is my code:

      <h:form id="myForm">
       <t:inputText id="name" value="#{myController.anobject.property}" />
       <h:commandLink id="doSomethinkLink" action="#{myController.doSomethink}" styleClass="cssbutton">
      <rich:hotKey key="enter" handler="#{rich:element('doSomethinkLink')}.click()"/>

      Nothing happend here.

      (Additional info:Got no script error, jquery is working fine when i use it manually.)

      How to get tis work?