Package org.apache.tapestry.request

Examples of org.apache.tapestry.request.RequestContext


    private HttpServletResponse _servletResponse;

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

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


        IEngineServiceView engine,
        IRequestCycle cycle,
        ResponseOutputStream output)
        throws ServletException, IOException
    {try { __CLOVER_100_0.M[542]++;
        __CLOVER_100_0.S[2253]++;RequestContext context = cycle.getRequestContext();
        __CLOVER_100_0.S[2254]++;String[] serviceContext = getServiceContext(context);

        __CLOVER_100_0.S[2255]++;if ((((Tapestry.size(serviceContext) != 1) && (++__CLOVER_100_0.CT[420] != 0)) || (++__CLOVER_100_0.CF[420] == 0))){
            __CLOVER_100_0.S[2256]++;throw new ApplicationRuntimeException(
                Tapestry.format("service-single-parameter", Tapestry.PAGE_SERVICE));}
View Full Code Here

            // If disabled, do nothing.

            __CLOVER_136_0.S[3274]++;if ((((isDisabled()) && (++__CLOVER_136_0.CT[601] != 0)) || (++__CLOVER_136_0.CF[601] == 0))){
                __CLOVER_136_0.S[3275]++;return;}

            __CLOVER_136_0.S[3276]++;RequestContext context = cycle.getRequestContext();

            // Image clicks get submitted as two request parameters:
            // foo.x and foo.y

            __CLOVER_136_0.S[3277]++;String parameterName = name + ".x";

            __CLOVER_136_0.S[3278]++;String value = context.getParameter(parameterName);

            __CLOVER_136_0.S[3279]++;if ((((value == null) && (++__CLOVER_136_0.CT[602] != 0)) || (++__CLOVER_136_0.CF[602] == 0))){
                __CLOVER_136_0.S[3280]++;return;}

            // The point parameter is not really used, unless the
            // ImageButton is used for its original purpose (as a kind
            // of image map).  In modern usage, we only care about
            // whether the user clicked on the image (and thus submitted
            // the form), not where in the image the user actually clicked.

            __CLOVER_136_0.S[3281]++;IBinding pointBinding = getPointBinding();

            __CLOVER_136_0.S[3282]++;if ((((pointBinding != null) && (++__CLOVER_136_0.CT[603] != 0)) || (++__CLOVER_136_0.CF[603] == 0))){
            {
                __CLOVER_136_0.S[3283]++;int x = Integer.parseInt(value);

                __CLOVER_136_0.S[3284]++;parameterName = name + ".y";
                __CLOVER_136_0.S[3285]++;value = context.getParameter(parameterName);

                __CLOVER_136_0.S[3286]++;int y = Integer.parseInt(value);

                __CLOVER_136_0.S[3287]++;pointBinding.setObject(new Point(x, y));
            }}
View Full Code Here

        int port,
        String anchor,
        boolean includeParameters)
    {try { __CLOVER_81_0.M[468]++;
        __CLOVER_81_0.S[2061]++;StringBuffer buffer = new StringBuffer();
        __CLOVER_81_0.S[2062]++;RequestContext context = _cycle.getRequestContext();

        __CLOVER_81_0.S[2063]++;if ((((scheme == null) && (++__CLOVER_81_0.CT[386] != 0)) || (++__CLOVER_81_0.CF[386] == 0))){
            __CLOVER_81_0.S[2064]++;scheme = context.getScheme();}

        __CLOVER_81_0.S[2065]++;buffer.append(scheme);
        __CLOVER_81_0.S[2066]++;buffer.append("://");

        __CLOVER_81_0.S[2067]++;if ((((server == null) && (++__CLOVER_81_0.CT[387] != 0)) || (++__CLOVER_81_0.CF[387] == 0))){
            __CLOVER_81_0.S[2068]++;server = context.getServerName();}

        __CLOVER_81_0.S[2069]++;buffer.append(server);

        __CLOVER_81_0.S[2070]++;if ((((port == 0) && (++__CLOVER_81_0.CT[388] != 0)) || (++__CLOVER_81_0.CF[388] == 0))){
            __CLOVER_81_0.S[2071]++;port = context.getServerPort();}

        __CLOVER_81_0.S[2072]++;if ((((!(scheme.equals("http") && port == DEFAULT_HTTP_PORT)) && (++__CLOVER_81_0.CT[389] != 0)) || (++__CLOVER_81_0.CF[389] == 0))){
        {
            __CLOVER_81_0.S[2073]++;buffer.append(':');
            __CLOVER_81_0.S[2074]++;buffer.append(port);
View Full Code Here

     *
     **/

    protected Object[] getParameters(IRequestCycle cycle)
    {try { __CLOVER_72_0.M[430]++;
        __CLOVER_72_0.S[1812]++;RequestContext context = cycle.getRequestContext();

        __CLOVER_72_0.S[1813]++;String[] squeezed = context.getParameters(Tapestry.PARAMETERS_QUERY_PARAMETER_NAME);

        __CLOVER_72_0.S[1814]++;if ((((Tapestry.size(squeezed) == 0) && (++__CLOVER_72_0.CT[338] != 0)) || (++__CLOVER_72_0.CF[338] == 0))){
            __CLOVER_72_0.S[1815]++;return squeezed;}

        __CLOVER_72_0.S[1816]++;try
View Full Code Here

     *
     **/

    private Set buildSelections(IRequestCycle cycle, String parameterName)
    {try { __CLOVER_145_0.M[768]++;
        __CLOVER_145_0.S[3632]++;RequestContext context = cycle.getRequestContext();

        __CLOVER_145_0.S[3633]++;String[] parameters = context.getParameters(parameterName);

        __CLOVER_145_0.S[3634]++;if ((((parameters == null) && (++__CLOVER_145_0.CT[682] != 0)) || (++__CLOVER_145_0.CF[682] == 0))){
            __CLOVER_145_0.S[3635]++;return null;}

        __CLOVER_145_0.S[3636]++;int length = parameters.length;
View Full Code Here

    public void initialize(String pageName, IRequestCycle cycle)
    {
        if (LOG.isDebugEnabled())
            LOG.debug("Initializing for " + pageName);

        RequestContext context = cycle.getRequestContext();

        _pageName = pageName;
        _session = context.getSession();

        _attributePrefix = context.getServlet().getServletName() + "/" + _pageName + "/";

        restorePageChanges();
    }
View Full Code Here

    {try { __CLOVER_80_0.M[461]++;
        __CLOVER_80_0.S[2010]++;IDirect direct;
        __CLOVER_80_0.S[2011]++;int count = 0;
        __CLOVER_80_0.S[2012]++;String componentPageName;
        __CLOVER_80_0.S[2013]++;IPage componentPage;
        __CLOVER_80_0.S[2014]++;RequestContext requestContext = cycle.getRequestContext();
        __CLOVER_80_0.S[2015]++;String[] serviceContext = getServiceContext(requestContext);

        __CLOVER_80_0.S[2016]++;if ((((serviceContext != null) && (++__CLOVER_80_0.CT[378] != 0)) || (++__CLOVER_80_0.CF[378] == 0))){
            __CLOVER_80_0.S[2017]++;count = serviceContext.length;}
View Full Code Here

    } finally { }}

    public void service(IEngineServiceView engine, IRequestCycle cycle, ResponseOutputStream output)
            throws ServletException, IOException
    {try { __CLOVER_100_0.M[3044]++;
        __CLOVER_100_0.S[12549]++;RequestContext context = cycle.getRequestContext();
        __CLOVER_100_0.S[12550]++;String[] serviceContext = getServiceContext(context);

        __CLOVER_100_0.S[12551]++;if ((((Tapestry.size(serviceContext) != 1) && (++__CLOVER_100_0.CT[2149] != 0)) || (++__CLOVER_100_0.CF[2149] == 0))){
            __CLOVER_100_0.S[12552]++;throw new ApplicationRuntimeException(Tapestry.format(
                    "service-single-parameter",
View Full Code Here

    {try { __CLOVER_318_0.M[1570]++;
        __CLOVER_318_0.S[7368]++;IEngine engine = _engineManager.getEngineInstance();

        __CLOVER_318_0.S[7369]++;request.setAttribute(Constants.INFRASTRUCTURE_KEY, _infrastructure);

        __CLOVER_318_0.S[7370]++;RequestContext context = new RequestContext(_servlet, request, response, _specification);

        __CLOVER_318_0.S[7371]++;try
        {
            __CLOVER_318_0.S[7372]++;engine.service(context);
        }
        finally
        {
            __CLOVER_318_0.S[7373]++;_engineManager.storeEngineInstance(engine);

            __CLOVER_318_0.S[7374]++;context.cleanup();
        }

    } finally { }}
View Full Code Here

TOP

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

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.