You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Matt Benson (JIRA)" <de...@myfaces.apache.org> on 2011/08/03 23:55:27 UTC

[jira] [Created] (MYFACES-3259) Custom Validator tag attributes are not configured when used with default tag handler in wrapping mode

Custom Validator tag attributes are not configured when used with default tag handler in wrapping mode
------------------------------------------------------------------------------------------------------

                 Key: MYFACES-3259
                 URL: https://issues.apache.org/jira/browse/MYFACES-3259
             Project: MyFaces Core
          Issue Type: Bug
            Reporter: Matt Benson


demo forthcoming; it would seem the FaceletCompositionContext would need to keep track of the delegate as well as the id of enclosing validators in order to be able to apply the xml attributes.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (MYFACES-3259) Custom Validator tag attributes are not configured when used with default tag handler in wrapping mode

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

Leonardo Uribe commented on MYFACES-3259:
-----------------------------------------

In theory the behavior of <f:validateBean> related to allow wrap input components is unique, compared to other validators. There is no description on any part of the spec about validators or other attached objects different to <f:validateBean> or <f:ajax> that supports "wrap" mode. 

By some coincidence the example proposed here works on Mojarra, but I have to note according to the spec this is not intentional.

>From other point of view, it has sense to support this. I think this should be reported to the EG and then propose a solution on MyFaces. Unfortunately, it is necessary to change some internal code and that will take some time. 




> Custom Validator tag attributes are not configured when used with default tag handler in wrapping mode
> ------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-3259
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3259
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Matt Benson
>         Attachments: MYFACES-3259.tar.gz, MYFACES-3259.tar.gz
>
>
> demo forthcoming; it would seem the FaceletCompositionContext would need to keep track of the delegate as well as the id of enclosing validators in order to be able to apply the xml attributes.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (MYFACES-3259) Custom Validator tag attributes are not configured when used with default tag handler in wrapping mode

Posted by "Matt Benson (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13084423#comment-13084423 ] 

Matt Benson commented on MYFACES-3259:
--------------------------------------

Thanks for the attention, Leo.  I agree that this wasn't covered in the spec.  I'll reread those sections and file an issue.

> Custom Validator tag attributes are not configured when used with default tag handler in wrapping mode
> ------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-3259
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3259
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Matt Benson
>         Attachments: MYFACES-3259.tar.gz, MYFACES-3259.tar.gz
>
>
> demo forthcoming; it would seem the FaceletCompositionContext would need to keep track of the delegate as well as the id of enclosing validators in order to be able to apply the xml attributes.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (MYFACES-3259) Custom Validator tag attributes are not configured when used with default tag handler in wrapping mode

Posted by "Matt Benson (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13085953#comment-13085953 ] 

Matt Benson commented on MYFACES-3259:
--------------------------------------

How can I help?

> Custom Validator tag attributes are not configured when used with default tag handler in wrapping mode
> ------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-3259
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3259
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Matt Benson
>         Attachments: MYFACES-3259.tar.gz, MYFACES-3259.tar.gz
>
>
> demo forthcoming; it would seem the FaceletCompositionContext would need to keep track of the delegate as well as the id of enclosing validators in order to be able to apply the xml attributes.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (MYFACES-3259) Custom Validator tag attributes are not configured when used with default tag handler in wrapping mode

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

Leonardo Uribe commented on MYFACES-3259:
-----------------------------------------

In theory there is no reason why this could not be added. I have a patch for this one but it requires more testing, because it supposed to do some critical changes.

> Custom Validator tag attributes are not configured when used with default tag handler in wrapping mode
> ------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-3259
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3259
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Matt Benson
>         Attachments: MYFACES-3259.tar.gz, MYFACES-3259.tar.gz
>
>
> demo forthcoming; it would seem the FaceletCompositionContext would need to keep track of the delegate as well as the id of enclosing validators in order to be able to apply the xml attributes.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (MYFACES-3259) Custom Validator tag attributes are not configured when used with default tag handler in wrapping mode

Posted by "Leonardo Uribe (Commented) (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13138034#comment-13138034 ] 

Leonardo Uribe commented on MYFACES-3259:
-----------------------------------------

I checked again the solution proposed and now I'm sure this is the way to go. In theory if a composite component class implements EditableValueHolder should not allow f:validateBean to take effect inside its body, but if that so, it is not expected any other UIInput component should be into its body. f:validateBean is very special, but it has some problems like the one described in MYFACES-2528 that suggest the only way to fix them is create a validator that extends from BeanValidator, but it should work the same.

