单行表多行表handler扩展说明
单行表handler扩展,一般单行表handler都是继承至com.kingdee.shr.base.syssetting.web.handler.SingleRowHandler这个基类handler,如果视图上没配置handler指令,默认就是走这个,handler扩展时候,就继承SingleRowHandler即可;如果视图上handler指令维护了值,那么handler扩展时候,就继承视图扩展的handler,
如下是demo,以DemoXXXSingleRowHandler继承基类为例
主要是重写两个方法:
editAction,页面上点击编辑按钮之前,后端在此可以增加校验逻辑
beforeSave,页面上维护完数据,点击保存,在保存之前增加校验逻辑
package com.kingdee.shr.base.syssetting.web.handler; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.ui.ModelMap; import com.kingdee.eas.framework.CoreBaseInfo; import com.kingdee.shr.base.syssetting.exception.SHRWebException; public class DemoXXXSingleRowHandler extends SingleRowHandler { @Override protected void beforeSave(HttpServletRequest request, HttpServletResponse response, CoreBaseInfo model) throws SHRWebException { super.beforeSave(request, response, model); //add your logic } @Override public String editAction(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap) throws SHRWebException { //add your logic return super.editAction(request, response, modelMap); } }
多行表handler扩展,一般多行表handler都是继承至com.kingdee.shr.base.syssetting.web.handler.MultiRowHandler这个基类handler,如果视图上没配置handler指令,默认就是走这个,handler扩展时候,就继承MultiRowHandler即可;如果视图上handler指令维护了值,那么handler扩展时候,就继承视图扩展的handler,
如下是demo,以DemoXXXMultiRowHandler继承基类为例
主要是重写两个方法:
editAction,页面上点击编辑按钮之前,后端在此可以增加校验逻辑
beforeSave,页面上维护完数据,点击保存,在保存之前增加校验逻辑
package com.kingdee.shr.base.syssetting.web.handler; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.ui.ModelMap; import com.kingdee.eas.framework.CoreBaseInfo; import com.kingdee.shr.base.syssetting.exception.SHRWebException; public class DemoXXXMultiRowHandler extends MultiRowHandler { @Override protected void beforeSave(HttpServletRequest request, HttpServletResponse response, CoreBaseInfo model) throws SHRWebException { super.beforeSave(request, response, model); //add your logic } @Override public String editAction(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap) throws SHRWebException { //add your logic return super.editAction(request, response, modelMap); } }
单行表多行表handler扩展说明
单行表handler扩展,一般单行表handler都是继承至com.kingdee.shr.base.syssetting.web.handler.SingleRowHandler这个基类handler,如果视...
点击下载文档
上一篇:表格编辑后保存报错下一篇:自定义列表列显示样式
本文2024-09-16 23:44:15发表“s-hr cloud知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-shr-56473.html
您需要登录后才可以发表评论, 登录登录 或者 注册
最新文档
热门文章