File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes How can i reset  the form bean data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How can i reset  the form bean data" Watch "How can i reset  the form bean data" New topic
Author

How can i reset the form bean data

prasad guna
Ranch Hand

Joined: Feb 12, 2009
Posts: 43

Hi,

i use form bean in my project and i use one of the bean data is String array.While loading the Form bean page in very first time it update values perfectly to bean, but it cannot reset after the same page in same session.

how can i reset the values in form bean...

i can't get real value even i initialize as a default value is null.


thanks in advance

Prasath.G
SCJP
Dawn Charangat
Ranch Hand

Joined: Apr 26, 2007
Posts: 249
you can write a reset() method in the form bean, which will initialize all [or required] fields in the bean. Invoke this method from actionclass after the values required need to be initialized.
prasad guna
Ranch Hand

Joined: Feb 12, 2009
Posts: 43

hi

i already tried this. but my problem is i use multiple check box selection in form its created in dynamically depends on count and bean parameter is String array.At the first time of loading form page user select all multiple check box, then String array carrying all data(correct data) after sometime same page in same session user didn't select any check box but String array keep on previous old data.form bean didn't get reset.

i use multibox in jsp..



bean parameter is



so how can i get real selected data...
prasad guna
Ranch Hand

Joined: Feb 12, 2009
Posts: 43

hi guys

i got it through


thanks to all
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How can i reset the form bean data
 
Similar Threads
how to refresh a jsp page
About resetting button option in jsf page
Form Beans
To: John Carnell, Re: Method Overrides
Should we use ActionForms on the way back?