2 Replies Latest reply on Jun 18, 2009 8:19 AM by Joao Fernandes

    Count method for pagination

    Joao Fernandes



      Right now if we want to use paginated queries with DCD which have different arguments, we need to have a count  method for each paged query we want to use. Could we have the count signature move to the beginning and pass any other argument if present?


      Like that we could have 1 count method for N paged queries.




      function getFirstPagedQuery( startIndex, numItems )

      function getSecondPagedQuery( startIndex, numItems , arg1 )

      function getThirdPagedQuery( startIndex , numItems , arg1, arg2, arg...)

      function count(args-optional)


      the count function would then based on passed arguments evaluate which query to run and return the corresponding count.