Package org.apache.tapestry.web

Examples of org.apache.tapestry.web.WebSession


    public void testGetLinkOnSamePageStateful()
    {
        IPage page = newPage("ThePage");
        IDirect c = newDirect();
        IRequestCycle cycle = newCycle();
        WebSession session = newWebSession();
        WebRequest request = newWebRequest(false, session);
        LinkFactory lf = newLinkFactory();
        ILink link = newLink();

        trainGetPage(cycle, page);
View Full Code Here


    {
        Object[] parameters = new Object[0];
        IRequestCycle cycle = newCycle();
        IPage page = newPage();
        IDirect d = newDirect();
        WebSession session = newWebSession(false);
        WebRequest request = newWebRequest(session);
        LinkFactory lf = newLinkFactory();
        ResponseRenderer rr = newResponseRenderer();

        trainGetParameter(cycle, ServiceConstants.COMPONENT, "fred.barney");
View Full Code Here

        session.getAttributeNames();
        setReturnValue(session, newEnumeration());

        replayControls();

        WebSession ws = new PortletWebSession(session);

        List l = ws.getAttributeNames();

        checkList(l);

        verifyControls();
    }
View Full Code Here

        session.getAttribute("attr");
        setReturnValue(session, attribute);

        replayControls();

        WebSession ws = new PortletWebSession(session);

        assertSame(attribute, ws.getAttribute("attr"));

        verifyControls();
    }
View Full Code Here

        session.setAttribute("name", attribute);

        replayControls();

        WebSession ws = new PortletWebSession(session);

        ws.setAttribute("name", attribute);

        verifyControls();
    }
View Full Code Here

        session.getId();
        setReturnValue(session, "abc");

        replayControls();

        WebSession ws = new PortletWebSession(session);

        assertEquals("abc", ws.getId());

        verifyControls();
    }
View Full Code Here

        session.invalidate();

        replayControls();

        WebSession ws = new PortletWebSession(session);

        ws.invalidate();

        verifyControls();
    }
View Full Code Here

        // Check for a StaleSession only when the session was stateful when
        // the link was created.

        if (activeSession && direct.isStateful())
        {
            WebSession session = _request.getSession(false);

            if (session == null || session.isNew())
                throw new StaleSessionException(EngineMessages.requestStateSession(direct),
                        componentPage);
        }
       
        Object[] parameters = _linkFactory.extractListenerParameters(cycle);
View Full Code Here

            Object newValue)
    {
        Defense.notNull(pageName, "pageName");
        Defense.notNull(propertyName, "propertyName");

        WebSession session = _request.getSession(true);

        String attributeName = RecordUtils.buildChangeKey(STRATEGY_ID,
                _applicationId, pageName, idPath, propertyName);

        session.setAttribute(attributeName, newValue);
    }
View Full Code Here

    public Collection getStoredChanges(String pageName)
    {
        Defense.notNull(pageName, "pageName");

        WebSession session = _request.getSession(false);

        if (session == null) return Collections.EMPTY_LIST;

        final Collection result = new ArrayList();
View Full Code Here

TOP

Related Classes of org.apache.tapestry.web.WebSession

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.