I have been developing my own client side validation framework as well
(unfortunately closed sourced and copyright to my employer), but the part
that I have been struggling with is handling the "immediate" attribute of
commandLinks, commandButtons, and such.  For Server side, this is
automatically handled so that validators never get called.  However, on
client-side, the only way I've been able to think about implementing it is
by using a custom renderer for the commandLinks/Buttons so that onclick they
tell the client to not validate.  That, or implement a custom form tag or
renderer that loops through all the commandLinks/Buttons and attaches custom
javascript code to inform the validators to not execute.  I hate both of
those options personally, so just curious if Cagatay's solution has a method
of handling this or if anyone else has any other solutions?

Thanks,
Nick

-----Original Message-----
From: Adam Winer [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 06, 2006 1:41 PM
To: MyFaces Development
Subject: Re: Enabling Client Side Validation

On 6/6/06, Mario Ivankovits <[EMAIL PROTECTED]> wrote:
> Hi Matthias!
> > You mean client/server attribute?
> > this is a no-no (search the mail archive)
> I know about the limitations of its current approach, but I meant to
> extend this library to honor a global flag too.
> I remember Craig isnt against such a flag - I think its just a matter of
> no time.
>
> > To me Cagatay's solution is better.
> So extend Craigs validation solution with such an global configuration
> flag and you are done.

Not Craig's, IIRC;  I thought David Geary did at least the initial work.

Frankly, I find the Shale Validator code rather poor from a variety
of angles.  First, using one Validator class and one JSP tag for all
of the different types is painful for users and tools support.  Second,
supporting "client-only" validation (client=true, server=false) is a bad
idea that should not be copied;  client-side validation should always
be *in addition* to server-side validation.  Third, you should not have
to attach a validator tag to get "required" client-side validation
working;  that should only require setting required="true" on the
component (and setting the global flag to activate client-side validation).
Finally, using a date "validator" for verifying formats of dates is
wrong;  format masks should get checked by Converters, not Validators.

So, I'm -1 for extending any of that codebase.  MyFaces can do much
better.

-- Adam

Reply via email to