3 Replies Latest reply on Feb 20, 2009 1:37 PM by Nick Belaevski

    Disabling client side sorting in ExtendedDataTable

    devon lindsey Newbie

      I'm using rich faces 3.3.0 and the extended data table with a data table scroller. We're using the data scroller, because we're displaying a given user's activities, and that user might have thousands. Because of this, I need to disable the client side sorting, and capture the "onsort" event so that I can have our service perform the sorting and return to me the set of activities the user wants to see.
      Along with this, I'm wondering if there's a way to disable the "group by functionality" as well?
      Here's the code:

      <a4j:outputPanel>
       <h:form>
       <div>
       <rich:extendedDataTable id="activitiesGrid" value="#{activitiesListingDataModel}" var="row"
       rows="20" sortMode="single" style="width: 3000px; height: 524px"
       selectionMode="multi"
       tableState="#{activityListingDataProvider.activitiesTableState}"
       cellpadding="5" rowClasses="activityRow, activityRowAlternate"
       onRowMouseOver="activitiesHandler.highlightRow(this)"
       onRowMouseOut="activitiesHandler.unHighlightRow(this)">
       <rich:column id="activityNameColumn" sortable="true" label="#{field_activityName}"
       sortBy="#{row.activityName}" width="150px">
       <f:facet name="header">
       <h:outputText value="#{field_activityName}"/>
       </f:facet>
       <h:outputLink value="/activity/#{row.activityId}">
       <h:outputText value="#{row.activityName}" title="#{row.activityName}"/>
       </h:outputLink>
       </rich:column>
       <rich:column id="activityTypeColumn" sortable="true" label="#{field_activityType}"
       sortBy="#{row.activityTypeName}" width="100px">
       <f:facet name="header">
       <h:outputText value="#{field_activityType}"/>
       </f:facet>
       <h:outputText value="#{row.activityTypeName}"/>
       </rich:column>
       <rich:column id="locationColumn" sortable="true" label="#{field_location}"
       sortBy="#{row.locationName}" width="150px">
       <f:facet name="header">
       <h:outputText value="#{field_location}"/>
       </f:facet>
       <h:outputText value="#{row.locationName}" title="#{row.locationName}"/>
       </rich:column>
       <rich:column id="eventTypeColumn" sortable="true" label="#{field_eventType}"
       sortBy="#{row.eventTypeName}" visible="false" width="100px">
       <f:facet name="header">
       <h:outputText value="#{field_eventType}"/>
       </f:facet>
       <h:outputText value="#{row.eventTypeName}"/>
       </rich:column>
       </rich:extendedDataTable>
       </div>
       <div class="activitiesFooterLeft">
       <rich:datascroller id="pageScroller" for="activitiesGrid"
       page="#{activityListingDataProvider.scrollerPage}"
       align="center" maxPages="10" tableStyleClass="paginationTableStyle"/>
       </div>
       </h:form>
      </a4j:outputPanel>


      Thanks in advance,
      Devon.Lindsey@garmin.com