2 Replies Latest reply on Apr 16, 2007 9:03 PM by patrickmadden

    two h:command buttons in rich:toolbar?

    patrickmadden

      Hi,

      I have two command buttons rendered in a toolbar using actionListeners on my backing bean. Only the first button is functioning (getting called). I'm wondering if this is possible.

      <ui:define name="body">
       <h:messages globalOnly="true" styleClass="message"/>
       <h:form id="searchForm">
       <rich:toolBar styleClass="searchBar">
       <rich:toolBarGroup>
       <h:inputText id="term" value="#{search.searchTerm}" />
       <h:commandButton id="search" actionListener="#{search.searchSubmitButtonListener}" disabled="#{search.searchRunning}" value="#{messages['searchForm.command.search']}"/>
      ...
       </rich:toolBarGroup>
       <rich:toolBarGroup location="right">
       <h:commandButton id="headlines" rendered="#{identity.loggedIn}" actionListenter="#{search.headlines}" disabled="#{search.searchRunning}" value="#{messages['searchForm.choice.headlines']}"/>
       <s:link view="/headlines.xhtml" value="#{messages['searchForm.choice.headlines.configure']}"/>
       </rich:toolBarGroup>
       </rich:toolBar>
      .....
      </hform>
      </ui:define>
      </ui:composition>
      


      Both action listener are defined to take ActionEvent signatures

      public void headlines(ActionEvent e);
      public void searchSubmitButtonListener(ActionEvent e);
      


      I'm just wondering if this has something to do with two submit buttons on the same form. However, I have other content inside tabs, treenodes, data tables, on this page/form that have command buttons and/or command links that function just fine.

      So, I'm a bit confused.

      Any help is greatly appreciated.

      Thanks,

      PVM