• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Passing MyForm parameters with database retrieved values to Multiple Struts Actions

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a viewaction that gets data from db and i have edit button on the view page, now clicking on that it should take the user to the edit page ; here i dont want to hit the db again to get the details rather i would prefer passing the action form to the edit action so that i get the values there. from edit page i would be setting new values and that should be taken to the confirm action. the problem here is i am using the same form for all the actions and i am getting null values while the form is submitted.

how to proceed further ?

note: we are using struts 1.3.
 
Ranch Hand
Posts: 300
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ram,

Set the the value in the form object while you fetch the data from the db and use it in action for edit page.

Regards
Jatan
 
sriram arul
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jatan,

Thanks for your efforts.

I have set my scope="session" in struts-config, and fetched data on next action page using form object. And finally it worked as expected.

Regards,
Ram



jatan bhavsar wrote:Hi Ram,

Set the the value in the form object while you fetch the data from the db and use it in action for edit page.

Regards
Jatan

 
reply
    Bookmark Topic Watch Topic
  • New Topic