6 Replies Latest reply on Apr 29, 2009 10:26 AM by Nick Belaevski

    Many Tables on 1 page sortable not working

    Tony Herstell Master

      This repeats on a page (based on eachClass).
      When I used sorted to sort by time it only works on the final table on the page.
      For other tables the indicator does change but the table does not sort (nor does the final table).

      Any idea what I forgot?


      <h:form>
       <rich:dataTable columnClasses="table_entry text_important" width="100%"
       value="#{eachClass.competitorDetails}" var="eachEntry" rows="0"
       onRowMouseOver="this.style.backgroundColor='#F8F8F8'"
       rendered="#{eachClass.competitorDetails.size > 0}"
       onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
       <f:facet name="header">
       <h:outputText value="Competitors" />
       </f:facet>
       <rich:column width="40%">
       <f:facet name="header">
       <h:outputText value="Rider" />
       </f:facet>
       <s:fragment rendered="#{eachEntry.usingAlternateRider}">
       <h:outputText
       value="#{eachEntry.alternateRidersSurname}, #{eachEntry.alternateRidersFirstname}" />
       </s:fragment>
       <s:fragment rendered="#{!eachEntry.usingAlternateRider}">
       <h:outputText
       value="#{eachEntry.competitor.surname}, #{eachEntry.competitor.firstname}" />
       </s:fragment>
       </rich:column>
       <rich:column width="40%">
       <f:facet name="header">
       <h:outputText value="Horse" />
       </f:facet>
       <h:outputText value="#{eachEntry.horse.name}" />
       </rich:column>
       <rich:column width="5%">
       <f:facet name="header">
       <h:outputText value="Hors Concours" />
       </f:facet>
       <s:graphicImage rendered="#{eachEntry.horsConcours}" fileName="tick"
       url="/images/tick.gif" />
       </rich:column>
      
       <rich:column width="25%"
       rendered="#{identity.loggedIn and s:hasRole('ADMINISTRATOR')}" sortOrder="ASCENDING"
       sortBy="#{eachEntry.startTimeOfTest}">
       <f:facet name="header">
       <h:outputText value="Start Time" />
       </f:facet>
       <h:outputText value="#{eachEntry.startTimeOfTest}">
       <s:convertDateTime pattern="hh:mm" />
       </h:outputText>
       </rich:column>
      
       <!-- sortBy="#{eachEntry.startTimeOfTest}"
      <rich:column width="25%" rendered="#{identity.loggedIn and s:hasRole('ADMINISTRATOR')}">
       <f:facet name="header">
       <h:outputText value="Action" />
       </f:facet>
       <a4j:commandButton id="editCompetitor" styleClass="general_form_button"
       action="#{eventsEntryController.editCompetitor(eachClass.competitorDetails)}"
       value="#{messages.general_button_update}" type="submit" eventsQueue="eventsQueue"
       immediate="true" requestDelay="500" limitToList="true" />
      </rich:column>
      -->
      
       </rich:dataTable>
      </h:form>