public Object component(AjaxLazyLoadPanel component) { // get the AbstractAjaxBehaviour which is responsible for // getting the contents of the lazy panel List<IBehavior> behaviors = BehaviorsUtil.getBehaviors(component, AbstractAjaxBehavior.class); if (behaviors.size() == 0) { logger.warn("AjaxLazyLoadPanel child found, but no attached AbstractAjaxBehaviors found. A curious situation..."); } for (IBehavior b : behaviors) { if (b instanceof AbstractAjaxBehavior && !(b instanceof AjaxSelfUpdatingTimerBehavior)) { // tell wicket tester to execute it :) logger.debug("Triggering lazy panel: " + component.getClassRelativePath()); AbstractAjaxBehavior abstractAjaxBehaviour = (AbstractAjaxBehavior)b; wt.executeBehavior(abstractAjaxBehaviour); } } // continue looking for other AjazLazyLoadPanel return CONTINUE_TRAVERSAL; } });
private void internalExecuteAllTimerBehaviors(final Component component) { List<IBehavior> behaviors = BehaviorsUtil.getBehaviors(component, AbstractAjaxTimerBehavior.class); for (IBehavior b : behaviors) { AbstractAjaxTimerBehavior timer = (AbstractAjaxTimerBehavior) b; if (!timer.isStopped()) { if (log.isDebugEnabled()) { log.debug("Triggering AjaxSelfUpdatingTimerBehavior: {}", component.getClassRelativePath()); } checkUsability(component); executeBehavior(timer); } } }