Return-Path: Delivered-To: apmail-beehive-user-archive@www.apache.org Received: (qmail 23781 invoked from network); 17 Apr 2008 12:21:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Apr 2008 12:21:06 -0000 Received: (qmail 7398 invoked by uid 500); 17 Apr 2008 12:21:06 -0000 Delivered-To: apmail-beehive-user-archive@beehive.apache.org Received: (qmail 7381 invoked by uid 500); 17 Apr 2008 12:21:06 -0000 Mailing-List: contact user-help@beehive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Beehive Users" Delivered-To: mailing list user@beehive.apache.org Received: (qmail 7370 invoked by uid 99); 17 Apr 2008 12:21:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Apr 2008 05:21:06 -0700 X-ASF-Spam-Status: No, hits=4.5 required=10.0 tests=FRT_TODAY2,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of zuberali@gmail.com designates 209.85.198.243 as permitted sender) Received: from [209.85.198.243] (HELO rv-out-0506.google.com) (209.85.198.243) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Apr 2008 12:20:23 +0000 Received: by rv-out-0506.google.com with SMTP id k29so24474rvb.9 for ; Thu, 17 Apr 2008 05:20:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=cbTRGdXramL2WLMIondEnFIkA+ZOfQm/YtzUfCLJMQQ=; b=XEFYiN/6UU8jEjlodqXgM2Fvu788hHX8GJyGQkbD+CDNpDL6fhZ8veuISUpRxLkUDNLunmWwPVuqco935ROoOfEMGVf3y2tRP60KQShNWwZMnB+Jojnw9uvf2BeDVcSqUcWN/12bmz1HO5nTX4ekbnCixHuZelGlkv1eovC8b5M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=EX7Y9E+9MkOfeooMiBbCVLs1gnzST+o2ZKpsMl7GPecwp3uxbcOKbcz6Z9RKI5oCLy9ew3k9XwWQCYSZU1BrZgKxha6PVR3CeT3jFChgTQcvWR/5u2p60zsipGZ+SmvS36iYQb507kxbB5Y84YcT8AT9YCAW2tjlowBTPD+YFfs= Received: by 10.141.156.19 with SMTP id i19mr694429rvo.57.1208434836228; Thu, 17 Apr 2008 05:20:36 -0700 (PDT) Received: by 10.140.143.2 with HTTP; Thu, 17 Apr 2008 05:20:36 -0700 (PDT) Message-ID: <56ef171b0804170520v3bf5d697oc5a973e371cec5e8@mail.gmail.com> Date: Thu, 17 Apr 2008 17:50:36 +0530 From: "zubair syed" To: "Beehive Users" Subject: Re: Complex Form Bean Validation In-Reply-To: <7d9335c40804170501i55126b3udece8f91d74fe941@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_11984_5478468.1208434836211" References: <7d9335c40804170217o67c3f98ahe84e4a6616d9fc2b@mail.gmail.com> <56ef171b0804170232l5f7e026cneacf6dce6a248e08@mail.gmail.com> <7d9335c40804170241q7233b1aandfda43b48d1fba46@mail.gmail.com> <56ef171b0804170435l1b089f77n3e550c8fd8bddff9@mail.gmail.com> <7d9335c40804170501i55126b3udece8f91d74fe941@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_11984_5478468.1208434836211 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Philip, My aplogy for that , i gave wrong name actual class name is 'BaseActionForm' under the package 'org.apache.beehive.netui.pageflow.internal' Regards, Zuber On 4/17/08, Philipp Jardas wrote: > > Hi Zuber, > > Thanks again for the swift response. However, I am not able to find > the base class "TaggedObject" you mentioned, neither in the Beehive > nor in the Struts libraries. Are you sure about the name? > > Thanks, >

> > > 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 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, > > >

> > > > > > On Thu, Apr 17, 2008 at 11:32 AM, zubair syed > 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 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 > > > > > > > > > > > > > > > ------=_Part_11984_5478468.1208434836211--