1 Reply Latest reply on Jul 1, 2008 9:09 AM by Ilya Shaikovsky

    Sorting rich:dataTable - do clickable column headers work in

    greg robinson Newbie

      Hello. JSF and RichFaces rookie here. I'm working on an app that's using RF 3.1.4 GA and myfaces 1.1.1 (api) and myfaces 1.1.5 (impl).

      I'm trying to implement table sorting on our main search result table. the table works fine, however, I cannot get it to sort. I'd like to use the clickable column headers I see on the RF demo site. Is this unique to 3.2+ or should I be able to use it in my env?

      Here's my table:

      <rich:dataTable value="#{searchRequestBean.proxyList}" var="proxy"
      onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
      onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
      cellpadding="0" cellspacing="0" width="90%" border="0">

      <f:facet name="header">
      <h:outputText value="Click column headers to sort" />
      </f:facet>

      <rich:column sortBy="#{proxy.companyName}">
      <f:facet name="header">
      <h:outputText value="Company Name" />
      </f:facet>
      <h:outputText value="#{proxy.companyName}" />
      </rich:column>

      <rich:column sortBy="#{proxy.status}">
      <f:facet name="header">
      <h:outputText value="Status" />
      </f:facet>
      <h:outputText value="#{proxy.status}" />
      </rich:column>
      </rich:dataTable>

      ps - I did TRY to upgrade to 3.2 RF, but I got a whole boatload of version conflict problems that I need to sort through. I tried upgrading to MyFaces 1.2 and boosting my Jetty to 6.1.5. That yielded me new and different errors. So for now, just wondering if I should be able to make it work with 3.1.4 until I get everything else upgraded.