0 Replies Latest reply on Feb 14, 2014 5:07 AM by Dmitry Volkov

    Extended data table + JPA Pagination

    Dmitry Volkov Newbie

      Hi dear community and Rich Faces team,

       

      this question was discussed many times and there is a good article describing JPA Pagination in RichFaces: Migration to RichFaces 4 - RichFaces Data Models. | In Relation To | Planet JBoss Community.

      We have implemented ExtendedDataModel with JPA Paging and data cashing in requestScope as the article states. But there is still one issue we can't solve.

      ExtendedDataTable makes TWO database queries when used with our DataModel despite cashing. I have investigated this behavior and found that ExtendedDataTable always loads previous page additionally to the next page. EDT submits selected row index and it needs to be converted in RowKey. But RowKeys are available on client side and could be directly submitted. Is it possible or I am missing something? Is there any other workarounds to get rid of double DB requests? If it were possible, I would like to implement proposed solution and make a pull request.

       

      I am asking first and foremost Rich Faces team to help me with this issue.

       

      Regards,

      Dmitry Volkov.