This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Struts and the fly likes saving hidden fields in Action Forms Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "saving hidden fields in Action Forms" Watch "saving hidden fields in Action Forms" New topic
Author

saving hidden fields in Action Forms

AnilPrakash Raju
Ranch Hand

Joined: Jul 26, 2004
Posts: 137
Hi,

In my jsp page I got some hidden fields in a form with some input fields.

When i submit this page it goes to the an ActionForm to validate the input fields.

If there are some errors found, it goes back to the jsp pages but i lose the values of the hidden fields.

is there any way of getting back the values of the hidden fields when there are errors present?

It works ok if there are no errors presents.

Thanks in advance

Anil
Leandro Melo
Ranch Hand

Joined: Mar 27, 2004
Posts: 401
Are the hidden fields declared in the form bean?
If not, try declaring in struts-config.xml and in the associated ActionForm.


Leandro Melo
SCJP 1.4, SCWCD 1.4
AnilPrakash Raju
Ranch Hand

Joined: Jul 26, 2004
Posts: 137
Hi,

The hidden fields are declared in the bean and when i step throught the actionForm I can see the values. But the values is not displayed if some errors are found.

thanks

Anil
 
Have you checked out Aspose?
 
subject: saving hidden fields in Action Forms
 
It's not a secret anymore!