Hi there,

you have to add the span to the AjaxRequestTarget inside your links "onClick"-method. Your span has to be a Wicket component, of course.
So if your HTML looks somewhat like this:

...
<span wicket:id="myspan">
<a wicket:id="mylink">
...

your Java has to look somewhat like this:
...
Label myLabel = new Label("myspan"); // The label / span you want to refresh
myLabel.setOutputMarkupId(true);
Link myLink = new Link("myLink") {
@Override
public void onClick(AjaxRequestTarget target) {
target.add(myLabel) // Add label to requestTarget to get it updated on click
});
...

Hope that helps.
Cheers,

            Andy



Am 17.03.2012 15:15, schrieb Dan12321:
Hello,
I have got span element (....) with text and I would like to refresh this
span when I click on ajaxlink. It is possible? How can rei tfresh only this
span element.
The ajaxlink is not connect with this span element. These are two different
elements in page.

Thanks.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/refresh-component-tp4480640p4480640.html
Sent from the Users forum 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