You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ryan Wynn <bi...@gmail.com> on 2006/01/12 21:31:34 UTC

[shale] clay renderId

Can the renderId of a component be less than 1?  I have built parent
components that reference child components.  These parent components
are meant to be extended to add more child components.  What I would
like is to have the base parent components reference their child as
say renderId=-1 and renderId=0, so that when extended renderId will
always start at 1.  Currently, extending my parents requires the
extender to start at say renderId=2 because parent already references
some children.

For example (may already be supported)

<component jsfid="parent">
  <element renderId="-1" id="a"/>
  <element renderId="0" id="b"/>
</component>

<component jsfid="child" extends="parent">
  <element renderId="1" id="c"/>
</component>

resulting a child component with children ordered a, b, c.

The reason for this is usability and not having to document where to
begin renderId for each descendant.