You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Andrew Robinson <an...@gmail.com> on 2006/06/13 15:29:30 UTC

OT: jsf-comp OptionalValidation

I was looking into the code of the optional validator, and was
wondering if it would be much better placed in JDK 1.5. Instead of
creating "optionalValidator" tags with embedded validator IDs, it
could use JDK 1.5 proxy classes as Validator and StateHolder are
interfaces.

Then, the proxy could catch all ValidationExceptions from validators
and do what it needs to do. The developer would not need to change
their view code at all. With facelets it should be relatively easy to
build a tag handler that would create the proxy from the real
validator.

Just an idea

-Andrew

Re: OT: jsf-comp OptionalValidation

Posted by Jeff Bischoff <jb...@klkurz.com>.
Could be a neat idea for an optionalValidator2 :)

Andrew Robinson wrote:
> I was looking into the code of the optional validator, and was
> wondering if it would be much better placed in JDK 1.5. Instead of
> creating "optionalValidator" tags with embedded validator IDs, it
> could use JDK 1.5 proxy classes as Validator and StateHolder are
> interfaces.
> 
> Then, the proxy could catch all ValidationExceptions from validators
> and do what it needs to do. The developer would not need to change
> their view code at all. With facelets it should be relatively easy to
> build a tag handler that would create the proxy from the real
> validator.
> 
> Just an idea
> 
> -Andrew
> 
> 
> 



RE: jsf-comp OptionalValidation

Posted by Julian Ray <ju...@yahoo.com>.
What is the scope for your backing bean? It probably needs to be request
otherwise it will only be craeted once. Also, how are you calling the method
which creates the view components? If you call it in the constructor it will
get built too early so you need to find some way to build the components on
the page. With the panel grid I found that the best time to call is when the
panel grid is requesting some other value such as the number of columns. 



-----Original Message-----
From: Andrew Robinson [mailto:andrew.rw.robinson@gmail.com] 
Sent: Tuesday, June 13, 2006 9:30 AM
To: MyFaces Discussion
Subject: OT: jsf-comp OptionalValidation

I was looking into the code of the optional validator, and was wondering if
it would be much better placed in JDK 1.5. Instead of creating
"optionalValidator" tags with embedded validator IDs, it could use JDK 1.5
proxy classes as Validator and StateHolder are interfaces.

Then, the proxy could catch all ValidationExceptions from validators and do
what it needs to do. The developer would not need to change their view code
at all. With facelets it should be relatively easy to build a tag handler
that would create the proxy from the real validator.

Just an idea

-Andrew