That's a fine point to clarify.

My underlying suggestion wasn't meant to imply which was the correct,
well-defined event to handle. This is the second post ... no luck/help so
far? ... So my suggestion is that, if all else fails, you can do MANUAL
validation in, if nothing else, the MAIN event handler. Again, I didn't mean
to focus on the actual event as much as the ability to MANUALLY validate and
still send back field specific error messages.

To Thiago's point, if taken too literally, yes, the example could be
misleading. But it is a minor point. The login example on the Tapestry
website happens to do AUTHENTICATION in the SUCCESS handler (oddly, as part
of a validation example) - and so it is a nice concrete example to send
around - but lest I am misunderstood, it is the general concept I'm trying
to shed some light on ... not whether it is authentication or validation or
onValidate or onSuccess.

FWIW: since no one posted any response to the poster's original question
(per the poster) and this is the 2nd time he's asked - I assumed that what
he is doing must be out of the ordinary. I do nto know T4 and the fact that
(per the user) 'null' values in the form skipped validation - made me wonder
if the onValidate event was being skipped (as a part of T4).

@Elmer: so conceptually, you could start by implementing this validation
MANUALLY in the MAIN method and work backwards from there. IE: start with
something you KNOW fires and keep moving that logic backwards until you get
it into a true, validation handler if at all possible. It is an iterative,
workable approach eh?

But to Thiago's point, if T4 has specific validation events/handlers and
those fire in all cases - by all means, implement this logic there (dont'
need to start in the main event handler). You can still follow the general
logic/structure of the authentication example I linked to.

Please excuse the rambling here ... hope the clarification was helpful.

-Luther



On Mon, Mar 9, 2009 at 12:15 PM, Thiago H. de Paula Figueiredo <
thiag...@gmail.com> wrote:

> Em Mon, 09 Mar 2009 14:08:43 -0300, Luther Baker <lutherba...@gmail.com>
> escreveu:
>
>  Oddly enough, it is NOT the validation handler I want to bring to your
>> attention to (here on this validation.html page :) and again, obviously,
>> this is Tapestry 5 - but notice how authentication is done in the SUCCESS
>> handler.
>>
>
> Authentication is not validation. They're different things. Authentication
> is made at onSuccess() because it is only made after the form validation (ie
> the values of login and password are valid for that field). And you should
> do validation at onValidate().
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to