10 records per page
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   rajashekar_karanam
Posted On:   Thursday, June 5, 2003 09:15 PM

i want to display 10 records per page using jsp tags in one page i am getting 10 records but while navigating to next page i am getting error can anyone help here is my code.wanted urgently <%@ page import="java.util.Enumeration,java.util.Vector,java.util.*,java.io.*" isThreadSafe="false" errorPage="ErrorPage.jsp" %> <%@ taglib uri="/WEB-INF/pager-taglib.tld" prefix="pg" %> <%! Enumeration enm; Vector fileList,deletelist; Iterator it; ListIterator litr; String member_id; String[] data; int i; %> <% member_id = (String)session.getAttribu   More>>

i want to display 10 records per page using jsp tags in one page i am getting 10 records but while navigating to next page i am getting error can anyone help here is my code.wanted urgently



<%@ page import="java.util.Enumeration,java.util.Vector,java.util.*,java.io.*" isThreadSafe="false" errorPage="ErrorPage.jsp" %>
<%@ taglib uri="/WEB-INF/pager-taglib.tld" prefix="pg" %>





<%!
Enumeration enm;
Vector fileList,deletelist;
Iterator it;
ListIterator litr;
String member_id;
String[] data;
int i;


%>

<%
member_id = (String)session.getAttribute("member_id");

if((fileList = (Vector)request.getAttribute("fileList")) ==null )
{
//redirect
}
else
{

enm = fileList.elements();

}

%>










<%
i=0;
deletelist=new Vector();

while(enm.hasMoreElements())
{
data = (String[])enm.nextElement();
deletelist.addElement(data[0]);
}





it=deletelist.iterator();
litr=deletelist.listIterator();


while(it.hasNext())
{
Object element=it.next();

}
while(litr.hasNext())
{
Object element=litr.next();
litr.set(element);
}
while(litr.hasPrevious())
{
%>

<%

Object element=litr.previous();
String name=element.toString();
String imagename=name.substring(0,8);
String date=name.valueOf(element);
String imagedate=date.substring(8,18);
String imagetime=name.substring(19,27);



%>



<%=i%>" value=" <%=element%>" >
<%=name%>" value=" <%=element%>">
<%=name%>")' class="activehl">Image<%=i%>
 
<%=imagedate%>
 
<%=imagetime%>





<%

i++;
%>


<%
}

//session.setAttribute("values",deletelist);


%>











<%
if (pageNumber.intValue() < 10)
{
%>  <%
}
if (pageNumber == currentPageNumber) {
%> <%= pageNumber %> <%
}
else
{
%> <%= pageUrl %>"><%= pageNumber %> <%
}
%>










  <%= pageUrl %>">[Next >>]







   <<Less

Re: 10 records per page

Posted By:   AlessandroA_Garbagnati  
Posted On:   Thursday, June 5, 2003 11:50 PM

Hi,

You should read the posting guidelines and check the message format before submitting a quertion. As you can see, the code for your question is unreadable.


Anyway, the "records per page" topic has been coveres *so many* times, so, please, before submitting a question *do check* the FAQs and the forum's threads.

Thanks.

About | Sitemap | Contact