First let me say what I understand about your problem.
You are retrieving some records from the database
and showing them on the screen one by one.
You have two buttons for moving forward and backwards
in the records.
OK now for the solution
First . You can store a vector of your records in the session.
Second . Store the index of the current record in the session
Finally . If the user presses next , retrieve the vector & index from the
session
get the next value in the vector by using vector.elementAt(index + 1)
and build the view page.
Vice versa for previous button (vector.elementAt(index - 1))
I hope this helps
-Yuvaraj Mani
-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
Miguel Angel Carmona
Sent: Wednesday, August 08, 2001 10:05 AM
To: [EMAIL PROTECTED]
Subject: HOW CAN I DO FORM REFRESH A TEXTFIELDS?
HI! HOW ARE YOU I HOPE FINE, WELL MY PROBLEM IS THE NEXT.
I HAVE A SERVLET INTO I MAKE A QUERY TO A TABLE AND I GOT ALL RECORDS AND IN
THIS SERVLET ALSO I MAKE A DINAMIC FORM.HTM IN THIS FORM I SHOW THE FIRST
RECORD BUT A WANNA PUT TOW BUTTOS ONE FOR "NEXT" AND THE OTHER FOR "PREVIEW"
FOR REFRESH THE NEXT OR PREVIEW RECORD I DONT NKOW HOW DO IT??
I STORE MI RECORD IN THIS WAY:
String query="select * fron Users";
rs=st.executeQuery(query);
String name="";
while(rs.next());
name=(rs.getString("name")+"#");
SO IN "name" I GOT ALL THE RECORDS BUT HOW I CAN MANIPULE TO SHOW WITH THE
BUTTONS "NEXT" AND "PREVIEW"
THANKS. FOR YOUR HELP!
aNGELLUS.
Get 250 color business cards for FREE!
http://businesscards.lycos.com/vp/fastpath/
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html