Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can i reset the form bean data

 
prasad guna
Ranch Hand
Posts: 46
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Dawn Charangat
Ranch Hand
Posts: 249
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 46
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 46
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys

i got it through


thanks to all
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic