Originally posted by ashish kulkarni:
Hi,
I have 2 buttons on one jsp, one is submit button and
the other is back. I want to use only one action form
to handle both the events, I am using
DynaValidatorForm.
So the problem i amfacing is, the fields get validated
even if i press the back button,
Is there a way to make sure that the validation occurs
only when i press submit button
Since you are saying you are using one jsp, I will assume both buttons are on the same form and therefore submitting to the same action.
Set validation to false in your
struts config file. In the action that is called, determine which button was pressed to submit the form. Depending on which button was pressed, manually call the form's validate method or use a validator class if appropriate.
[ December 31, 2002: Message edited by: Jason Menard ]