0 Replies Latest reply on Oct 14, 2008 9:20 AM by Michael Morgan

    Is datatable rerender of rows only possible?

    Michael Morgan Newbie

      I am filtering and sorting my rich:datatable external to the built-in filter and sort because I require a new database query each time. I am trying to duplicate the look and feel by using the table header and column headers for these purposes. Is there a way to just rerender the body of the datatable (similar to the built-in filter) so that I don't have to worry about focus issues oncomplete. The focus attribute does not provide the desired functionality.

      Here is a one column sample of what I am doing:

      <rich:dataTable id="docListing" value="#{docDataModel}" var="cur" rows="10">
       <f:facet name="header">
       <rich:column styleClass="dataTableHeader">
       <a4j:commandLink value="Document Id " reRender="doc" actionListener="#{docDataModel.refreshRequired}">
       <a4j:actionparam value="id" assignTo="#{docDataModel.sortField}"/>
       <h:graphicImage value="#{docDataModel.sortCol['id']}.gif"/>
       <f:facet name="header">
       <h:inputText id="titleQ" value="#{docDataModel.example.title}">
       <a4j:support event="onchange" reRender="docListing" focus="nextColumn" actionListener="#{docDataModel.refreshRequired}"/>
       <h:outputText value="#{cur.title}"/>
       <f:facet name="footer">
       <h:panelGrid columns="2" width="100%">
       <h:outputText value="Total Records: #{docDataModel.rowCount} (maximum #{docDataModel.maxAllowableRows} viewable)"/>
       <rich:datascroller for="docListing" maxPages="2" pageIndexVar="pageIndex" pagesVar="pages" fastControls="show" boundaryControls="show" stepControls="hide">
       <f:facet name="pages">
       <t:div style="text-align:center; white-space:nowrap;">
       <h:outputText value="Page #{pageIndex} / #{pages}"/>

      The only other way I can think to accomplish this is to move the column headers and table header information outside the rich:datatable, but then I have to worry about column width formating issues.

      Any help is appreciated.