Package org.apache.tapestry.util

Examples of org.apache.tapestry.util.QueryParameterMap


    {
        IRequestCycle cycle = newCycle();
        PortletURL url = newPortletURL();

        MockControl control = newControl(QueryParameterMap.class);
        QueryParameterMap parameters = (QueryParameterMap) control.getMock();

        String[] values =
        { "Fred", "Barney" };

        parameters.getParameterNames();
        control.setReturnValue(new String[]
        { "bedrock" });
        parameters.getParameterValues("bedrock");
        control.setReturnValue(values);

        url.setParameter("bedrock", values);

        replayControls();
View Full Code Here


        IRequestCycle cycle = (IRequestCycle) cyclec.getMock();

        cycle.encodeURL(url.toString());
        cyclec.setReturnValue("/encoded-url");

        QueryParameterMap parameters = newParameters();

        replayControls();

        ILink link = new PortletLink(cycle, url, parameters, true);
View Full Code Here

    {
        finalizeParameters(service, parameters);

        PortletURL url = _renderResponse.createActionURL();

        return new PortletLink(_requestCycle, url, new QueryParameterMap(parameters), stateful);
    }
View Full Code Here

    {
        WebRequest request = _infrastructure.getRequest();

        IMonitor monitor = _monitorFactory.createMonitor(request);

        QueryParameterMap parameters = extractParameters(request);

        decodeParameters(request.getActivationPath(), request.getPathInfo(), parameters);

        String serviceName = findService(parameters);
View Full Code Here

     * file upload parameters!).
     */

    private QueryParameterMap extractParameters(WebRequest request)
    {
        QueryParameterMap result = new QueryParameterMap();

        Iterator i = request.getParameterNames().iterator();

        while (i.hasNext())
        {
            String name = (String) i.next();

            String[] values = request.getParameterValues(name);

            if (values.length == 1)
                result.setParameterValue(name, values[0]);
            else
                result.setParameterValues(name, values);
        }

        return result;
    }
View Full Code Here

    public IRequestCycle newRequestCycle(IEngine engine)
    {
        WebRequest request = _infrastructure.getRequest();
       
        QueryParameterMap parameters = extractParameters(request);
       
        decodeParameters(request.getActivationPath(), request.getPathInfo(), parameters);
       
        String serviceName = findService(parameters);
       
View Full Code Here

     * file upload parameters!).
     */

    private QueryParameterMap extractParameters(WebRequest request)
    {
        QueryParameterMap result = new QueryParameterMap();

        Iterator i = request.getParameterNames().iterator();

        while (i.hasNext())
        {
            String name = (String) i.next();

            String[] values = request.getParameterValues(name);

            if (values.length == 1)
                result.setParameterValue(name, values[0]);
            else
                result.setParameterValues(name, values);
        }

        return result;
    }
View Full Code Here

        _servletPath = servletPath;
        _encoding = encoding;
        _codec = codec;
        _request = request;
        _stateful = stateful;
        _parameters = new QueryParameterMap(parameters);
    }
View Full Code Here

        _servletPath = servletPath;
        _encoding = encoding;
        _codec = codec;
        _request = request;
        _stateful = stateful;
        _parameters = new QueryParameterMap(parameters);
    }
View Full Code Here

    }

    public void testGetAbsoluteURL()
    {
        PortletURL url = newPortletURL();
        QueryParameterMap parameters = org.easymock.classextension.EasyMock.createMock(QueryParameterMap.class);

        replay();
        org.easymock.classextension.EasyMock.replay(parameters);
       
        ILink link = new PortletLink(url, parameters);
View Full Code Here

TOP

Related Classes of org.apache.tapestry.util.QueryParameterMap

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.