1 Reply Latest reply on Oct 30, 2008 7:57 PM by nbelaevski

    a4j:commandButton and a4j:commandLink not running action

    lindagiordano

      I've had this problem for awhile, and it seems to have something to do with a combination of frameworks I'm using.

      Here's the scenario:

      I have an h:form on a page (I've tried a4j:form, but it still didn't help). I've defined an a4j:region on the page, where there is a rich:datatable that I want to reRender. Outside the a4j:region, I have an a4j:commandButton with an action defined. Here's the code:

      <a4j:commandButton id="button" action="#{myAction.myMethod}" reRender="myTable"/>
      
      <a4j:region>
       <rich:dataTable id="myTable"...>
       ...
       </rich:dataTable>
      </a4j:region>
      


      When I click on the command button, the action is never called, and the table is never reRendered.

      If I change this to an <h:commandButton>, this works. So, my workaround was to use <h:commandButton> and provide <a4j:support> to do the reRender. The problem with this method is that the entire page is being refreshed, not just the datatable, or region, for that matter. Is there a bug here, or am I not using the button correctly?

      I'm using Seam 2.0, Jboss 4.2.3, and Rich Faces 3.2.2.