[
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