You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2010/10/05 21:53:32 UTC

[jira] Created: (MYFACES-2938) Allow @JSFValidator and @JSFConverter to define custom tagHandler class

Allow @JSFValidator and @JSFConverter to define custom tagHandler class
-----------------------------------------------------------------------

                 Key: MYFACES-2938
                 URL: https://issues.apache.org/jira/browse/MYFACES-2938
             Project: MyFaces Core
          Issue Type: Improvement
          Components: JSR-314
    Affects Versions: 2.0.2
            Reporter: Leonardo Uribe
            Assignee: Leonardo Uribe


Reviewing myfaces commons, it was notice that @JSFValidator and @JSFConverter does not allow to have a custom tagHandler class, but there is one case this could be wanted.

On myfaces commons there exists a base class called org.apache.myfaces.commons.validator.ValidatorBase. This class is necessary to do two things:

1. Allow validators to have ValueBinding/ValueExpression instances that will be evaluated on validation time, not on build view time.
2. Provide utility methods for handle messages.

This works well on jsp, but it does not on facelets, because ValueExpression instances are not mapped calling setValueExpression() method. This is difficult to see because usually for converters and validators does not have properties with EL expressions or usually does not change.

We need to include two changes on myfaces builder plugin:

1. Allow @JSFValidator and @JSFConverter to define custom tagHandler class
2. Add a property to indicate when the base class allow set ValueExpressions calling setValueExpression method, so the template can decide if it calls setValueExpression or evaluate it at construction time,  like evaluateELOnValidation. It could be also wanted to include a new goal for generate converter classes.


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


[jira] Resolved: (MYFACES-2938) Allow @JSFValidator and @JSFConverter to define custom tagHandler class

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-2938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe resolved MYFACES-2938.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.3-SNAPSHOT

> Allow @JSFValidator and @JSFConverter to define custom tagHandler class
> -----------------------------------------------------------------------
>
>                 Key: MYFACES-2938
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2938
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: JSR-314
>    Affects Versions: 2.0.2
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.3-SNAPSHOT
>
>
> Reviewing myfaces commons, it was notice that @JSFValidator and @JSFConverter does not allow to have a custom tagHandler class, but there is one case this could be wanted.
> On myfaces commons there exists a base class called org.apache.myfaces.commons.validator.ValidatorBase. This class is necessary to do two things:
> 1. Allow validators to have ValueBinding/ValueExpression instances that will be evaluated on validation time, not on build view time.
> 2. Provide utility methods for handle messages.
> This works well on jsp, but it does not on facelets, because ValueExpression instances are not mapped calling setValueExpression() method. This is difficult to see because usually for converters and validators does not have properties with EL expressions or usually does not change.
> We need to include two changes on myfaces builder plugin:
> 1. Allow @JSFValidator and @JSFConverter to define custom tagHandler class
> 2. Add a property to indicate when the base class allow set ValueExpressions calling setValueExpression method, so the template can decide if it calls setValueExpression or evaluate it at construction time,  like evaluateELOnValidation. It could be also wanted to include a new goal for generate converter classes.

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