You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by ta...@jakarta.apache.org on 2004/08/27 20:02:56 UTC

[Jakarta Tapestry Wiki] New: DuplicateComponentsProposal

   Date: 2004-08-27T11:02:56
   Editor: HowardLewisShip <hl...@apache.org>
   Wiki: Jakarta Tapestry Wiki
   Page: DuplicateComponentsProposal
   URL: http://wiki.apache.org/jakarta-tapestry/DuplicateComponentsProposal

   no comment

New Page:

= Problem Description =

It would be nice to allow the user to reference a component multiple times. This is often the case for simple components (like Insert or !DirectLink) that may be duplicated many times.

Sure, Tapestry supports the {{{copy-of}}} attribute, but ti would be nicer to just allow it.

= Proposed Solution =

Current duplicated component ids in the HTML template are considered errors.

Tapestry should be changed to quietly make a duplicate ... copy the existing component's type and parameters, then overlay with any parameters provided in the HTML template. This would create
a new, distinct component, with a new and unique component id (probably something like {{{mycomponent$0}}}.

Very little downside to this, unless the component performs an expensive operation or stores persistent state, in which case the behavior might not quite match what an (inexperienced?) user would predict.

= Discussion =

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org