>From: "Stefano Panero" <[EMAIL PROTECTED]> >Hi, > >is it possible to use shale validation framework in a myfaces - tomahawk - >facelets application? >
One thing to beware of when you create the facelets definition for this validator is that the tag attributes don't match the component attributes [1]. >I can use shale tags? And shale declarative xml validation? > You can use shale validator with tomahawk but the sandbox tomahawk code base introduces partial page rendering that doesn't play nicely with shale commons validator [2]. Validators don't participate in page rendering so shale's validator plays some tricks to add behavior to the components renderers. We wrapper the component's renderer. This doesn't work with the new tomahawk PPR because it hides the interface implemented by renderers that support PPR. In the current JSF API 1.x, there is not a pluggable way to make validators (client-side) that work with all components. Besides the need to capture state at render time, there is not a standardized mechanism to deliver client script. As much as I like Shale's integration with commons validator, you are better off using validators offered by a component library that provides client-side validation. Shale solution *tries* to add client-side validation that will work with any component library but I don't think this is available between component libraries. Trinidad offers a pretty slick solution for client-side validator support but you couldn't use one of these validators with a tomahawk component. I believe the standardization of script/resource delivery is on the plate for JSF 2.0. [1] https://issues.apache.org/struts/browse/SHALE-441 [2] https://issues.apache.org/struts/browse/SHALE-303 >If I can't / won't use shale, I can directly and in simple way integrate >Apache Commons Validation? > > >Is anybody doing something like that? > >My bosses are really worried about client-side validation in jsf... > >Thank you all! Gary

