@Test public void add_page_lifecycle_listener() { Component component = mockComponent(); Instantiator ins = mockInstantiator(component); ComponentModel model = mockComponentModel(); ComponentPageElement element = mockComponentPageElement(); Page page = mockPage(); PageLifecycleListener listener = newMock(PageLifecycleListener.class); train_getModel(ins, model); page.addLifecycleListener(listener); replay(); InternalComponentResources resources = new InternalComponentResourcesImpl(page, element, null, null, null, null, ins, false); resources.addPageLifecycleListener(listener); verify(); }
public void addPageLifecycleListener(PageLifecycleListener listener) { page.addLifecycleListener(listener); }
InternalComponentResourcesImpl extends LockSupport implements InternalComponentResources { public void addPageLifecycleListener(PageLifecycleListener listener) { page.addLifecycleListener(listener); } }
InternalComponentResourcesImpl extends LockSupport implements InternalComponentResources { public void addPageLifecycleListener(PageLifecycleListener listener) { page.addLifecycleListener(listener); } InternalComponentResourcesImpl(Page page, ComponentPageElement element,
                                          ComponentResources containerResources, ComponentPageElementResources elementResources, String completeId,
                                          String nestedId, Instantiator componentInstantiator, boolean mixin); }
InternalComponentResourcesImpl extends LockSupport implements InternalComponentResources { public void addPageLifecycleListener(PageLifecycleListener listener) { page.addLifecycleListener(listener); } InternalComponentResourcesImpl(Page page, ComponentPageElement element,
                                          ComponentResources containerResources, ComponentPageElementResources elementResources, String completeId,
                                          String nestedId, Instantiator componentInstantiator, boolean mixin); boolean isMixin(); Location getLocation(); String toString(); ComponentModel getComponentModel(); Component getEmbeddedComponent(String embeddedId); Object getFieldChange(String fieldName); String getId(); boolean hasFieldChange(String fieldName); Link createEventLink(String eventType, Object... context); Link createFormEventLink(String eventType, Object... context); void discardPersistentFieldChanges(); String getElementName(); List<String> getInformalParameterNames(); T getInformalParameter(String name, Class<T> type); Block getBody(); boolean hasBody(); String getCompleteId(); Component getComponent(); boolean isBound(String parameterName); T getParameterAnnotation(String parameterName, Class<T> annotationType); boolean isRendering(); boolean triggerEvent(String eventType, Object[] context, ComponentEventCallback handler); boolean triggerContextEvent(String eventType, EventContext context, ComponentEventCallback callback); String getNestedId(); Component getPage(); boolean isLoaded(); void persistFieldChange(String fieldName, Object newValue); void bindParameter(String parameterName, Binding binding); Class getBoundType(String parameterName); Type getBoundGenericType(String parameterName); Binding getBinding(String parameterName); AnnotationProvider getAnnotationProvider(String parameterName); Logger getLogger(); Component getMixinByClassName(String mixinClassName); void renderInformalParameters(MarkupWriter writer); Component getContainer(); ComponentResources getContainerResources(); Messages getContainerMessages(); Locale getLocale(); ComponentResourceSelector getResourceSelector(); Messages getMessages(); String getElementName(String defaultElementName); Block getBlock(String blockId); Block getBlockParameter(String parameterName); Block findBlock(String blockId); Resource getBaseResource(); String getPageName(); Map<String, Binding> getInformalParameterBindings(); Object getRenderVariable(String name); void storeRenderVariable(String name, Object value); void postRenderCleanup(); void addPageLifecycleListener(PageLifecycleListener listener); void removePageLifecycleListener(PageLifecycleListener listener); void addPageResetListener(PageResetListener listener); ParameterConduit getParameterConduit(String parameterName); void setParameterConduit(String parameterName, ParameterConduit conduit); String getPropertyName(String parameterName); void render(MarkupWriter writer, RenderQueue queue); PageLifecycleCallbackHub getPageLifecycleCallbackHub(); }
InternalComponentResourcesImpl extends LockSupport implements InternalComponentResources { public void addPageLifecycleListener(PageLifecycleListener listener) { page.addLifecycleListener(listener); } InternalComponentResourcesImpl(Page page, ComponentPageElement element,
                                          ComponentResources containerResources, ComponentPageElementResources elementResources, String completeId,
                                          String nestedId, Instantiator componentInstantiator, boolean mixin); boolean isMixin(); Location getLocation(); String toString(); ComponentModel getComponentModel(); Component getEmbeddedComponent(String embeddedId); Object getFieldChange(String fieldName); String getId(); boolean hasFieldChange(String fieldName); Link createEventLink(String eventType, Object... context); Link createFormEventLink(String eventType, Object... context); void discardPersistentFieldChanges(); String getElementName(); List<String> getInformalParameterNames(); T getInformalParameter(String name, Class<T> type); Block getBody(); boolean hasBody(); String getCompleteId(); Component getComponent(); boolean isBound(String parameterName); T getParameterAnnotation(String parameterName, Class<T> annotationType); boolean isRendering(); boolean triggerEvent(String eventType, Object[] context, ComponentEventCallback handler); boolean triggerContextEvent(String eventType, EventContext context, ComponentEventCallback callback); String getNestedId(); Component getPage(); boolean isLoaded(); void persistFieldChange(String fieldName, Object newValue); void bindParameter(String parameterName, Binding binding); Class getBoundType(String parameterName); Type getBoundGenericType(String parameterName); Binding getBinding(String parameterName); AnnotationProvider getAnnotationProvider(String parameterName); Logger getLogger(); Component getMixinByClassName(String mixinClassName); void renderInformalParameters(MarkupWriter writer); Component getContainer(); ComponentResources getContainerResources(); Messages getContainerMessages(); Locale getLocale(); ComponentResourceSelector getResourceSelector(); Messages getMessages(); String getElementName(String defaultElementName); Block getBlock(String blockId); Block getBlockParameter(String parameterName); Block findBlock(String blockId); Resource getBaseResource(); String getPageName(); Map<String, Binding> getInformalParameterBindings(); Object getRenderVariable(String name); void storeRenderVariable(String name, Object value); void postRenderCleanup(); void addPageLifecycleListener(PageLifecycleListener listener); void removePageLifecycleListener(PageLifecycleListener listener); void addPageResetListener(PageResetListener listener); ParameterConduit getParameterConduit(String parameterName); void setParameterConduit(String parameterName, ParameterConduit conduit); String getPropertyName(String parameterName); void render(MarkupWriter writer, RenderQueue queue); PageLifecycleCallbackHub getPageLifecycleCallbackHub();  }