Examples of WebSession


Examples of org.apache.tapestry.web.WebSession

        session.setAttribute("name", attribute);

        replayControls();

        WebSession ws = new PortletWebSession(session);

        ws.setAttribute("name", attribute);

        verifyControls();
    }
View Full Code Here

Examples of org.apache.tapestry.web.WebSession

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

        replayControls();

        WebSession ws = new PortletWebSession(session);

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

        verifyControls();
    }
View Full Code Here

Examples of org.apache.tapestry.web.WebSession

        System.err.println(message);

        System.err.println("\n");

        WebSession session = _request.getSession(false);

        if (session != null)
            System.err.println("      Session id    : " + session.getId());

        System.err.println("\nExceptions:\n");

        new ExceptionAnalyzer().reportException(cause, System.err);
View Full Code Here

Examples of org.apache.tapestry.web.WebSession

        throw new UnsupportedOperationException(PortletMessages.unsupportedMethod("getLink"));
    }

    public void service(IRequestCycle cycle) throws IOException
    {
        WebSession session = _request.getSession(true);
        String markup = (String) session
                .getAttribute(PortletConstants.PORTLET_EXCEPTION_MARKUP_ATTRIBUTE);

        PrintWriter writer = _response.getPrintWriter(new ContentType("text/html"));

        PortletURL url = _globals.getRenderResponse().createActionURL();
View Full Code Here

Examples of org.apache.tapestry.web.WebSession

        // 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

Examples of org.apache.tapestry.web.WebSession

        // #2: Get it, wreate is true, it is wreated.

        replayControls();

        WebSession cs = wr.getSession(true);

        verifyControls();

        // #3: Cached in local variable, make sure same
        // think returned.
View Full Code Here

Examples of org.apache.tapestry.web.WebSession

    public void store(String pageName, String idPath, String propertyName, Object newValue)
    {
        Defense.notNull(pageName, "pageName");
        Defense.notNull(propertyName, "propertyName");

        WebSession session = _request.getSession(true);

        StringBuffer buffer = new StringBuffer();

        buffer.append(_applicationId);
        buffer.append(",");
        buffer.append(pageName);

        if (idPath != null)
        {
            buffer.append(",");
            buffer.append(idPath);
        }

        buffer.append(",");
        buffer.append(propertyName);

        String key = buffer.toString();

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

Examples of org.apache.tapestry.web.WebSession

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

        WebSession session = _request.getSession(false);

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

        Collection result = new ArrayList();

        String prefix = _applicationId + "," + pageName + ",";

        Iterator i = session.getAttributeNames().iterator();
        while (i.hasNext())
        {
            String key = (String) i.next();

            if (key.startsWith(prefix))
            {
                PropertyChange change = buildChange(key, session.getAttribute(key));

                result.add(change);
            }
        }
View Full Code Here

Examples of org.apache.tapestry.web.WebSession

    public void discardStoredChanges(String pageName, IRequestCycle cycle)
    {
        Defense.notNull(pageName, "pageName");

        WebSession session = _request.getSession(false);

        if (session == null)
            return;

        String prefix = _applicationId + "," + pageName + ",";

        Iterator i = session.getAttributeNames().iterator();
        while (i.hasNext())
        {
            String key = (String) i.next();

            if (key.startsWith(prefix))
                session.setAttribute(key, null);
        }
    }
View Full Code Here

Examples of org.apache.tapestry.web.WebSession

        // 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
TOP
Copyright © 2018 www.massapi.com. 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.