开发者

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

I 开发者_如何学JAVAhave 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


The following works in Wicket 6

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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