Package org.grails.web.servlet.mvc

Examples of org.grails.web.servlet.mvc.DefaultRequestStateLookupStrategy


    }

    @SuppressWarnings("unchecked")
    private String createURLWithWebRequest(Map parameterValues, GrailsWebRequest webRequest, boolean includeContextPath) {

        GrailsRequestStateLookupStrategy requestStateLookupStrategy = new DefaultRequestStateLookupStrategy(webRequest);

        final String encoding = requestStateLookupStrategy.getCharacterEncoding();

        String id = null;
        if (parameterValues.containsKey(ARGUMENT_ID)) {
            Object o = parameterValues.get(ARGUMENT_ID);
            if (o != null) {
                id = o.toString();
            }
        }

        FastStringWriter actualUriBuf = new FastStringWriter();
        if (includeContextPath) {
            actualUriBuf.append(requestStateLookupStrategy.getContextPath());
        }
        if (actionName != null) {
            if (actionName.indexOf(SLASH) > -1) {
                actualUriBuf.append(actionName);
            }
            else {
                if (controllerName != null) {
                    appendUrlToken(actualUriBuf, controllerName, encoding);
                }
                else {
                    appendUrlToken(actualUriBuf, requestStateLookupStrategy.getControllerName(), encoding);
                }
            }
            appendUrlToken(actualUriBuf, actionName, encoding);
        }
        if (id != null) {
View Full Code Here

TOP

Related Classes of org.grails.web.servlet.mvc.DefaultRequestStateLookupStrategy

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.