• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

urgent help

 
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???
 
Sheriff
Posts: 9674
42
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • 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: 9674
42
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • 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...
 
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic