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

problem with struts checkboxes

 
Anitha Kuchana
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using struts my check boxes are in list .that listed values are iterate in my JAVA SERVER PAGE .That check boxes are displayed.My jsp page having two text fileds and this check boxes are there.at that time i am not giving the text box values but i gave the check box values after submission ,there is a struts error message came but my check box values are not saved is there any solution to over come this problem in struts.when i gave all the values i submitted successfully in database. what ever we checked the check box values after getting the we getting error message that check box values are saved.please any one help me.
 
Swastik Dey
Rancher
Posts: 1625
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, what I understood is when you enter all the details and submit, everything works fine. But when yo don't enter text field values it generates an error. Could we show the part of the code, that retrieves the values and stores in database.
 
Anitha Kuchana
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my problem is not with text filed .It is problem with check box .I detected error message in my jsp page at that time what ever i checked before that values are unchecked.i think now you understand my problem.please help me!
 
Swastik Dey
Rancher
Posts: 1625
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean your text box values are saved, but check box values are not saved in database even if check the check boxes?
 
Anitha Kuchana
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in my jsp page two text box and three check boxes are there.when not given values for text boxes but i checked the check box values then i submit at that time check box values are unchecked at that time there is a validation error message came.After submit also what ever i checked that checked values are appear .
 
Swastik Dey
Rancher
Posts: 1625
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, let me clarify it one more time. You don't enter any values in text box, you check the check boxes, you submit the form and it shows validation error. After this when you are coming back to the first page, you find the check boxes are unchecked. Is this the case?
 
Anitha Kuchana
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes..can please tell me why that is happening.
 
Swastik Dey
Rancher
Posts: 1625
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe it's natural to happen, unless check box values are persisted in scoped variables.
 
Anitha Kuchana
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to solve this problem in struts
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic