Hi Philipp,
I am not sure if this is correct way to do but you can do that by creating a
bean class by extending 'TaggedObject' class it has validate method which
you can override .
Hope this will help you.
Regards,
Zuber
On 4/17/08, Philipp Jardas <[EMAIL PROTECTED]> wrote:
>
> Hi Zuber,
>
> thanks for your reply, though it didn't catch what I was thinking of.
> I am, of course, aware of the property annotations. Let me give an
> example of what I want to do:
>
> public class TestForm {
> public long getA() { ... }
> public long getB() { ... }
>
> public void validate() {
> if (getA() > 3 && getB() < 4) {
> // Add error message to B: "Must be smaller than 4 if A is
> greater than 3".
> }
>
> // even more complex validation scenarios...
> }
> }
>
> How could I possibly do this with annotations that always refer to a
> single property?
>
> Thanks,
> <P>
>
> On Thu, Apr 17, 2008 at 11:32 AM, zubair syed <[EMAIL PROTECTED]> wrote:
> > Hi Philip ,
> >
> > You can do this my putting validateProperty anotation of every getter
> of the
> > property.
> >
> > for ex:
> >
> > @Jpf.ValidatableProperty(validateMaxLength =
> @Jpf.ValidateMaxLength(chars =
> > 20, messageKey = "error message you can set"), validateMinLength =
> > @Jpf.ValidateMinLength(messageKey = "errror message you can set ",
> chars =
> > 5))
> > public String getUser_id(){
> > return user_id;
> > }
> >
> > You can also get help from beehive documentation . Hope this will help
> you.
> >
> > Regards,
> > Zuber
> >
> >
> >
> >
> >
> >
> > On 4/17/08, Philipp Jardas <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi everyone,
> > >
> > > I hope you might be able to help me with this issue. I want a form
> > > bean to perform more complex validation than what is possible with
> the
> > > property annotations. Think "if property A has the value X then
> > > property B must not be greater than Y".
> > >
> > > In Struts I would simply override the validate method. How do I do
> > > this in Beehive?
> > >
> > > Thanks for your help,
> > > Philipp
> > >
> >
>