⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 abstractpetfc.java

📁 sping下勇Xdoclet开发hibernate的程序实例,版本hibernate2.0,开发工具eclipse3.0
💻 JAVA
字号:
package org.ggyy.web.ctrl;

import java.text.SimpleDateFormat;
import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.ggyy.dao.ICatDao;
import org.ggyy.service.exception.DuplicationFormSubmitException;
import org.springframework.beans.propertyeditors.CustomDateEditor;
import org.springframework.validation.BindException;
import org.springframework.web.bind.ServletRequestDataBinder;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.SimpleFormController;

abstract public class AbstractPetFC extends SimpleFormController {
    private ICatDao catDao;

    protected ModelAndView disallowDuplicateFormSubmission(
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        BindException errors = new BindException(formBackingObject(request),
                getCommandName());
        errors.reject("duplicateFormSubmission", null,
                "Duplicate form submission");
        throw new DuplicationFormSubmitException("duplicate form submission");
    }

    public ICatDao getCatDao() {
        return catDao;
    }

    public void setCatDao(ICatDao catDao) {
        this.catDao = catDao;
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -