Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
AmeerAhmed




JSPWiki v2.2.33

[RSS]


Hide Menu

DisplayTagAndHibernatePagination


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.