Hello,

A link is also a WebMarkupContainer so you can adjust your markup like:

<a href="#" wicket:id="email"><span wicket:id="emailText"/></a>

and then add a label into the link like:

ExternalLink link = new ExternalLink ("email", "mailto:"; + user.getEmail());

link.add (new Label ("emailText, user.getEmail()));

item.add (link);

Regards,

Mike

I'm still not seeing how to do this using the ExternalLink component. I'm reading the email addresses from a database and using a ListView to iterate through them to display on the screen. I added the following to my Java file:

item.add(new ExternalLink("email", user.getEmail()));

And the following to my markup:

<a href="#" wicket:id="email"></a>

Obviously, this isn't complete, but I'm not sure what I need to do to get it to turn the email address into something like:

<a class="email" href="mailto:[email protected]";>[email protected]</a>

    -------------- Original message from Martijn Dashorst
    <[email protected]>: --------------


    > The easiest that comes to mind:
    >
    > new ExternalLink("link", "mailto:[email protected]";)
    >
> Martijn

Reply via email to