Package org.apache.tapestry.runtime

Examples of org.apache.tapestry.runtime.PageLifecycleListener


    }

    @Test
    public void detach_notification()
    {
        PageLifecycleListener listener1 = newPageLifecycle();
        PageLifecycleListener listener2 = newPageLifecycle();

        listener1.containingPageDidDetach();
        listener2.containingPageDidDetach();

        replay();

        Page page = new PageImpl(null, _locale, null, null);
View Full Code Here


    /** Also checks that listeners are invoked, even if the page is dirty. */
    @Test
    public void detach_dirty_if_dirty_count_non_zero()
    {
        PageLifecycleListener listener = newPageLifecycle();

        listener.containingPageDidDetach();

        replay();

        Page page = new PageImpl(null, _locale, null, null);

View Full Code Here

    @Test
    public void detach_dirty_if_listener_throws_exception()
    {
        ComponentPageElement element = mockComponentPageElement();
        Logger logger = mockLogger();
        PageLifecycleListener listener1 = newPageLifecycle();
        PageLifecycleListener listener2 = newPageLifecycle();
        RuntimeException t = new RuntimeException("Listener detach exception.");

        train_getLogger(element, logger);

        listener1.containingPageDidDetach();
        setThrowable(t);

        logger.error(contains("failed during page detach"), same(t));

        listener2.containingPageDidDetach();

        replay();

        Page page = new PageImpl(null, _locale, null, null);
        page.setRootElement(element);
View Full Code Here

    @Test
    public void attach_notification()
    {

        PageLifecycleListener listener1 = newPageLifecycle();
        PageLifecycleListener listener2 = newPageLifecycle();

        listener1.containingPageDidAttach();
        listener2.containingPageDidAttach();

        replay();

        Page page = new PageImpl(null, _locale, null, null);
View Full Code Here

    }

    @Test
    public void load_notification()
    {
        PageLifecycleListener listener1 = newPageLifecycle();
        PageLifecycleListener listener2 = newPageLifecycle();

        listener1.containingPageDidLoad();
        listener2.containingPageDidLoad();

        replay();

        Page page = new PageImpl(LOGICAL_PAGE_NAME, _locale, null, null);
View Full Code Here

    }

    @Test
    public void detach_notification()
    {
        PageLifecycleListener listener1 = newPageLifecycle();
        PageLifecycleListener listener2 = newPageLifecycle();

        listener1.containingPageDidDetach();
        listener2.containingPageDidDetach();

        replay();

        Page page = new PageImpl(PAGE_NAME, _locale, null, null);
View Full Code Here

    /** Also checks that listeners are invoked, even if the page is dirty. */
    @Test
    public void detach_dirty_if_dirty_count_non_zero()
    {
        PageLifecycleListener listener = newPageLifecycle();

        listener.containingPageDidDetach();

        replay();

        Page page = new PageImpl(PAGE_NAME, _locale, null, null);

View Full Code Here

    @Test
    public void detach_dirty_if_listener_throws_exception()
    {
        ComponentPageElement element = mockComponentPageElement();
        Log log = mockLog();
        PageLifecycleListener listener1 = newPageLifecycle();
        PageLifecycleListener listener2 = newPageLifecycle();
        RuntimeException t = new RuntimeException("Listener detach exception.");

        train_getLog(element, log);

        listener1.containingPageDidDetach();
        setThrowable(t);

        log.error(contains("failed during page detach"), same(t));

        listener2.containingPageDidDetach();

        replay();

        Page page = new PageImpl(PAGE_NAME, _locale, null, null);
        page.setRootElement(element);
View Full Code Here

    @Test
    public void attach_notification()
    {

        PageLifecycleListener listener1 = newPageLifecycle();
        PageLifecycleListener listener2 = newPageLifecycle();

        listener1.containingPageDidAttach();
        listener2.containingPageDidAttach();

        replay();

        Page page = new PageImpl(PAGE_NAME, _locale, null, null);
View Full Code Here

    }

    @Test
    public void load_notification()
    {
        PageLifecycleListener listener1 = newPageLifecycle();
        PageLifecycleListener listener2 = newPageLifecycle();

        listener1.containingPageDidLoad();
        listener2.containingPageDidLoad();

        replay();

        Page page = new PageImpl(PAGE_NAME, _locale, null, null);
View Full Code Here

TOP

Related Classes of org.apache.tapestry.runtime.PageLifecycleListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.