/** * Triggers loading of all {@link AjaxLazyLoadPanel}'s content in a page. * * @param wt * the tester * @param page * contains the {@link AjaxLazyLoadPanel}s to trigger */ public static void executeAjaxLazyLoadPanel(final BaseWicketTester wt, final Page page) { // get the AbstractAjaxBehaviour which is responsible for // getting the contents of the lazy panel List<AjaxLazyLoadTimer> behaviors = page.getBehaviors(AjaxLazyLoadTimer.class); if (behaviors.size() == 0) { logger.warn("No timer behavior for AjaxLazyLoadPanel found. A curious situation..."); return; } else if (behaviors.size() > 1) { logger.warn( "Multiple timer behavior for AjaxLazyLoadPanel found. A curious situation..."); } wt.executeBehavior(behaviors.get(0)); }
private void internalExecuteAllTimerBehaviors(final Component component) { List<AbstractAjaxTimerBehavior> behaviors = component .getBehaviors(AbstractAjaxTimerBehavior.class); for (AbstractAjaxTimerBehavior timer : behaviors) { checkUsability(component, true); if (!timer.isStopped()) { if (log.isDebugEnabled()) { log.debug("Triggering AjaxSelfUpdatingTimerBehavior: {}", component.getClassRelativePath()); } executeBehavior(timer); } } }
private void internalExecuteAllTimerBehaviors(final Component component) { List<AbstractAjaxTimerBehavior> behaviors = component.getBehaviors(AbstractAjaxTimerBehavior.class); for (AbstractAjaxTimerBehavior timer : behaviors) { checkUsability(component, true); if (!timer.isStopped()) { if (log.isDebugEnabled()) { log.debug("Triggering AjaxSelfUpdatingTimerBehavior: {}", component.getClassRelativePath()); } executeBehavior(timer); } } }
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); } } }
/** * Helper method for all the places where an Ajax call should submit an associated * <code>Form</code>. * * @param component * The component the behavior is attached to * @param behavior * The <code>AjaxFormSubmitBehavior</code> with the <code>Form</code> to "submit" */ private void submitAjaxFormSubmitBehavior(final Component component, AjaxFormSubmitBehavior behavior) { // The form that needs to be "submitted". Form<?> form = behavior.getForm(); assertNotNull("No form attached to the submitlink.", form); checkUsability(form, true); serializeFormToRequest(form); executeBehavior(behavior); }
/** * Helper method for all the places where an Ajax call should submit an associated * <code>Form</code>. * * @param component * The component the behavior is attached to * @param behavior * The <code>AjaxFormSubmitBehavior</code> with the <code>Form</code> to "submit" */ private void submitAjaxFormSubmitBehavior(final Component component, AjaxFormSubmitBehavior behavior) { // The form that needs to be "submitted". Form<?> form = behavior.getForm(); assertNotNull(form, "No form attached to the submitlink."); checkUsability(form, true); serializeFormToRequest(form); executeBehavior(behavior); }
for (AjaxEventBehavior ajaxEventBehavior : ajaxEventBehaviors) executeBehavior(ajaxEventBehavior);
for (AjaxEventBehavior ajaxEventBehavior : ajaxEventBehaviors) executeBehavior(ajaxEventBehavior);
for (AjaxEventBehavior behavior : behaviors) executeBehavior(behavior); for (AjaxEventBehavior behavior : behaviors) executeBehavior(behavior);
for (AjaxEventBehavior behavior : behaviors) executeBehavior(behavior); for (AjaxEventBehavior behavior : behaviors) executeBehavior(behavior);