0 Replies Latest reply on Mar 24, 2012 12:53 AM by johnlaha

    extendedDataTable  filterExpression  giving incorrect Range value  in Walk method in datamodel

    johnlaha

      Hi All,

       

      ( RF 4.0.0 and 4.1.0 with JBOSS7 )

       

      I implemented rich:extendedDataTable  and added filterExpression in it..It is working fine. No issue. I can filter on kyup event.

       

      But just now I noticed when I add filter in   rich:extendedDataTable  Range in datamodel ( extends ExtendedDataModel ) walk() method  always returning 0 to -1

       

      But if I just  remove filterExpression from  rich:extendedDataTable upon pagination it s giving correct properpagination Range value.

       

      Like if rows="12" and clicking 1st pagibnation button its giving 0 to 12 if I dont have filterExpression

       

      If I add filterExpression its giving 0 -1

       

      Though everything wrking fine from Front. But internally Its loading all table data instead of loading data per page.

      Itys very critical issue as it is not getting range to fetch a set of record

       

      I think I am doing a mistake.

       

      Can you Please provide your valuable inputs

       

      Thank you

      jon

       

       

      ########## WITH filterExpression added

      public void walk(FacesContext context, DataVisitor visitor, Range range,

                  Object argument)

      int firstRow = ((SequenceRange) range).getFirstRow();

      int numberOfRows = ((SequenceRange) range).getRows();

      LOGGER.info("walk:: firstRow: {} numberOfRows {}", firstRow,

                      numberOfRows);

       

      == LOG ->  INFO  ui.MasterDataModel   - walk:: firstRow: 0 numberOfRows -1

       

      ########## After removing only   filterExpression

      public void walk(FacesContext context, DataVisitor visitor, Range range,

                  Object argument)

      int firstRow = ((SequenceRange) range).getFirstRow();

      int numberOfRows = ((SequenceRange) range).getRows();

      LOGGER.info("walk:: firstRow: {} numberOfRows {}", firstRow,

                      numberOfRows);

       

      == INFO  ui.MasterDataModel   - walk:: firstRow: 0 numberOfRows 12

       

       

      ========

       

      <rich:column style="text-align:center;" sortable="false"

                              filterValue="#{customerFilterBean.custId}"

                              filterExpression="#{fn:startsWith(_customerInfo.custId , customerFilterBean.custId)}"

                              width="80px">

                              <f:facet name="header">CustId</f:facet>

                              <h:outputText value="#{_customerInfo.custId}" size="12"

                                  maxlength="35" style="text-align:left;width:70px;" />

       

                          </rich:column>