Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

[shale] Extending components with new attributes

Richard Wallace

2006-03-06


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 "@(protected)
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@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.