By content you mean the text yeah? Create your link (We use AjaxFallbackLinks for Ajax links, but there's others), and then create a label with an appropriate model, and add the label to the link. You're markup would look like so:
<a href="#" wicket:id="ajaxLink"><span wicket:id="linkContent"></span></a> How dynamic a content you're after really depends on what you're doing. If you're not using a dynamic model (I'm a big fan of property models over domain objects) you could easily change the Model of the linkContent label in the ajaxLink's onUpdate method. Just make sure you add the link to the ajaxRequestTarget to see it update. If you want a more specific model behaviour, not too hard to knock up a class implementing IModel that does what you need. Regards, Liam Clarke On 4/23/09, HHB <[email protected]> wrote: > Hey, > Is there a way to set the content of a link > dynamically (the value is coming from model object)? > The link has to be Ajax enabled for sure. > Thanks. > > > --------------------------------------------------------------------- > 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]
