本文整理汇总了Java中org.apache.wicket.util.visit.Visits类的典型用法代码示例。如果您正苦于以下问题:Java Visits类的具体用法?Java Visits怎么用?Java Visits使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Visits类属于org.apache.wicket.util.visit包,在下文中一共展示了Visits类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addChildrenIfVisible
import org.apache.wicket.util.visit.Visits; //导入依赖的package包/类
public static void addChildrenIfVisible(final AjaxRequestTarget target, MarkupContainer parent,
Class<?> childCriteria) {
Args.notNull(parent, "parent");
Args.notNull(childCriteria, "childCriteria");
Visits.visitChildren(
parent, Visitors.addToTarget(target),
VisitFilters.every(VisitFilters.including(childCriteria), VisitFilters.renderedComponents())
);
}
示例2: refresh
import org.apache.wicket.util.visit.Visits; //导入依赖的package包/类
public static AjaxRequestTarget.AbstractListener refresh(final IVisitFilter ... additiveFilters) {
return new SerializableListener() {
private static final long serialVersionUID = 1L;
@Override
public void onBeforeRespond(Map<String, Component> map, AjaxRequestTarget target) {
Visits.visitChildren(
target.getPage(),
Visitors.addToTarget(target),
VisitFilters.every(additiveFilters)
);
}
};
}
示例3: refreshChildren
import org.apache.wicket.util.visit.Visits; //导入依赖的package包/类
public static AjaxRequestTarget.AbstractListener refreshChildren(final MarkupContainer parent,
IVisitFilter ... additiveFilters) {
final IVisitFilter filter = VisitFilters.every(additiveFilters);
return new SerializableListener() {
private static final long serialVersionUID = 1L;
@Override
public void onBeforeRespond(Map<String, Component> map, AjaxRequestTarget target) {
Visits.visitChildren(
parent,
Visitors.addToTarget(target),
filter
);
}
};
}
示例4: visit
import org.apache.wicket.util.visit.Visits; //导入依赖的package包/类
private static final <T extends Component, R> R visit(Component component, IVisitor<T, R> visitor, IVisitFilter filter) {
return Visits.visitChildren(Collections.<Component>singleton(component), visitor, filter);
}
示例5: visitColumns
import org.apache.wicket.util.visit.Visits; //导入依赖的package包/类
/**
* Visit the columns of this table.
*
* @param visitor the visitor
* @param <R> the return type of the visitor
* @return visitor return value
*/
@SuppressWarnings("unchecked")
public <R> R visitColumns(IVisitor<IColumn<T, S>, R> visitor) {
return Visits.visitChildren((List<IColumn<T, S>>) getColumns(), visitor);
}