我正在尝试将以下代码从 wicket-1.4.9 转换为 wicket-6.x/7.x,但没有得到解决方案。请帮忙,因为我是 Apache Wicket 的新手
@Override
protected IFeedbackMessageFilter[] getFilters() {
final List<IFeedbackMessageFilter> filters = new ArrayList<IFeedbackMessageFilter>();
getPage().visitChildren(FeedbackPanel.class, new IVisitor<FeedbackPanel>() {
@Override
public Object component(FeedbackPanel component) {
if (pageFeedback.equals(component)) {
return CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER;
}
filters.add(component.getFilter());
return CONTINUE_TRAVERSAL;
}
});
return filters.toArray(new IFeedbackMessageFilter[filters.size()]);
}