Composite components usually are used to group components and "derive" more components. f:validateBean is used to fill the gap between JSF and JSR-303 bean validation, so really it try to "decouple" validation and move it from the view to the managed beans. It works as a "controller" for validation, so apply it across composite components does not cause any problem at all, because at the end the validation rules are on the managed beans. In f:ajax case, it is clear the client behavior applies to the composite component, not to the content.

For other specific validators that does not has a similar intention like f:validateBean should not use wrap mode. But it is not really necessary to enforce that condition, instead, this should be let to the developer of such validator, but the jsf implementation should just allow it.

If no objections I'll commit the proposed patch soon.
                
> Custom Validator tag attributes are not configured when used with default tag handler in wrapping mode
> ------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-3259
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3259
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Matt Benson
>            Assignee: Leonardo Uribe
>         Attachments: MYFACES-3259-1.patch, MYFACES-3259.tar.gz, MYFACES-3259.tar.gz
>
>
> demo forthcoming; it would seem the FaceletCompositionContext would need to keep track of the delegate as well as the id of enclosing validators in order to be able to apply the xml attributes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (MYFACES-3259) Custom Validator tag attributes are not configured when used with default tag handler in wrapping mode

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

Leonardo Uribe resolved MYFACES-3259.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.4
                   2.0.10
    
> Custom Validator tag attributes are not configured when used with default tag handler in wrapping mode
> ------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-3259
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3259
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Matt Benson
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.10, 2.1.4
>
>         Attachments: MYFACES-3259-1.patch, MYFACES-3259.tar.gz, MYFACES-3259.tar.gz
>
>
> demo forthcoming; it would seem the FaceletCompositionContext would need to keep track of the delegate as well as the id of enclosing validators in order to be able to apply the xml attributes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (MYFACES-3259) Custom Validator tag attributes are not configured when used with default tag handler in wrapping mode

Posted by "Matt Benson (Commented) (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13138046#comment-13138046 ] 

Matt Benson commented on MYFACES-3259:
--------------------------------------

Thanks for all the attention to this, Leo!
                
> Custom Validator tag attributes are not configured when used with default tag handler in wrapping mode
> ------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-3259
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3259
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Matt Benson
>            Assignee: Leonardo Uribe
>         Attachments: MYFACES-3259-1.patch, MYFACES-3259.tar.gz, MYFACES-3259.tar.gz
>
>
> demo forthcoming; it would seem the FaceletCompositionContext would need to keep track of the delegate as well as the id of enclosing validators in order to be able to apply the xml attributes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (MYFACES-3259) Custom Validator tag attributes are not configured when used with default tag handler in wrapping mode

Posted by "Matt Benson (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13085924#comment-13085924 ] 

Matt Benson commented on MYFACES-3259:
--------------------------------------

Filed http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1033 .

In the meantime, is there any reason MyFaces should not support this functionality on an implementation-specific basis?

> Custom Validator tag attributes are not configured when used with default tag handler in wrapping mode
> ------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-3259
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3259
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Matt Benson
>         Attachments: MYFACES-3259.tar.gz, MYFACES-3259.tar.gz
>
>
> demo forthcoming; it would seem the FaceletCompositionContext would need to keep track of the delegate as well as the id of enclosing validators in order to be able to apply the xml attributes.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (MYFACES-3259) Custom Validator tag attributes are not configured when used with default tag handler in wrapping mode

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

Leonardo Uribe commented on MYFACES-3259:
-----------------------------------------

This is what I have so far. The solution works but looking more carefully this change should follow the same rules as f:ajax. For example, f:ajax does not "pass" through composite components, but "pass" over anything else. The strange thing here is f:validateBean does not have that obvious restriction (but maybe that restriction does not apply after all). I still don't know what to do in this case. What we need here is have some examples about what should work and what shouldn't work, and then implement something according to that.

> Custom Validator tag attributes are not configured when used with default tag handler in wrapping mode
> ------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-3259
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3259
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Matt Benson
>         Attachments: MYFACES-3259-1.patch, MYFACES-3259.tar.gz, MYFACES-3259.tar.gz
>
>
> demo forthcoming; it would seem the FaceletCompositionContext would need to keep track of the delegate as well as the id of enclosing validators in order to be able to apply the xml attributes.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira