Re: [Stripes-users] [Stripes-User] validation

Subject:   Re: [Stripes-users] [Stripes-User] validation (find more)
From:  
Date:   Oct 06, 2005 15:42


Return-Path: <hidden>
Received: from cmcc5-dfe.broad.mit.edu ([18.103.15.238])
 by esc49.midphase.com with esmtpa (Exim 4.44)
 id 1ENbbh-0005JG-2m
 for hidden; Thu, 06 Oct 2005 15:40:45 -0400
Message-Id: <hidden>
Date: Thu, 6 Oct 2005 15:42:08 -0400
From: Tim Fennell <hidden>
Reply-To: hidden
Sender: hidden
To: hidden
Subject: Re: [Stripes-users] [Stripes-User] validation
In-Reply-To: <hidden>
Errors-To: hidden
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Original-To: hidden
Delivered-To: hidden
References: <hidden> <hidden> <hidden>
X-Mailer: Apple Mail (2.734)
Received-SPF: unknown (socket error)
X-AntiAbuse: Sender Address Domain - tfenne.com
X-Source:
X-Source-Args:
X-Source-Dir:
X-Spam-Score: 0.1 (/)
X-Spam-Report: Spam Filtering performed by sourceforge.net.
 See http://spamassassin.org/tag/ for more details.
 Report problems to http://sf.net/tracker/?func=add&group_id=1&atid=200001
 0.0 SF_CHICKENPOX_PERIOD   BODY: Text interparsed with .
 0.0 SF_CHICKENPOX_SLASH    BODY: Text interparsed with /
 0.0 SF_CHICKENPOX_MINUS    BODY: Text interparsed with -
 0.0 SF_CHICKENPOX_AT       BODY: Text interparsed with @
 0.0 SF_CHICKENPOX_APOSTROPHE BODY: Text interparsed with '
X-BeenThere: hidden
X-Mailman-Version: 2.0.9-sf.net
Precedence: bulk
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/stripes-users&gt;,
 <mailto:hidden?subject=unsubscribe>
List-Id: A list for dicussing building applications with Stripes. <stripes-users.lists.sourceforge.net>
List-Post: <mailto:hidden>
List-Help: <mailto:hidden?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/stripes-users&gt;,
 <mailto:hidden?subject=subscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum=stripes-users>
Status:

I'm not sure I fully understand your objection.  Stripes is setup to  
follow the most common flow by default.  It seems to me that nine  
times out of ten, if the user didn't enter validly formatted data  
(e.g. inserted abc for a number or date) then I probably want to  
straighten that out before executing an business validation logic.   
The goal being to keep the validate() method simple so that you don't  
have to check for existing errors, or do null-checks on required fields.

> Right, If I return null, my event handler will not be called. If I
> return a resolution, my event handler will not be called either. I can
> call it manually from validation handler. To do that I need to know
> which handler to call. How can I get this info?
I don't understand what you mean by this.  Are we talking about  
entering things into the browser and triggering events, or about what  
to do after an event is handled?  I'd like to be able to answer this  
better, but I get the feeling that I'm missing something important in  
what you're trying to do.

-t

On Oct 6, 2005, at 3:28 PM, Michael Jouravlev wrote:

> Right, If I return null, my event handler will not be called. If I
> return a resolution, my event handler will not be called either. I can
> call it manually from validation handler. To do that I need to know
> which handler to call. How can I get this info?
>
> I would prefer not to implement another interface. It is so easy:
> event is generated -> handler is called. I hate default processing.
> But I digress.
>
> Michael.
>
> On 10/6/05, Greg Hinkle <hidden> wrote:
>
>> You can implement the ValidationErrorHandler interface to be alerted
>> to errors in the included validations.
>>
>> http://stripes.sourceforge.net/docs/1.0/javadoc/net/sourceforge/
>> stripes/validation/ValidationErrorHandler.html
>>
>>  From there, you can update/add and errors you wish, return a special
>> resolution if needed, or remove the errors and continue to the
>> handler. Returning null will continue the default action of
>> forwarding to the previous view (the form jsp page for example),
>> supporting the redisplay of entered fields and and validation error
>> messages/formatting setup.
>>
>> On Oct 6, 2005, at 2:16 PM, Michael Jouravlev wrote:
>>
>>
>>> From http://stripes.sourceforge.net/docs/1.0/javadoc/net/
>>> sourceforge/stripes/validation/Validatable.html
>>>
>>> "By the time the validate() method is invoked Stripes has already
>>> performed all Annotated validations and has converted and bound
>>> properties from the HttpServletRequest on to the ActionBean. If
>>> validation errors arose from the annotated validation, the  
>>> validate()
>>> method will not be called (nor will the handler method)."
>>>
>>> It really sucks that handler is not called if errors arose from the
>>> annotated validation. I would like to have full control over  
>>> request,
>>> and to process event manually.
>>>
>>> Michael.
>>>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads,  
> discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Stripes-users mailing list
> hidden
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Stripes-users mailing list
hidden
https://lists.sourceforge.net/lists/listinfo/stripes-users