99.99% of the time this is an error: a component is referenced
multiple times in markup. Therefore we don't allow one component to be
rendering in multiple places. For that 0.01% of useful cases, it is
not too difficult to just add the label component twice.

Martijn


On Thu, Feb 12, 2009 at 8:54 PM, Phil Grimm <[email protected]> wrote:
> Guys,
>
> If I need to reference a Label multiple times on the page.
> Is there a better way than creating multiple redundant but distinct labels?
>
> Is this the only option?
>
> add(new Label("authorName1"));
> add(new Label("authorName2"));
> add(new Label("authorName3"));
>
> <span wicket:id="authorName1"></span>
> <span wicket:id="authorName2"></span>
> <span wicket:id="authorName3"></span>
>
> This (non-one-to-one) usage...
>
> add(new Label("authorName"));
>
> <span wicket:id="authorName"></span>
> <span wicket:id="authorName"></span>
>
> ... causes error:
>
> WicketMessage: The component [Component id = author.name] has the same
> wicket:id as another component already added at the same level
>
>
> Phil
>
> --
> Phil Grimm
> Mobile: (858) 335-3426
> Skype: philgrimm336
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to