Yariel Ramos Moreno wrote:
Hi all:
I have a LookupDispatchAction which can be submitted by two buttons (Update and
Restore). I need to validate this form only when Update button is pressed. The
form field to validate is required and most be integer. The required condition
works fine, using the requiredIf validation with a hidden field to check the
pressed button (ask for the pressed button and if the value is 1 (Update) then
validate, else (value 2 for Restore) don't do anything). If the value in the
field is not an integer, the validator framework triggers an exception no
matter which button were pressed.
What can I do to make this validation using the validator framework?
What exception is triggered? What does the form bean look like? I'm
guessing that you have a form property declared as 'integer' and the
exception is occurring when you have non-integer input. In that case,
try changing for form bean property to String.
If that's not it, post the relevant snippets of configuration, including
your form bean declaration and implementation, your validation rules and
relevant JSP code.
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]