Thank you, Igor.

I have now looked into extending Link, but overriding onComponentTagBody the
way that Label does is not possible. Link declares it final.

For now I'll just add a Label inside, like you suggested.

Karl-Erik


On 01-03-06 17:03, "Igor Vaynberg" <[EMAIL PROTECTED]> wrote:

> link is a generic link container that can wrap anything. so no, there is no
> direct way to do it unless you are using ExternalLink.
> 
> you would have to do:
> Link link=new Link("link")....
> link.add(new Label("lbl"......
> 
> and in your markup
> <a href="#" wicket:id="link"><span wicket:id="lbl">my link</span></a>
> 
> if you want you are free to create a simple subclass of link that does this
> for you using replaceComponentTagBody(), see Label for details.
> 
> -Igor
> 
> 
> On 3/1/06, Riyad Kalla <[EMAIL PROTECTED]> wrote:
>> I think you can add a Label to the link and it will render... but I'm
>> not a wicket guru, just an interested 3rd party :)
>> 
>> Karl-Erik Rønsen wrote:
>>> I am creating tabs that should get their titles generated by code. What's
>>> the best way to set the link text?
>>> 
>>> I am new to Wicket, but so far i really enjoy the way that Java and HTML
>>> work together with this framework.
>>> 
>>> Thanks,
>>> Karl-Erik
>>> 





-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to