aspose file tools*
The moose likes Struts and the fly likes pagination problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "pagination problem" Watch "pagination problem" New topic
Author

pagination problem

manasa teja
Ranch Hand

Joined: May 27, 2002
Posts: 325
hi
In jsp , i have a text box, where the user entes some name and clicks teh submit button
Then, results will be displayed in teh same page. I am using the pagination for this. Upon clickkin gthe "next" or previous links, it is paginiating properly only. now my problem, the value, which the user entres in the text box is disappearing ..
How to retain the text box value, when the user navigates between the results using pagination.
thanks
Raman


MT
manasa teja
Ranch Hand

Joined: May 27, 2002
Posts: 325
any suggestions o n this?/
manasa teja
Ranch Hand

Joined: May 27, 2002
Posts: 325
PLease help me on how to retian the user's input, when he uses pagination to see the resutls as explained above
sandy gupta
Ranch Hand

Joined: Jan 30, 2001
Posts: 228
do you use struts, if you do and have a attribute in the form bean corrs to the text field name and if the scope of the form in the action is session then you should be able to retain the value of the text box. If you are not using struts then use the plain old jsp format of setting the variable in the session and using that to populate the field(not recommended)
HTH
Sahil


Adios
manasa teja
Ranch Hand

Joined: May 27, 2002
Posts: 325
Originally posted by desi dude:
do you use struts, if you do and have a attribute in the form bean corrs to the text field name and if the scope of the form in the action is session then you should be able to retain the value of the text box. If you are not using struts then use the plain old jsp format of setting the variable in the session and using that to populate the field(not recommended)
HTH
Sahil

Thanks Sahil.. That really helped a lot. yes. i am usinmg struts!!
MT
manasa teja
Ranch Hand

Joined: May 27, 2002
Posts: 325
Actualy , it is not working .. I tried putting it in a sessin scope!!

mt
sandy gupta
Ranch Hand

Joined: Jan 30, 2001
Posts: 228
a common problem in this is the value in the input tag. make sure that you do not have the value set and that you do not set the value of the attribute in the formbean anywhere or reset it in the form bean after the user enters it.
Sahil
manasa teja
Ranch Hand

Joined: May 27, 2002
Posts: 325
Originally posted by desi dude:
a common problem in this is the value in the input tag. make sure that you do not have the value set and that you do not set the value of the attribute in the formbean anywhere or reset it in the form bean after the user enters it.
Sahil

yes.. what you said is correct!! Somewhere, the attribute (lastname) in teh form is reset to null. I verified my code everywhere.. but no where, I explicitly mentioned that it shd become null.
As soon as I click on Search button, the name will be there, even after it displays the results at thebbottm. But, once I click the next button/last button, the value in the text box disappears.
manasa teja
Ranch Hand

Joined: May 27, 2002
Posts: 325
Originally posted by desi dude:
a common problem in this is the value in the input tag. make sure that you do not have the value set and that you do not set the value of the attribute in the formbean anywhere or reset it in the form bean after the user enters it.
Sahil

Hi Sandy/Sahil
After posting the my message, I re-read your post and "reset" word caught my attention. And Yes. you guessed it right!! Actually , I used that reset method and setting it to null. I just commented it and its woirking fine!!
Thanks Buddy!! You really saved my day!!
Please visit this forum regularly!! There are many people , who post questions like this.
thanks again!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: pagination problem