Package org.apache.tapestry.request

Examples of org.apache.tapestry.request.RequestContext$DefaultRequestDecoder


     *
     **/

    public void restart(IRequestCycle cycle) throws IOException
    {
        RequestContext context = cycle.getRequestContext();

        HttpSession session = context.getSession();

        if (session != null)
        {
            try
            {
                session.invalidate();
            }
            catch (IllegalStateException ex)
            {
                if (LOG.isDebugEnabled())
                    LOG.debug("Exception thrown invalidating HttpSession.", ex);

                // Otherwise, ignore it.
            }
        }

        // Make isStateful() return false, so that the servlet doesn't
        // try to store the engine back into the (now invalid) session.

        _stateful = false;

        String url = context.getAbsoluteURL(_servletPath);

        context.redirect(url);
    }
View Full Code Here


            _internal = !(location.startsWith("/") || location.indexOf("://") > 0);
        }

        public void process(IRequestCycle cycle)
        {
            RequestContext context = cycle.getRequestContext();

            if (_internal)
                forward(context);
            else
                redirect(context);
View Full Code Here

            condition = getCondition();
            writeValue(form, name, condition);
        }
        else
        {
            RequestContext context = cycle.getRequestContext();
            String submittedConditions[] = context.getParameters(name);
            condition = convertValue(submittedConditions[0]);
        }

        IBinding conditionValueBinding = getConditionValueBinding();
        if  (conditionValueBinding != null)
View Full Code Here

    public void initialize(IRequestCycle cycle)
    {
        if (!init)
        {
            RequestContext requestContext = cycle.getRequestContext();
            ApplicationServlet servlet = requestContext.getServlet();
            ServletContext context = servlet.getServletContext();
            IPropertySource propertySource = cycle.getEngine().getPropertySource();

            Resource webInfLocation = new ContextResource(context, "/WEB-INF/");
View Full Code Here

    private HttpServletResponse _servletResponse;

    public void initializeService()
    {
        RequestContext context = new RequestContext(_servletRequest, _servletResponse);

        _environment = new RequestCycleEnvironment(_errorHandler, _infrastructure, context,
                _strategySource, _absoluteURLBuilder);
    }
View Full Code Here

                newStrategySource(), newBuilder());
    }

    public void testGetters()
    {
        RequestContext context = new RequestContext(null, null);
        Infrastructure infrastructure = newInfrastructure();
        RequestCycleEnvironment env = new RequestCycleEnvironment(newErrorHandler(),
                infrastructure, context, newStrategySource(), newBuilder());
        IEngine engine = newEngine();
        IEngineService service = newService();
View Full Code Here

        verifyControls();
    }

    public void testForgetPage()
    {
        RequestContext context = new RequestContext(null, null);
        Infrastructure infrastructure = newInfrastructure();
        PropertyPersistenceStrategySource source = newStrategySource();
        RequestCycleEnvironment env = new RequestCycleEnvironment(newErrorHandler(),
                infrastructure, context, source, newBuilder());
        IEngine engine = newEngine();
View Full Code Here

        setSelectedColumn(selectedColumn);
    }

    private void handleSubmission(IRequestCycle cycle)
    {
        RequestContext context = cycle.getRequestContext();
        String[] values = context.getParameters(getName());

        int count = Tapestry.size(values);

        if (count == 0)
            return;
View Full Code Here

        {
            i = getSource();
        }
        else
        {
            RequestContext context = cycle.getRequestContext();
            String[] submittedValues = context.getParameters(name);

            i = (Iterator) getValueConverter().coerceValue(submittedValues, Iterator.class);
        }

        // If the source (when rendering), or the submitted values (on submit)
View Full Code Here

            condition = getCondition();
            writeValue(form, name, condition);
        }
        else
        {
            RequestContext context = cycle.getRequestContext();
            String submittedCondition = context.getParameter(name);
            condition = convertValue(submittedCondition);
        }

        if (isParameterBound("conditionValue"))
            setConditionValue(condition);
View Full Code Here

TOP

Related Classes of org.apache.tapestry.request.RequestContext$DefaultRequestDecoder

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.