3 Replies Latest reply on Jan 29, 2010 3:45 AM by jsf geeks

    How to Assume a Search Button was click when pressing "enter key"

    Eduardo Sandino Newbie
      I have read that you just need to have a FORM and in there the search button should be type="submit" but i don't know why it didn't work... other possible solution was using the rich:HotKey http://docs.jboss.org/richfaces/3.3.2.GA/en/devguide/html/rich_hotKey.html

       

      Wich is the best option ?

       

      I have more that one form in my web page... this is part of my search button:

       

              <h:form id="formBehaviorFilter" style="width: 668px">

      ...

                              <h:panelGroup>
                                  <h:commandButton value="#{messages['batch.order.reset.button']}" type="reset"/>
                                  <a4j:commandButton action="#{behaviorListView.filterSearch()}"
                                      value="#{messages['batch.order.search.button']}" type="submit"
                                      limitToList="true" reRender="behaviorListPanel"
                                      eventsQueue="fooQueue" ignoreDupResponses="true" />
                              </h:panelGroup>

       

                </h:form>