Tom
Tom

Reputation: 2454

In wicket, how can you refresh a feedbackpanel from an onSubmit of an ajax component within a panel?

I have a feedback panel at the top of my page.

I have a number of panels, each have sub panels with AjaxFallback links that, when clicked I want to set info() messages to be displayed in the feedback panel.

Do I have to pass my feedback panel down through the layers of panels in order that I can re-add it to the Ajax target when the link is clicked? Or is there another way?

Thanks, Tom

Upvotes: 3

Views: 6666

Answers (2)

ali köksal
ali köksal

Reputation: 1227

The following works in Wicket 6

    target.addChildren(getPage(), FeedbackPanel.class);

Upvotes: 8

Don Roby
Don Roby

Reputation: 41135

Something has to add it to the target, but there are ways of using indirection so that things don't need to be passed around as much. See this blog article for one tactic.

Something similar is being added in Wicket 1.5. See WICKET-1312 for bug-tracking about this addition.

Upvotes: 1

Related Questions