Client Side sorting + Hibernate Paging?

前端 未结 3 1581
庸人自扰
庸人自扰 2020-12-10 09:26

I use GWT for UI and Hibernate/Spring for buisness-layer.Following GWT widget is used to display the records.(http://collectionofdemos.appspot.com/demo/com.google.gwt.gen2.d

3条回答
  •  庸人自扰
    2020-12-10 09:53

    1. Always have a sort column. By default it could by "name" or "id"
    2. Use server side paging. I.e. pass the current page index and fetch the appropriate data subset.
    3. In the fetch criteria / query use the sort column. If none is selected by the client, use the default.

    Thus you will have your desired behaviour without trade-offs.

提交回复
热议问题