4 Replies Latest reply on Nov 22, 2007 7:04 AM by Ilya Shaikovsky

    a4j:status in dataTable

    Damian Harvey Master

      I'm trying to use a a4j:status in a table to provide an ajaxy spinner when a users clicks on a button in a table cell. The markup looks like this:

      <rich:column>
       <f:facet name="header">Action</f:facet>
       <a:commandLink action="#{bean.action}" status="tableActionStatus" reRender="someSection">
       <h:graphicImage url="/img/edit.png" border="0"/>
       </a:commandLink>
      
       <a:status id="tableActionStatus" forceId="true">
       <f:facet name="start">
       <h:graphicImage url="/img/spinner_mac.gif" border="0"/>
       </f:facet>
       <f:facet name="stop">
       <h:graphicImage url="/img/transparent_spacer.gif" width="16" height="16" border="0"/>
       </f:facet>
       </a:status>
      </rich:column>

      The problem is that unlike most JSF ids inside iterative components, the id for each status is exactly the same ('_viewRoot:status'). This means that when you click the link on any row, the status in row one (and only the status in row one) is activated.

      I don't think I'm using the status in an unusual way. Can anyone offer a solution?

      Thanks,

      Damian.