public class JsonRender extends Render
IE 不支持content type 为 application/json, 在 ajax 上传文件完成后返回 json时 IE 提示下载文件,
解决办法是使用: render(new JsonRender(params).forIE());
Constructor and Description |
---|
JsonRender() |
JsonRender(Object object) |
JsonRender(String jsonText) |
JsonRender(String[] attrs) |
JsonRender(String key,
Object value) |
Modifier and Type | Method and Description |
---|---|
static void |
addExcludedAttrs(String... attrs)
仅对无参 renderJson() 起作用
|
static void |
clearExcludedAttrs() |
JsonRender |
forIE() |
String[] |
getAttrs() |
Boolean |
getForIE() |
String |
getJsonText() |
static void |
removeExcludedAttrs(String... attrs) |
void |
render()
Render to client
|
getDevMode, getEncoding, getView, setContext, setContext, setView
public JsonRender()
public JsonRender(String[] attrs)
public JsonRender(String jsonText)
public JsonRender(Object object)
public static void addExcludedAttrs(String... attrs)
public static void removeExcludedAttrs(String... attrs)
public static void clearExcludedAttrs()
public JsonRender forIE()
public void render()
Render
public String[] getAttrs()
public String getJsonText()
public Boolean getForIE()
Copyright © 2018. All rights reserved.