Package net.csdn.common.exception

Examples of net.csdn.common.exception.RenderFinish


    //渲染输出
    public void render(int status, String content) {
        restResponse.originContent(content);
        restResponse.write(status, content);
        throw new RenderFinish();
    }
View Full Code Here


    //默认json
    public void render(int status, Object result) {
        restResponse.originContent(result);
        restResponse.write(status, toJson(result));
        throw new RenderFinish();
    }
View Full Code Here

        throw new RenderFinish();
    }

    public void redirectTo(String url, Map params) {
        restResponse.redirectTo(url, params);
        throw new RenderFinish();
    }
View Full Code Here

    }

    public void render(int status, String content, ViewType viewType) {
        restResponse.originContent(content);
        restResponse.write(status, content, viewType);
        throw new RenderFinish();
    }
View Full Code Here

            StringWriter w = new StringWriter();
            Velocity.mergeTemplate(toUnderscoreCase(getControllerNameWithoutSuffix()) + "/" + toUnderscoreCase(getActionName()) + ".vm", "utf-8", context, w);
            restResponse.write(status, w.toString(), viewType);
        }
        throw new RenderFinish();
    }
View Full Code Here


    public void render(String content) {
        restResponse.originContent(content);
        restResponse.write(content);
        throw new RenderFinish();
    }
View Full Code Here


    public void render(Object result) {
        restResponse.originContent(result);
        restResponse.write(toJson(result));
        throw new RenderFinish();
    }
View Full Code Here


    public void render(String content, ViewType viewType) {
        restResponse.originContent(content);
        restResponse.write(content, viewType);
        throw new RenderFinish();
    }
View Full Code Here


    public void render(Object result, ViewType viewType) {
        restResponse.originContent(result);
        restResponse.write(viewType == ViewType.xml ? toXML(result) : toJson(result), viewType);
        throw new RenderFinish();
    }
View Full Code Here

TOP

Related Classes of net.csdn.common.exception.RenderFinish

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.