0 Replies Latest reply on Apr 7, 2009 12:18 PM by ronanf

    Status and multiple ajax requests

      Hi,

      Have a problem where I would like to utilize the a4j:status component from within a datatable however it's use disrupts how the aj4:support events work.

      I would like the status component to render when the onRowClick event is fired only however it is picked up by the onRowMouseDown event instead. I have tried adding the status="workingStatus" attribute to the onRowClick event support but it doesn't have any effect.

      I don't believe it is possible to use regions inside a datatable so I'm not sure how to solve this problem.

      Any ideas?

      jsf:

      <rich:dataTable id="docListDataTable" value="#{documentListBean.docList}" var="doc">
      
       <rich:column id="c1" sortable="true" sortBy="#{doc.title}" title="Title">
       <f:facet name="header">
       <h:outputText value="Title"/>
       </f:facet>
       <h:outputText id="o1" value="#{doc.title}"/>
       </rich:column>
      
       <f:facet name="footer">
       <rich:datascroller boundaryControls="auto" fastControls="auto"/>
       </f:facet>
      
       <a4j:support event="onRowClick" eventsQueue="previewEvents" ignoreDupResponses="true" reRender="previewContainer">
       </a4j:support>
      
       <a4j:support event="onRowMouseDown" eventsQueue="previewEvents" ignoreDupResponses="true">
       <f:setPropertyActionListener value="#{doc}" target="#{documentListBean.currentDoc}"/>
       </a4j:support>
      
       <a4j:support event="onRowContextMenu" reRender="contextMenuForFilePlan" eventsQueue="contextEvents" oncomplete="#{rich:component('contextMenuForFilePlan')}.doShow(event, {})" ignoreDupResponses="true">
       <f:setPropertyActionListener value="#{doc}" target="#{richContextMenu.currentDoc}"/>
       </a4j:support>
      
      </rich:dataTable>
      
      <rich:contextMenu binding="#{richContextMenu.contextMenuForFilePlan}" attached="false" id="contextMenuForFilePlan" submitMode="ajax"/>
      
      <a4j:status id="workingStatus" onstart="Richfaces.showModalPanel('workingModalPanel')" onstop="Richfaces.hideModalPanel('workingModalPanel')"/>
      
      <rich:modalPanel id="workingModalPanel" width="150" height="60">
       <f:facet name="header">
       <h:panelGroup>
       <h:outputText value="Working..."></h:outputText>
       </h:panelGroup>
       </f:facet>
       <div>
       <h:graphicImage value="../images/blue_ajax_loader.gif"/>
       </div>
      </rich:modalPanel>
      


      Thanks,
      Ronan