public abstract class EController
extends com.jfinal.core.Controller
| 限定符和类型 | 字段和说明 |
|---|---|
protected HashMap<String,Object> |
flashMessages
FlashMessage:向前端发送服务器消息,通常用于反馈表单提交结果
|
| 构造器和说明 |
|---|
EController() |
| 限定符和类型 | 方法和说明 |
|---|---|
EAttr |
attr()
获得Attr
|
protected String |
generatorHtml(String html,
String filePath)
将HTML写入静态文件
|
<T> T |
getFlashAttr(String name)
返回单项FlashMessage
|
HashMap<String,Object> |
getFlashMap()
返回多项FlashMessage
|
String |
getFlashMsg()
返回单项FlashMessage
|
HTTP |
getMethod()
获得请求类型:GET / POST
|
String |
getPara()
获得参数,同时进行Url解码,避免汉字乱码
|
String |
getPara(int index)
按索引获得参数,同时进行Url解码,避免汉字乱码
|
String |
getPara(int index,
String defaultValue)
按索引获得参数,设置默认值,同时进行Url解码,避免汉字乱码
|
String |
getPara(String name)
按别名获得参数,同时进行Url解码,避免汉字乱码
|
String |
getPara(String name,
String defaultValue)
按别名获得参数,设置默认值,同时进行Url解码,避免汉字乱码
|
Map<String,String> |
getParaData()
获得参数表
|
String |
getRawData() |
<T> T |
getRawDataTo(Class<?> targetClass) |
com.jfinal.kit.Kv |
getRawDataToKv() |
protected String |
getUpload(BufferedImage file)
文件上传,并返回url
|
protected String |
getUpload(BufferedImage file,
String subPath)
文件上传,并返回url
|
protected String |
getUpload(File file)
文件上传,并返回url
|
protected String |
getUpload(File file,
String subPath)
文件上传,并返回url
|
protected Map<String,String> |
paramDeserialize(String params)
将参数反序列化
|
protected EPara |
paramPack()
将参数打包成对象,便于传递与获取
|
protected EPara |
paramPack(boolean autoUpload)
将参数打包成对象,便于传递与获取
|
protected EPara |
paramPack(String fileSubPath)
将参数打包成对象,便于传递与获取
|
protected String |
paramSerialize(String... ignore)
将接收到的参数序列化
|
<T> T |
parseBean(Class<T> beanClass)
将接收到的表单数据解析成指定的Model对象实例
|
protected List<com.jfinal.plugin.activerecord.Record> |
parseRecords(List<? extends com.jfinal.plugin.activerecord.Model> models)
将Model列表转换为Record列表
|
void |
renderErr(AuthCode authCode)
渲染到错误页面
|
void |
renderErrHelp(AuthCode authCode,
String errMsg,
String helpUrl)
渲染到错误页面,包括推荐链接
|
void |
renderErrMsg(AuthCode authCode,
String errMsg)
渲染到错误页面
|
EServletRequestWrapper |
request()
获得Request
|
javax.servlet.http.HttpServletResponse |
response()
获得Response
|
ESessionBase |
session()
获得Session
|
com.jfinal.core.Controller |
setFlashAttr(String name,
Object value)
设置单项FlashMessage
|
com.jfinal.core.Controller |
setFlashMap(Map map)
设置多项FlashMessage
|
com.jfinal.core.Controller |
setFlashMsg(String msg)
设置单项FlashMessage
|
protected String |
UrlDecoder(String paraValue)
URL编码
|
_clear_, checkUrlPara, checkUrlPara, createToken, createToken, createToken, enhance, forwardAction, get, get, get, get, getAopProxy, getAttr, getAttr, getAttrForInt, getAttrForStr, getAttrNames, getBean, getBean, getBean, getBean, getBoolean, getBoolean, getBoolean, getBoolean, getBoolean, getControllerKey, getCookie, getCookie, getCookieObject, getCookieObjects, getCookieToInt, getCookieToInt, getCookieToLong, getCookieToLong, getDate, getDate, getFile, getFile, getFile, getFile, getFile, getFiles, getFiles, getFiles, getFiles, getHeader, getInt, getInt, getInt, getInt, getInt, getKv, getLong, getLong, getLong, getLong, getLong, getModel, getModel, getModel, getModel, getParaMap, getParaNames, getParaToBoolean, getParaToBoolean, getParaToBoolean, getParaToBoolean, getParaToBoolean, getParaToDate, getParaToDate, getParaToDate, getParaToInt, getParaToInt, getParaToInt, getParaToInt, getParaToInt, getParaToLong, getParaToLong, getParaToLong, getParaToLong, getParaToLong, getParaValues, getParaValuesToInt, getParaValuesToLong, getRender, getRequest, getResponse, getSession, getSession, getSessionAttr, getSessionAttr, getViewPath, isParaBlank, isParaBlank, isParaExists, isParaExists, keepBean, keepBean, keepModel, keepModel, keepPara, keepPara, keepPara, keepPara, redirect, redirect, redirect301, redirect301, removeAttr, removeCookie, removeCookie, removeCookie, removeSessionAttr, render, render, render, renderCaptcha, renderError, renderError, renderError, renderFile, renderFile, renderFile, renderFile, renderFreeMarker, renderHtml, renderJavascript, renderJson, renderJson, renderJson, renderJson, renderJson, renderJsp, renderNull, renderQrCode, renderQrCode, renderTemplate, renderText, renderText, renderText, renderToString, renderVelocity, renderXml, set, setAttr, setAttrs, setCookie, setCookie, setCookie, setCookie, setCookie, setCookie, setHttpServletRequest, setHttpServletResponse, setSessionAttr, setUrlPara, validateCaptcha, validateToken, validateTokenpublic HTTP getMethod()
public String getPara()
getPara 在类中 com.jfinal.core.Controllerpublic String getPara(int index)
getPara 在类中 com.jfinal.core.Controllerpublic String getPara(int index, String defaultValue)
getPara 在类中 com.jfinal.core.Controllerpublic String getPara(String name)
getPara 在类中 com.jfinal.core.Controllerpublic String getPara(String name, String defaultValue)
getPara 在类中 com.jfinal.core.Controllerpublic <T> T parseBean(Class<T> beanClass)
modelClass - public void renderErr(AuthCode authCode)
public void renderErrHelp(AuthCode authCode, String errMsg, String helpUrl)
public com.jfinal.core.Controller setFlashMsg(String msg)
name - value - public com.jfinal.core.Controller setFlashAttr(String name, Object value)
name - value - public com.jfinal.core.Controller setFlashMap(Map map)
map - public String getFlashMsg()
name - public <T> T getFlashAttr(String name)
name - public EAttr attr()
public javax.servlet.http.HttpServletResponse response()
public EServletRequestWrapper request()
public ESessionBase session()
public String getRawData()
getRawData 在类中 com.jfinal.core.Controllerpublic <T> T getRawDataTo(Class<?> targetClass)
public com.jfinal.kit.Kv getRawDataToKv()
protected String getUpload(BufferedImage file)
file - protected String getUpload(File file, String subPath)
file - subPath - protected String getUpload(BufferedImage file, String subPath)
file - subPath - protected Map<String,String> paramDeserialize(String params)
params - protected EPara paramPack()
protected EPara paramPack(boolean autoUpload)
protected EPara paramPack(String fileSubPath)
fileSubPath - 上传文件子路径,默认为:filesprotected List<com.jfinal.plugin.activerecord.Record> parseRecords(List<? extends com.jfinal.plugin.activerecord.Model> models)
models - Copyright © 2020. All rights reserved.