0 Replies Latest reply on Jun 12, 2009 8:30 AM by ashutoshdeora

    problem in sorting when using subtable

    ashutoshdeora

      i am putting my code
      i am using subtable but i am not able to sort
      please can anyone tell me if i am missing something in the code or i am doing somethign wrong

      <rich:dataTable value="#{fList.trainResultList}" var="rList"
       width="100%" rowClasses="odd,even">
       <f:facet name="header">
       <rich:columnGroup>
       <rich:column sortBy="#{dList.trainName}">
       <h:outputText value="Select" />
       </rich:column>
       <rich:column sortBy="#{dList.origin}">
       <h:outputText value="Train Name" />
       </rich:column>
       <rich:column sortBy="#{dList.destination}">
       <h:outputText value="Origin" />
       </rich:column>
       </rich:columnGroup>
       </f:facet>
      
       <rich:column colspan="8">
      
       <rich:subTable value="#{rList.trainDetailList}" var="dList">
      
       <rich:column >
       <h:outputText value="#{dList.trainName}" />
       </rich:column>
       <rich:column >
       <h:outputText value="#{dList.origin}" />
       </rich:column>
      
       <rich:column>
       <h:outputText value="#{dList.destination}" />
       </rich:column>
      
       </rich:subTable>
       </rich:column>
       </rich:dataTable>
      
      
       </rich:column>
       </rich:dataTable>
      




      this is the part of my code where i am using the subTable
      please can anyone tell me weather sortBy can be used or not
      if Yes
      then where i am making mistake or missing something
      or i have to do something else