struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hermod Opstvedt <her...@opstvedt.com>
Subject SV: [shale] Clay component definition for t:validateEqual
Date Tue, 14 Feb 2006 22:46:00 GMT
Hi

I checked and it is supposed to be: org.apache.myfaces.validator.Equal 

This is the ID of the tag.

Hermod


-----Opprinnelig melding-----
Fra: Hermod Opstvedt [mailto:hermod@opstvedt.com] 
Sendt: 14. februar 2006 23:40
Til: 'Struts Users Mailing List'
Emne: SV: [shale] Clay component definition for t:validateEqual

Hi

Have you tried to set as pr. the tomahawk.tld : 

org.apache.myfaces.custom.equalvalidator.ValidateEqual

Hermod

-----Opprinnelig melding-----
Fra: Richard Wallace [mailto:rwallace@thewallacepack.net] 
Sendt: 14. februar 2006 23:27
Til: Struts Users Mailing List
Emne: [shale] Clay component definition for t:validateEqual

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(ApplicationIm
pl.java:621)
        at 
org.apache.shale.clay.component.chain.CreateValidatorCommand.execute(CreateV
alidatorCommand.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="#{@managed-bean-name.customerInformation.password}" />
        <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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message