dcsimg
Problem in implementing pagination in mvc architectuture and jsp
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Saturday, December 16, 2006 02:33 AM

I hava develop a guest book application based on mvc atchitecture To display records I hava made a method in DAO as follows public static Vector querList(Connection conn) throws SQLException This method takes connection as input parameter and return Vector of all records . This method is called in Bean named GuestBook.java public Vector queryList() throws SQLException { Connection connection = ConnectionManager.getDBConnectio(); Vector ResultsList = GuestBookDAO.querList(connection); return ResultsList; } To display the records I have used the method of this bean in jsp page List.jsp by writing the following code in jsp page Vector result   More>>

I hava develop a guest book application based on mvc atchitecture

To display records I hava made a method in DAO as follows


public static Vector querList(Connection conn) throws SQLException

This method takes connection as input parameter and return Vector of all records . This method is called in Bean named GuestBook.java

public Vector queryList() throws SQLException
{
Connection connection = ConnectionManager.getDBConnectio();
Vector ResultsList = GuestBookDAO.querList(connection);
return ResultsList;
}

To display the records I have used the method of this bean in jsp page List.jsp by writing the following code in jsp page


Vector results = Guest.queryList();
But My problem is how to disply these results usong pagination for long list of Comments


Thanks in advance
From
Abha

   <<Less

Re: Problem in implementing pagination in mvc architectuture and jsp

Posted By:   Amir_Pashazadeh  
Posted On:   Sunday, December 17, 2006 08:08 AM

change the signature to:


public Collection queryList(Connection c, int startIndex, int resultCount);



and use proper values for startIndex and resultCount when querying database, and displaying it (and use proper values for startIndex on paging icons).

About | Sitemap | Contact