Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

urgent help

 
ragu pathi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
im new to struts ..
i hv created user registration form...wen user clicks confirm button after entering all fields ...it directs to create page wer user could find all the details entered..in tat page wen user clicks create button,the user account will b created in the database..nd login page will b open..
in case if user enter wrong values,user can click back button which again directed to user registration form wer user can find all the entered values n all fields(textbox or dropdown etc)which is editable...


so how 2 populate the entered values wen user clicks back button???
 
Ankit Garg
Sheriff
Posts: 9580
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ragu, welcome to javaranch.

Please Use Real Words in your posts and Ease Up.

Can you tell us whether you are using Struts 1 or Struts 2...
 
ragu pathi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am using struts-2.1.6.GA...
 
Ankit Garg
Sheriff
Posts: 9580
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For the values to be automatically filled into the respective textboxes, they'll need to be properties in action which will show that page. And those properties need to be filled with the respective values. If that's not possible, then you'll have to manually fill the values of the textboxes using OGNL or EL...
 
Pavel Kazlou
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ragu.
I would like to add that you should use more informative topic name.

In your scenario you use two HTTP requests. The first for submiting form. The second for returning back to form (of course this back button is not browser's one!). The thing used to pass the information between HTTP requests is HTTP session. In case of struts 2 to use session you have your Action class to implement SessionAware interface, which will demand your class to implement method "setSession". The framework then use this method to pass your Action a Map which you can use to store all the fields when submitting form and retrieve them when returning back.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic