Reputation: 79
i am using strut-2.1.6
I have a view page wich contains the Primary key of the currently viewed record in a hidden field. If i post this page to Save the record and any validation gets faild. i come back on the same page it keeps all other values but lose the hidden field value. Now when try to save it i get null for the primary key value in request parameters.
any help on this will highly be oblighed.
Upvotes: 0
Views: 2212
Reputation: 1975
Do you have both a getter and a setter for this hidden value in your action that performs the validation?
If so, you should be able to set breakpoints in there and make sure the hidden value is both getting pushed into your action, and pulled back out.
Is there any chance this id in the action is getting destroyed either in the validation method, or prepare method if you're using Preparable?
Is the action that gets called to render this page initially the same one that is used for validation?
Upvotes: 1