Should I open a JIRA for this, or is this an accepted side-effect? Scott
On Thu, Mar 26, 2009 at 2:39 PM, Scott Swank <[email protected]> wrote: > Surprisingly getDebugSettings().setComponentUseCheck(false) allows > this behavior, at least on 1.3. > > add(new Label("authorName")); > > <span wicket:id="authorName"></span> > <span wicket:id="authorName"></span> > > ... not that I'm advocating this side effect. > > Scott > > > On Fri, Feb 13, 2009 at 10:26 AM, Igor Vaynberg <[email protected]> > wrote: >> not to mention it doesnt make sense for a lot of usecases, eg >> setoutputmarkupid() if you call it then the two rendered components >> will have the same markup id - whoops. which means this will break >> javascript, ajax, etc, etc. >> >> -igor >> >> On Fri, Feb 13, 2009 at 2:59 AM, Martijn Dashorst >> <[email protected]> wrote: >>> 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] >>> >>> >> >> --------------------------------------------------------------------- >> 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]
