hi, Malcolm Edgar wrote:
<component id="spacer1" type="Image">
<binding name="image" expression="assets.spacer"/>
</component>
<component id="spacer2" copy-of="spacer1"/>
<context-asset name="imageAsset" path="/images/spacer.png"/>
This question comes up quite often. When the Implicit Components arrive in Tapestry 2.3 this will become a lot easier to do in HTML.
i think it would be a much nicer approach, to have Tapestry automatically perform such duplication of components. eg. I want the designers to be able to add the customer's last name in as many places as they wish to, without someone having to add more copy-of components in the JWC file...
i'm not quit sure why tapestry disallows this at the moment, instead of performing the copy-of automatically... perhaps a component should have an "allow-copy" attribute (just like allow-body, etc).. this way, simple components, eg. Inserts can be reused without pain, but components that affect some logic (eg. Foreach) would be still prevented from being used incorrectly.
best regards,
viktor
-------------------------------------------------------
This SF.net email is sponsored by: ApacheCon, November 18-21 in
Las Vegas (supported by COMDEX), the only Apache event to be
fully supported by the ASF. http://www.apachecon.com
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer
