Hello all,

I'm trying to use the tomahawk validator for making sure two fields have the same value for users entering their password. There isn't a definition in the clay-config.xml in the Shale or MyFaces JIRA tickets so I'm trying to create one. So I went ahead and created one:

 <component jsfid="t:validateEqual" componentType="???">
     <attributes>
       <set name="for" bindingType="Early" />
     </attributes>
 </component>

I wasn't sure what to use for the componentType attribute of the component.

I thought I'd try setting the componentType to the fully qualified class name of the component itself, e.g org.apache.myfaces.custom.equalvalidator.EqualValidator. But that doesn't work. It blows up with the following exception:

2006-02-14 15:24:21,630 14340 ERROR [http-8443-Processor25] org.apache.shale.clay.component.chain.CreateValidatorCommand (CreateValidatorCommand.java:90) - Cannot create validator jsfid="t:validateEqual" componentType="org.apache.myfaces.custom.equalvalidator.EqualValidator" extends="t:validateEqual" allowBody="null" facetName="null" javax.faces.FacesException: Unknown validator id 'org.apache.myfaces.custom.equalvalidator.EqualValidator'. at org.apache.myfaces.application.ApplicationImpl.createValidator(ApplicationImpl.java:621) at org.apache.shale.clay.component.chain.CreateValidatorCommand.execute(CreateValidatorCommand.java:87) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:166)

The usage of the validator is simply:

 <component jsfid="inputPassword" extends="panelGroup">
   <element renderId="0" jsfid="outputLabel">
     <attributes>
       <set name="for" value="password" />
       <set name="value" value="Password" />
     </attributes>
   </element>
   <element renderId="1" jsfid="inputSecret">
     <attributes>
       <set name="id" value="password" />
<set name="value" value="[EMAIL PROTECTED]" />
       <set name="size" value="15" />
       <set name="maxlength" value="15" />
       <set name="required" value="true" />
     </attributes>
   </element>
   <element renderId="2" jsfid="inputSecret">
     <attributes>
       <set name="id" value="password2" />
       <set name="size" value="15" />
       <set name="maxlength" value="15" />
       <set name="required" value="true" />
     </attributes>
     <validator jsfid="t:validateEqual">
       <attributes>
         <set name="for" value="password" />
       </attributes>
     </validator>
   </element>
 </component>

What am I missing? I mean, obviously I'm setting the componentType to the wrong thing, but can someone give me a clue what it should be?

Thanks,
Rich

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to