The 'For' component in the Base library on www.t-deli.com does precisely this (by default 'element' is the same as the tag).
See http://www.t-deli.com/base-doc/components/Base.For.html 'For' also combines Foreach and ListEdit and provides the corresponding functionality depending on the context it is in. ----- Original Message ----- From: "Ben Eng" <[EMAIL PROTECTED]> To: "Tapestry users" <[email protected]> Sent: Thursday, April 28, 2005 7:06 PM Subject: automatically set element parameter in Foreach and ListEdit > Components that iterate like Foreach and ListEdit take an element > parameter. Usually, a static-binding is used to set the element; and > it is almost certainly the case that the element will match the tag > in the template, where the component appears. e.g., > > <tr jwcid="@Foreach" ... element="tr"> > > It would be a nice simplification if the element could by default be > inferred. e.g., > > <tr jwcid="@Foreach"> <!-- element="tr" by default --> > > <li jwcid="@Foreach"> <!-- element="li" by default --> > > Similarly, I'd like to apply this pattern for any component that > iterates. > > Ben > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
