beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djkuul <>
Subject Re: What should happen- @ValidateRequired(enabled=false) ??
Date Mon, 21 Apr 2008 19:28:07 GMT

The exact situation is as follows-
1. The jsp has two user actions-
        i Continue with validations
        ii Continue without validations
        Both the above Continue user actions map to the same action method.
2. The action method is decorated with appropriate validation annotations.
3. Now the problem is to apply the validation annotations on one user action
and not apply them on another user action. We can have a boolean in the form
bean to be set from the jsp to decide if the validations have to be applied
or not.

There are other simple solutions for this problem but I thought the obvious
one using beehive was the one I have mentioned in my first post....

Has anybody encountered this situation before? Has anybody used the enabled
property of the Jpf validation annotations?

djkuul wrote:
> I am using the following annotation for validation on an Action method-
> validatableProperties={ 
> @Jpf.ValidatableProperty( 
> displayName = "User Name ",
> propertyName = "username",
> validateRequired= @ValidateRequired(enabled=false))
> }
> If enabled is set to false, then the validate required rule should not be
> applied but in this case the validate required rule IS Applied... WHY??
> I want to do conditional validation, and hence am using the enabled =
> false. Going ahead I want to substitute the value of enabled with a
> runtime expression depending upon whether the validation has to be done or
> not(decided on the jsp). Any ideas?
> Appreciate any help, Thanks!

View this message in context:
Sent from the Beehive - Dev mailing list archive at

View raw message