public abstract class AbstractPageProcess extends SucangServletRequest implements ICatalogPageProcess
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
action |
protected Catalog |
catalog |
protected FormInfoService |
formInfoService |
protected boolean |
isMulti |
protected BaseJdbcDao |
jdbcDao |
protected org.apache.log4j.Logger |
logger |
protected java.lang.String |
message |
protected ModelMap |
modelMap |
protected MultipartHttpServletRequest |
multipartRequest |
protected java.io.PrintWriter |
out |
protected java.lang.String |
redirectUrl |
protected HttpServletRequest |
request |
protected HttpServletResponse |
response |
protected WebPage |
webpage |
DEFAULT_ENCODING, HTML_CONTENT_TYPE, innerReq, WAP_CONTENT_TYPE
Constructor and Description |
---|
AbstractPageProcess() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
doClientAction(HttpServletRequest request,
Catalog catalog)
用于获取执行分类内嵌入事件或脚本代码,只有查看视图操作时会执行
|
java.lang.String[] |
getClientScript()
获取客户端浏览器用的脚本引用名称,如:["/js/catalog/officialDoc.js"]
|
java.lang.String |
getMessage()
用于返回后处理提示信息。
|
java.lang.String |
getRedirectUrl()
用于init返回失败时转向的URL地址
|
protected MultipartFile |
getUploadFile(java.lang.String fname)
//根据getUploadNames()的得到文件对象
|
protected java.lang.String[] |
getUploadNames(java.lang.String prefix) |
void |
historyBack(java.lang.String msg) |
int |
init(HttpServletRequest request,
HttpServletResponse response,
boolean isMultipart) |
int |
onAfterSave(java.lang.String dataid)
表示保存后执行的方法。如果需要提示用户保存失败,可以返回小于0的值即可。
具体错误详情可以在getMessage()方法中返回.
|
boolean |
onBeforeSave(LayoutDataImpl data,
boolean isEdit)
表示保存前执行的方法,返回值为false则表示不保存数据
|
void |
setModelData(ModelMap datas) |
getArrays, getBeanMap, getBeanMap, getBoolean, getClearTypeObject, getDate, getDouble, getFloat, getID, getInputString, getInt, getLong, getParamBean, getShort, getString, getString, initRequest
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
destroy
protected org.apache.log4j.Logger logger
protected HttpServletRequest request
protected HttpServletResponse response
protected boolean isMulti
protected BaseJdbcDao jdbcDao
protected java.lang.String action
protected java.lang.String redirectUrl
protected java.lang.String message
protected FormInfoService formInfoService
protected java.io.PrintWriter out
protected MultipartHttpServletRequest multipartRequest
protected Catalog catalog
protected WebPage webpage
protected ModelMap modelMap
public int init(HttpServletRequest request, HttpServletResponse response, boolean isMultipart)
init
in interface ICatalogPageProcess
public void historyBack(java.lang.String msg)
public java.lang.String getRedirectUrl()
ICatalogPageProcess
getRedirectUrl
in interface ICatalogPageProcess
protected java.lang.String[] getUploadNames(java.lang.String prefix)
protected MultipartFile getUploadFile(java.lang.String fname)
fname
- as Stringpublic java.lang.String getMessage()
ICatalogPageProcess
getMessage
in interface ICatalogPageProcess
public boolean onBeforeSave(LayoutDataImpl data, boolean isEdit)
ICatalogPageProcess
onBeforeSave
in interface ICatalogPageProcess
isEdit
- as boolean //表示当前内容是编辑,还是新增第一次保存public final void setModelData(ModelMap datas)
public int onAfterSave(java.lang.String dataid)
ICatalogPageProcess
onAfterSave
in interface ICatalogPageProcess
dataid
- as String //参数是当前记录的idpublic java.lang.String doClientAction(HttpServletRequest request, Catalog catalog)
ICatalogPageProcess
doClientAction
in interface ICatalogPageProcess
request
- as HttpServletRequestpublic java.lang.String[] getClientScript()
ICatalogPageProcess
getClientScript
in interface ICatalogPageProcess
Copyright © 2019 by Sucang.cn