Example usage for org.apache.wicket.util.visit Visits visitChildren

List of usage examples for org.apache.wicket.util.visit Visits visitChildren

Introduction

In this page you can find the example usage for org.apache.wicket.util.visit Visits visitChildren.

Prototype

public static <S, R> R visitChildren(final Iterable<? super S> container, final IVisitor<S, R> visitor) 

Source Link

Document

Visits children of the specified Iterable pre-order (parent first).

Usage

From source file:org.cdlflex.ui.markup.html.repeater.data.table.DataTable.java

License:Apache License

/**
 * Visit the columns of this table.//from  w w  w. j  a  va2s.com
 * 
 * @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);
}

From source file:org.opensingular.form.wicket.SValidationFeedbackHandler.java

License:Apache License

private static Set<Component> collectLowerBoundInstances(Component container) {
    final Set<Component> comps = Sets.newHashSet();
    if (container instanceof MarkupContainer) {
        Visits.visitChildren((MarkupContainer) container, (Component object, IVisit<Void> visit) -> {
            SValidationFeedbackHandler handler = get(object);
            if (handler != null) {
                visit.dontGoDeeper();/*from  www  . j  av  a  2  s.c  o m*/
                comps.add(object);
            }
        });
    }
    return comps;
}