This content has been marked as final.
Show 4 replies
-
1. Re: How to use a4j:hotKey to submit a form via commandLink
mark77 Nov 14, 2009 5:51 PM (in response to twolf)Hi,
I did it this way:<a4j:region> <table> <tr> <td> <h:inputText id="smallSearch" class="smallinput" style="width:200px" value="#{searchHandler.quickSearchText}" /> </td> <td width="30px" align="center"> <h:commandButton image="images/button_lupe.png" reRender="main" title="search" ajaxSingle="true" action="#{searchHandler.performQuickSearch}" id="smallsearchbutton"/> <rich:hotKey key="return" selector="#smallSearch" handler="#{rich:element('smallsearchbutton')}.click()"/> </td> </tr> </table> </a4j:region>
All of it inside an a4j:form -
2. Re: How to use a4j:hotKey to submit a form via commandLink
ahoehma Nov 23, 2009 2:38 PM (in response to twolf)Hihi,
I'm bloged last week about "default form action"
http://ahoehma.wordpress.com/2009/11/16/richfaces-modal-panel-default-formular-action/
Regards
Andreas -
3. Re: How to use a4j:hotKey to submit a form via commandLink
keysersoze Apr 7, 2010 2:47 PM (in response to twolf)Hi
Stumbled upon this thread since I was having same Problems like OP.
First of all it is important to note that a <h:commandlink> renders out <a href="#" onclick="...."...> whereas a <h:commandButton> produces a Button.
Additionally Firefox does NOT interpret click() on <a href>-Tags. So your example from above should work in IE.
To make a long Story short, use:
<rich:hotKey key="enter" handler="#{rich:element('doSomethinkLink')}.onclick()"/>
instead of
<rich:hotKey key="enter" handler="#{rich:element('doSomethinkLink')}.click()"/>
greetings
-
4. Re: How to use a4j:hotKey to submit a form via commandLink
ilya_shaikovsky Apr 9, 2010 4:08 AM (in response to keysersoze)and use return instead of enter. as far as I remember there are no such shortcut like enter.