You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org> on 2010/03/21 15:22:27 UTC

[jira] Commented: (TOMAHAWK-1497) New component: ValidateBeanBehavior

    [ https://issues.apache.org/jira/browse/TOMAHAWK-1497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12847924#action_12847924 ] 

Jakob Korherr commented on TOMAHAWK-1497:
-----------------------------------------

I think this is really cool and should be added to the sandbox and after more progress also to tomahawk!

Also the description of tomahawk sandbox says: "The sandbox is a MyFaces subproject that is a testing ground for potential new additions to the Tomahawk project". So this is exactly the place where this should be put.

> New component: ValidateBeanBehavior
> -----------------------------------
>
>                 Key: TOMAHAWK-1497
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1497
>             Project: MyFaces Tomahawk
>          Issue Type: New Feature
>         Environment: *
>            Reporter: Jan-Kees van Andel
>            Assignee: Jan-Kees van Andel
>
> I've been playing with Bean Validation and JSF2 ClientBehavior. I've written a simple ClientBehavior which renders JavaScript validations, based on the Bean Validation constraints.
> The developer only needs to nest a <s:validateBean /> into a UICommand component and the Behavior renders the necessary JavaScript.
> As I said, it's a start. It currently only supports some validations:
> - JSF required attribute.
> - Numeric and date formats, based on how the converter is configured (i.e. a pattern like: "dd-MM-yyyy").
> - Bean Validation @NotNull, @Min, @Max and @Future.
> It should be usable in Mojarra, since I simply copied the MyFaces dependencies to the component (ExternalSpecifications.java, FacesMessageInterpolator.java and the other Bean Validation related classes).
> It still needs some work (like supporting other annotations, and more datestyle patterns), but it's a start.
> So I was thinking about committing it into the Sandbox, under: http://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/core20/
> I think this concept (when the implementation is ready) is really powerful and a nice addition to the project.
> I've written two blog articles where I give a little overview:
> http://blog.smart-java.nl/blog/index.php/2010/03/17/jsf-2-0-clientbehavior-bean-validation-in-javascript/
> http://blog.smart-java.nl/blog/index.php/2010/03/19/jsf-2-0-clientbehavior-first-impressions/
> When done Mavenizing, I'll add an attachment with all source code.
> What do you guys think? Should we add it to the project?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.