Package org.apache.tapestry.web

Examples of org.apache.tapestry.web.WebSession


        return result;
    }

    public void discardStoredChanges(String pageName)
    {
        WebSession session = _request.getSession(false);

        if (session == null) return;

        WebSessionAttributeCallback callback = new WebSessionAttributeCallback()
        {
View Full Code Here


        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

    }

    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"));
View Full Code Here

        return _request.getSession(true);
    }

    public boolean exists(String objectName)
    {
        WebSession session = _request.getSession(false);

        if (session == null) return false;

        return session.getAttribute(buildKey(objectName)) != null;
    }
View Full Code Here

    }

    public Object get(String objectName, StateObjectFactory factory)
    {
        String key = buildKey(objectName);
        WebSession session = getSession();

        Object result = session.getAttribute(key);
        if (result == null)
        {
            result = factory.createStateObject();
            session.setAttribute(key, result);
        }

        return result;
    }
View Full Code Here

            if (!optimized.isStoreToSessionNeeded()) return;
        }

        String key = buildKey(objectName);

        WebSession session = getSession();

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

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

        replayControls();

        WebSession ws = new PortletWebSession(session);

        List l = ws.getAttributeNames();

        checkList(l);

        verifyControls();
    }
View Full Code Here

        session.getAttribute("attr");
        control.setReturnValue(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();
        control.setReturnValue("abc");

        replayControls();

        WebSession ws = new PortletWebSession(session);

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

        verifyControls();
    }
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.