DisplayTagAndHibernatePagination |
|
Your trail: |
Difference between
version 5
and
version 1:
At line 4 changed 1 line. |
1) Add {{{partialList="true" size="resultSize"}}} to the display tag in your jsp file like so: |
1) Add {{partialList="true" size="resultSize"}} to the display tag in your jsp file like so: |
At line 35 changed 2 lines. |
//required for display tag to get the pagination to work |
request.setAttribute("resultSize", new Integer(amgr.getTestDataSizeByName("test"))); |
//get the total size of collection , required for display tag to get the pagination to work |
request.setAttribute("resultSize", new Integer(amgr.getTestDataSize())); |
At line 64 changed 1 line. |
public List getTestData(int page, int pageSize){ |
public List getTestData(int page, int pageSize){ |
At line 66 changed 2 lines. |
Query query = getSession().createQuery("from Test"); |
|
Query query = getSession().createQuery("from Test"); |
At line 68 added 7 lines. |
} |
|
public int getTestDataSize() { |
|
return ((Integer)getSession().createQuery("select count(*) from Test").uniqueResult()).intValue(); |
} |
|
Back to DisplayTagAndHibernatePagination,
or to the Page History.
|