Fragment can be used... won't reduce your markup, though. ** Martin
2009/2/12 James Carman <[email protected]>: > Use a repeater? > > On Thu, Feb 12, 2009 at 2: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 >> > > --------------------------------------------------------------------- > 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]
