1 Reply Latest reply on Jan 27, 2012 10:48 AM by bsingh1408

    Dynamic Filter Columns On DataTable

    bsingh1408

      Hi,

       

      I have a richfaces dataTable(v 3.2.2) which uses db pagination. The table contains some Column headers that have HtmlSelectOneMenu which contain a UISelectItems child. The UISelectItems child should change based on the data that is retrieved from the database during the pagination walk method.

       

      When rendering the table, (1) the methods to get data for table column headers get called first, then (2) the methods to get the data for table rows gets called next and iterate through the walk method to render the rows.  Is there anyway, I can rerendered the some of the data for the table columns after  (2).

       

      After (2), can I get a handle to the relevant UISelectItems child for the table column header, and correctly populate it and force it to be re-rendered. Can I force re-rendering of a table column header dropdown list from the java code.

       

      Please advise.

      Thanks,

      Bal.

        • 1. Re: Dynamic Filter Columns On DataTable
          bsingh1408

          The issue was resolved by adding an a4j:jsFunction which reRendered a4j outPanels around the filters. The name of the function was called by javascript on load. The function was called by required table filters and table datascroller oncomplete.

           

          <a4j:jsFunction name="ajaxFire" reRender="filterPanel1, filterPanel2, filterPanel3l" ajaxSingle="true" ignoreDupResponses="true">

          </a4j:jsFunction>

           

          // On page load calls javascript

          <script type="text/javascript">

              ajaxFire();

          </script>