1 Reply Latest reply on Jul 25, 2011 2:21 PM by holyphoenix

    loading gif on extendedtabledata?

    holyphoenix Newbie

      Hi, I am a student learning to use Richfaces as an intern for a company.  I have a problem though with an extendedtabledatamodel, where if the information does not finish loading in the table before it is clicked for editing, the screen gets stuck on our status="waitstatus" indicator used when loading a modal that allows us to modify the information.

       

      I was wondering if there is a way to add an ajax loading gif or some other small image to either the whole page or just the table until the table is finished loading in order to stop the user from clicking on it?

       

      I am using Richfaces 3.3.3. 

        • 1. Re: loading gif on extendedtabledata?
          holyphoenix Newbie

          I thought I should add some more information to make it easier to understand why.  Currently I have an extendedDataTable, and I included on it the ability to double click with a4jsupport.  My code looks similar to this.

           

                              <rich:extendedDataTable id="aTable"

                                                       value="#{aSupportBean.DataModel}"

                                                       var="something"

                                                       width="500px"

                                                       height="350px"

                                                       sortMode="ascending" sortable="true"

                                                       sortBy="#{something.name}"

                                                       selectionMode="single"

                                                       tableState=""

                                                       style="margin-top:10px;overflow:visible;"

                                                       rowClasses="row1,row2" selectedClass="rowSelected"

                                                       columnClasses="" font-size="50"

                                                       enableContextMenu="false"

                                                       selection="#{aSupportBean.selected}">

                                        <rich:column width="95" sortBy="#{something.id}" headerClass="head3">

                                                 <f:facet name="header">

                                                          id

                                                 </f:facet>

                                                 <h:outputText value="#{something.id}" />

                                        </rich:column>

                                        <rich:column width="300" sortBy="#{something.name}" headerClass="head3">

                                                 <f:facet name="header">

                                                          name

                                                 </f:facet>

                                                 <h:outputText value="#{something.name}">

                                                     <f:converter converterId="javax.faces.Integer"/>

                                                 </h:outputText>

                                        </rich:column>

                                   <a4j:support event="ondblclick"

                                                     status="status"

                                                     oncomplete="#{rich:component('editPanel')}.show()"

                                                     actionListener="#{aSupportBean.editSomethingSelection}" ajaxSingle="true"

                                                     reRender="editPanel">

                                   </a4j:support>

                          </rich:extendedDataTable>

           

          Now my problem is that you are able to double click even before the table has completely loaded, and when doing this it causes the status to appear but never dissappear.  It just keeps being shown until kingdom come.  I get no error message in the stacktrace.  So I need to disable the a4jsupport component in some way until all the data is loaded.  Does anyone have any ideas on a simple solution?

           

          Thanks,

          James