>>That's not exactly correct.  A componnet can contain any number of
>>validators but the "jsfid" has to be unique.  This has more to do with how 
>>inheritance is
>>resolved. One component definition can extend another inheriting validators.  
>>You can
>>add or override validators in the sub component definition by "jsfid".
>>
>>However, are you saying that "validator*," will not support multiple
>>validators?
>>
>-------
>No, I am considering the case where we generate this off a jsf dtd. There
>can only be one Validator defined in it.
>
>As mentioned in https://issues.apache.org/struts/browse/SHALE-402 I have
>generated a clay-config file for the IBM JSF components in WAS 6.1.
>
>There the Validator is defined as:
><validator>
>  <validator-class>
>    com.ibm.faces.taglib.JWLTagLibraryValidator
>  </validator-class>
></validator>
>

That's a JSP validator versus a JSF validator?  Clay's doesn't have a JSP 
validator parallel to make sure that you don't add an actionListener to a 
label. 


>
>So back to my original question regarding the dtd and the Validator
>definition - Do we both alter the dtd to support this case where we add the
>validator as an attribute to the component definition:
>
><component jsfid="hx:commandExButton"
>componentType="com.ibm.faces.HtmlCommandExButton"
>validator="com.ibm.faces.taglib.JWLTagLibraryValidator"
>extends="baseComponent">
>

I don't think we should try to use a JSP validator to validate the correctness 
of our XML configuration.
JSF validators are registered in the faces-config and some have JSP tags that 
should extend ValidatorTag.

http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/webapp/ValidatorTag.java?view=log


>
>And also support validator as an attribute (Set) ?

The "validator" in the "set" is for the standard method binding versus a nested 
validator.
Components that implement EditableValueHolder can bind a validator callback 
method in a managed bean.

<set name="validator" value="#{mybean.validateSSN}" />

class MyBean

public void validateSSN(FacesContext context, UIComponent component, Object 
value) 


Gary

Reply via email to