I'm pretty sure that you can just add it once in Java and multiple times in
the HTML, although I've never pondered the (potential) side-effects of
this.  Give it a shot and let us know how it works for you.  With something
as stateless / simple as a BookmarkablePageLink, there probably couldn't be
much in the way of side-effects, although with very complex, stateful
components, I could see that maybe there would be an issue... (maybe??)
-- 
Jeremy Thomerson
http://www.wickettraining.com


On Thu, Dec 11, 2008 at 3:29 PM, novotny <novo...@gridsphere.org> wrote:

>
>
> Basically I need two of the same links on the page, and it looks like I
> have
> to do this which just seems kinda lame...
>
> add(new BookmarkablePageLink<String>("personaldetails",
> PersonalDetailsPage.class));
> add(new BookmarkablePageLink<String>("personaldetails2",
> PersonalDetailsPage.class));
>
> ....
>
> Click Here
> Profile page
>
>
>
>
>
>
>
> jWeekend wrote:
> >
> > Jason,
> >
> > What are you trying to achieve?
> >
> > Here are some ideas that may give the desired effect, depending on what
> > that is ...
> >
> > 1 - Make a model for your data and give that to all the Label instances
> as
> > required, (but each with their unique id and separate markup).
> > 2 - Use a repeater (like a ListView) to render several labels (no
> > repetition of Java code or markup).
> > 3 - Write a method that takes a model (or just a String) and an id, that
> > returns an appropriately configured Label instance  (saves on repeating
> > Java code - still need markup per component and your own unique ids).
> >
> > Regards - Cemal
> >  http://www.jWeekend.co.uk <http://www.jweekend.co.uk/> jWeekend
> >
> >
> >
> > novotny wrote:
> >>
> >>
> >> I have a simple label "hello" and I want to display it twice in the same
> >> page, but wicket complains the wicket:id needs to be unique in my
> >> page.... what do I need to do, is there an alias or something?
> >>
> >> Thanks, Jason
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/how-to-reuse-a-label-in-the-same-page--tp20964351p20964551.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to