struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Wallace <rwall...@thewallacepack.net>
Subject [shale] Extending components with new attributes
Date Mon, 06 Mar 2006 22:25:46 GMT
Hello,

I'd like to extend the inputSecret component and give the new component 
an added attribute.  Basically, what I want to do is create a component 
that has the tomahawk equal validator attached to it.  So, what I've got 
now is:

<view>
  <component jsfid="t:validateEqual" 
componentType="org.apache.myfaces.validator.Equal">
    <attributes>
      <set name="for" bindingType="Early" />
    </attributes>
  </component>
 
  <component jsfid="inputPasswordVerification" extends="inputSecret">
    <validator jsfid="t:validateEqual">
      <attributes>
          <set name="for" value="password"/>
      </attributes>
    </validator>
  </component>
</view>

What I'd like to be able to do is replace the attribute for "for" with 
something more like "@for" or something so that I can use the component 
like:

<input type="password" jsfid="inputSecret" id="password" />
<input type="password" jsfid="inputPasswordVerification" for="password" />

Can I add an attribute like that in clay?  That would be very cool.

Thanks,
Rich

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


Mime
View raw message