[
https://jira.jboss.org/browse/SEAMFACES-37?page=com.atlassian.jira.plugin...
]
Lincoln Baxter III commented on SEAMFACES-37:
---------------------------------------------
On PreValidateComponentEvent --
if component == UIForm, search for validator with same ID as name of form
attach UIFormValidator as child element, and attach validator instance to UIFormValidator
instance.
Unfortunately, this assumes the existance of only 1 FormValidator per form, which is
likely not the case in many scenarios; It encourages breaking separation of concerns
(where now you have only 1 validator handling multiple scenarios per form -- if you do
have multiple scenarios-- and many different combinations of fields that may or may not be
related.This also breaks re-use of FormValidators by hard-binding form field IDs to
validator field names.
There is also the danger of bleeding across views, where a formValidator is created that
"accidentally" becomes attached to another form with the same name on a
different page, or when you want to use the same form-name, but can't because you will
automatically trigger form validation (that would likely fail (forcing you to disable it
in some way, or choose a different name.)
This could also have the undesired effect of attaching validators that are not intended to
be form validators (perhaps validators that were not even defined by the developer
themselves -- e.g.: included in a JAR file.)
Attach a UIFormValidator to a UIForm automatically via name
resolution
----------------------------------------------------------------------
Key: SEAMFACES-37
URL:
https://jira.jboss.org/browse/SEAMFACES-37
Project: Seam Faces
Issue Type: Feature Request
Components: UI Components, Validation & Conversion
Reporter: Lincoln Baxter III
Attach a UIFormValidator to a UIForm via name resolution.
If the name of the form matches the name of the validator, attach the validator to the
form and enable it.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira