This discussion is archived
1 Reply Latest reply: Aug 23, 2013 1:24 PM by kdario RSS

How to trigger commandToolbarButton action when pressing Enter key

user501417 Newbie
Currently Being Moderated



I have an inputText and commandToolbarButton in the page.  We have a requirement that when user enters some text in the inputText box, then press Enter key, the action of the commandToolbarButton will be triggered.


<af:toolbar id="t7">

<af:group id="g35">

   <af:inputText label="Quick Search" id="it24" columns="8">

         <af:validateRegExp pattern="[1-9][0-9]*" messageDetailNoMatch="Not a valid Request ID"/>


   <af:commandToolbarButton id="ctb13" icon="/images/search_ena.png" shortDesc="Search" action="#{viewScope.backing_requestOverview.onQuickSearch}" partialSubmit="false"/>




Please share how can I implement this.







  • Correct Answers - 10 points
  • Helpful Answers - 5 points