The problem is that you want the link to appear within the localized message, right? The easy way is to split the localized message into 3 parts: a localized part before the link, a localized link label and a localized part after the link. This is a little cumbersome but works without much hassle.

If you need this a lot, you could write a component that parses the localized string to generate it's own markup (replace all {myLink} with <a wicket:id="myLink">) and then add the link to that component. This is not very easy to do but can save time if you need it a lot.

Matthijs.

Thies Edeling wrote:
Hi,

In your HTML the label is a child of the link so do it the other way around, add the label to the link

Link l = new Link..
l.add(new Label..

with <a wicket:id=".."><span wicket:id=".."></span></a>

gr
Thies

Hi,
is it possible to have a link in a localized label?
I would like to have something like this in my output:


Please click <a href="xyz">here</a>. And then do ....


--> Is there a possiblity to use a StringResourceModel here? Something like
pagexyz.usermessage=Please click {mylink}. And then do...

How would I now add the link to the message?
myLabel.add( new Link(.... does not work...

If this is not possible, how is the standard way of doing such a thing?
Thanks for your help!

Marcus





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to