@Override public void onBeforeRender(final Component component) { notify(new INotifier<IComponentOnBeforeRenderListener>() { @Override public void notify(IComponentOnBeforeRenderListener listener) { listener.onBeforeRender(component); } }); }
protected void initStatelessChecker() { if (RuntimeConfigurationType.DEVELOPMENT.equals(getConfigurationType())) { getComponentPostOnBeforeRenderListeners().add(new StatelessChecker()); } }
private void afterParse(Component tableComponent) { tableComponent.getPage().endComponentRender(tableComponent); Application.get() .getComponentPreOnBeforeRenderListeners() .remove(PathSetupListener.INSTANCE); RequestCycle.get().setResponse(originalResponse); originalResponse = null; cellExporter = null; }
application.getComponentPreOnBeforeRenderListeners().onBeforeRender(this); application.getComponentPostOnBeforeRenderListeners().onBeforeRender(this);
protected void initStatelessChecker() { if (RuntimeConfigurationType.DEVELOPMENT.equals(getConfigurationType())) { getComponentPostOnBeforeRenderListeners().add(new StatelessChecker()); } }
private void disablePropagation(ConfigurationParameters params) { IRequestCycleListener requestCycleListener = params.getActiveRequestCycleListener(); if (requestCycleListener != null) { Application.get().getRequestCycleListeners().remove(requestCycleListener); params.setActiveRequestCycleListener(null); } IComponentOnBeforeRenderListener componentOnBeforeRenderListener = params.getActiveComponentOnBeforeRenderListener(); if (componentOnBeforeRenderListener != null) { Application.get().getComponentPreOnBeforeRenderListeners().remove(componentOnBeforeRenderListener); params.setActiveComponentOnBeforeRenderListener(null); } }
application.getComponentPreOnBeforeRenderListeners().onBeforeRender(this); application.getComponentPostOnBeforeRenderListeners().onBeforeRender(this);
@Override public void init(WebApplication webApplication) { webApplication.getComponentPostOnBeforeRenderListeners().add(new StatelessChecker()); wicketEndpointRepository.add(new WicketAutoConfig.Builder(this.getClass()) .withDetail("properties", props) .build()); }
@Override public void onBeforeRender(final Component component) { notify(new INotifier<IComponentOnBeforeRenderListener>() { @Override public void notify(IComponentOnBeforeRenderListener listener) { listener.onBeforeRender(component); } }); }
@Override public void init(WebApplication webApplication) { webApplication.getComponentPostOnBeforeRenderListeners().add(new StatelessChecker()); wicketEndpointRepository.add(new WicketAutoConfig.Builder(this.getClass()) .withDetail("properties", props) .build()); }
/** * Preferred entry point for configuring your WicketApplication automatically. * @param application Your wicket application */ public static void configure(Application application) { application.getComponentInstantiationListeners().add(new AttributeModifyingInstantiationListener()); application.getComponentPostOnBeforeRenderListeners().add(new AttributeModifyingComponentVisitor()); }
/** * Preferred entry point for configuring your WicketApplication automatically. * @param application Your wicket application */ public static void configure(Application application) { application.getComponentInstantiationListeners().add(new AttributeModifyingInstantiationListener()); application.getComponentPostOnBeforeRenderListeners().add(new AttributeModifyingComponentVisitor()); }
private void enablePropagation(ConfigurationParameters params, Application application) { disablePropagation(params); // Force remove active listeners if any IRequestCycleListener requestCycleListener = conversationPropagator;// new RequestCycleListenerWrapper(); application.getRequestCycleListeners().add(requestCycleListener); params.setActiveRequestCycleListener(requestCycleListener); IComponentOnBeforeRenderListener componentOnBeforeRenderListener = new ComponentOnBeforeRenderListenerWrapper(); application.getComponentPreOnBeforeRenderListeners().add(componentOnBeforeRenderListener); params.setActiveComponentOnBeforeRenderListener(componentOnBeforeRenderListener); }
/** * Creates and registers an {@code EventBus} for the given application and broadcaster * * @param application * @param broadcaster */ public EventBus(WebApplication application, Broadcaster broadcaster) { this.application = application; this.broadcaster = broadcaster; application.setMetaData(EVENT_BUS_KEY, this); application.mount(new AtmosphereRequestMapper(createEventSubscriptionInvoker())); application.getComponentPostOnBeforeRenderListeners().add( createEventSubscriptionCollector()); application.getSessionStore().registerUnboundListener(this); }
/** * Mock a request to table component and return its response. * * @param tableComponent * @return */ private BufferedWebResponse doRequest(Component tableComponent) { originalResponse = RequestCycle.get().getResponse(); BufferedWebResponse mockResponse = new BufferedWebResponse(null); RequestCycle.get().setResponse(mockResponse); Application.get().getComponentPreOnBeforeRenderListeners().add(PathSetupListener.INSTANCE); Page page = tableComponent.getPage(); page.startComponentRender(tableComponent); tableComponent.prepareForRender(); tableComponent.render(); return mockResponse; }
/** * Creates and registers an {@code EventBus} for the given application and broadcaster * * @param application * @param broadcaster */ public EventBus(WebApplication application, Broadcaster broadcaster) { this.application = application; this.broadcaster = broadcaster; application.setMetaData(EVENT_BUS_KEY, this); application.mount(new AtmosphereRequestMapper(createEventSubscriptionInvoker())); application.getComponentPostOnBeforeRenderListeners().add( createEventSubscriptionCollector()); application.getSessionStore().registerUnboundListener(this); checkEnabledAnalytics(getBroadcaster().getBroadcasterConfig().getAtmosphereConfig()); }
application.getComponentPreOnBeforeRenderListeners().add(new ConversationExpiryChecker(container)); SeamConversationContextFactory.setDisableNoopInstance(true);