KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > dinamica > PagingControls


1 package dinamica;
2
3 /**
4  * Generic transaction to provide a recordset
5  * containing the fields required to "paint"
6  * navigation controls for paged views.
7  *
8  * <br>
9  * Creation date: 29/10/2003<br>
10  * Last Update: 29/10/2003<br>
11  * (c) 2003 Martin Cordova<br>
12  * This code is released under the LGPL license<br>
13  * @author Martin Cordova
14  * */

15 public class PagingControls extends GenericTransaction
16 {
17
18     /* (non-Javadoc)
19      * @see dinamica.GenericTransaction#service(dinamica.Recordset)
20      */

21     public int service(Recordset inputParams) throws Throwable JavaDoc
22     {
23         
24         int rc = super.service(inputParams);
25         
26         //get recordset ID
27
String JavaDoc recordsetID = (String JavaDoc)getRequest().getAttribute("paging.recordset");
28         
29         //retrieve from session using this ID
30
Recordset rs = (Recordset)getSession().getAttribute(recordsetID);
31         
32         //publish recordset
33
publish("paging.controls", rs.getRecordsetInfo());
34         
35         return rc;
36         
37     }
38
39 }
40
Popular Tags