You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Richard Wallace <rw...@thewallacepack.net> on 2006/03/06 23:25:46 UTC

[shale] Extending components with new attributes

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