List of usage examples for org.apache.wicket.util.visit Visits visit
@SuppressWarnings({ "unchecked", "rawtypes" }) public static <S, R> R visit(final Iterable<? super S> container, final IVisitor<S, R> visitor)
From source file:com.github.javawithmarcus.wicket.cdi.ConversationPropagator.java
License:Apache License
protected boolean hasConversationalComponent(Page page) { Boolean hasConversational = Visits.visit(page, new IVisitor<Component, Boolean>() { @Override// w w w.j av a 2 s .c o m public void component(Component object, IVisit<Boolean> visit) { Conversational annotation = object.getClass().getAnnotation(Conversational.class); if (annotation != null) { visit.stop(true); } } }); return hasConversational == null ? false : hasConversational; }
From source file:com.googlecode.wicket.kendo.ui.interaction.draggable.DraggableBehavior.java
License:Apache License
@Override public void onAjax(AjaxRequestTarget target, JQueryEvent event) { if (event instanceof DraggableEvent) { DraggableEvent e = (DraggableEvent) event; if (e instanceof DragStartEvent) { // register to all DroppableBehavior(s) // Visits.visit(target.getPage(), this.newDroppableBehaviorVisitor()); this.listener.onDragStart(target, e.getTop(), e.getLeft()); }/*from ww w.j a va 2 s. c o m*/ else if (e instanceof DragStopEvent) { this.listener.onDragStop(target, e.getTop(), e.getLeft()); } else if (e instanceof DragCancelEvent) { this.listener.onDragCancel(target, e.getTop(), e.getLeft()); } } }