Package org.apache.tapestry.util

Examples of org.apache.tapestry.util.QueryParameterMap


     * Creates a new instance with a new map of parameters.
     */

    public ServiceEncodingImpl(String servletPath)
    {
        this(servletPath, null, new QueryParameterMap());
    }
View Full Code Here


    {
        WebRequest request = _infrastructure.getRequest();

        IMonitor monitor = _monitorFactory.createMonitor(request);

        QueryParameterMap parameters = extractParameters(request);

        decodeParameters(request.getActivationPath(), 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

        squeezeServiceParameters(parameters);

        PortletURL url = _renderResponse.createActionURL();

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

    public void testGetAbsoluteURL()
    {
        IRequestCycle cycle = newCycle();
        PortletURL url = newPortletURL();
        QueryParameterMap parameters = newParameters();

        replayControls();

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

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

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

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

        parameters.getParameterNames();
        control.setReturnValue(names);

        replayControls();

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

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

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

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

        parameters.getParameterValues("bedrock");
        control.setReturnValue(values);

        replayControls();

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

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

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

        parameters.getParameterNames();
        control.setReturnValue(new String[0]);

        replayControls();

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

    public void testGetURLLongForm()
    {
        IRequestCycle cycle = newCycle();
        PortletURL url = newPortletURL();

        QueryParameterMap parameters = (QueryParameterMap) newMock(QueryParameterMap.class);

        parameters.getParameterNames();
        setReturnValue(parameters, new String[]
        { "page" });

        parameters.getParameterValues("page");
        String[] values = new String[]
        { "View" };
        setReturnValue(parameters, values);

        url.setParameter("page", values);
View Full Code Here

    public void testGetURLUnencoding()
    {
        IRequestCycle cycle = newCycle();
        PortletURL url = new PortletURLFixture("this=foo&that=bar");

        QueryParameterMap parameters = (QueryParameterMap) newMock(QueryParameterMap.class);

        parameters.getParameterNames();
        setReturnValue(parameters, new String[0]);

        replayControls();

        ILink link = new PortletLink(cycle, url, parameters, false);
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.