1 Reply Latest reply on Feb 18, 2009 8:35 AM by andre.eugenio

    DataTable, SubTable and Column Sort

    andre.eugenio

      I have an datatable with sorting working without a problem.

      <rich:dataTable value="#{textSearchExtendendDataModel}" var="item" rows="10">
       <rich:column sortBy="#{item.idTicket}">
       <f:facet name="header">Id</f:facet>
       <h:outputLink value="#" onclick="redirectTicket(#{item.idTicket});">
       #{item.idTicket}
       </h:outputLink>
       <br />
       <h:outputLink value="#" onclick="loadTicket(#{item.idTicket});" styleClass="nowrap">
       <h:outputText value="Preview" />
       </h:outputLink>
       </rich:column>
       <rich:column sortBy="#{item.tbItrSyntheticLs.tbAreaByIdArea.l1DescriptionForLucene}">
       <f:facet name="header">Area</f:facet>
       #{item.tbItrSyntheticLs.tbAreaByIdArea.l1DescriptionLong}
       </rich:column>
      ...
      </rich:dataTable>
      

      When i add a subtable to display some detail data i get a strange behaviour in the header as you can see on the image http://img413.imageshack.us/my.php?image=subtableheaderhg6.png
      <rich:dataTable ...>
      ...
       <rich:subTable var="subItem" value="#{item}">
       <rich:column colspan="7">
       <h:outputText value="#{textSearchExtendendDataModel.resultHighlighter(subItem.idTicket)}" escape="false" />
       </rich:column>
       </rich:subTable>
      ...
      </richDataTable>
      

      If i use a code like http://livedemo.exadel.com/richfaces-demo/richfaces/dataTable.jsf i get the expected result but i lost the sort feature. I already tried to put the "SortBy" on the header facet, on columns definitions and even both.

      Can someone help me ?

      TIA.