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

📄 displaycontractbackup.java

📁 一个关于tlms的一个小程序 看看能否帮助到别人
💻 JAVA
字号:
package com.szmx.tlms.contractManage.web.tag;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.commons.lang.StringUtils;
import org.displaytag.tags.el.ExpressionEvaluator;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.TagSupport;

import com.szmx.framework.util.StringUtil;
import com.szmx.framework.spring.context.ApplicationContextUtil;
import com.szmx.tlms.admin.service.ContractMemoireService;
import com.szmx.tlms.admin.model.ContractMemoire;
import com.szmx.tlms.TlmsServiceException;

/**
 * Created by IntelliJ IDEA.
 * User: Administrator
 * Date: 2006-8-20
 * Time: 16:35:38
 * To change this template use File | Settings | File Templates.
 */
public class DisplayContractBackup extends TagSupport {
    protected final Log log = LogFactory.getLog(getClass());
    private String contractBackupID;

    public String getContractBackupID() {
        return contractBackupID;
    }

    public void setContractBackupID(String contractBackupID) {
        this.contractBackupID = contractBackupID;
    }

    public int doStartTag() throws JspException {
        JspWriter out = pageContext.getOut();
        ExpressionEvaluator eval = new ExpressionEvaluator(this, pageContext);
        this.contractBackupID = eval.evalString("contractBackupID", this.contractBackupID);

        try {
            if (StringUtil.isNull(contractBackupID)) {
                out.println("");
            }
            //display the role name according to the company id
            ContractMemoireService service = (ContractMemoireService) ApplicationContextUtil.getBean("contractMemoireService");
            if (service != null && StringUtils.isNumeric(this.contractBackupID)) {
                ContractMemoire contractMemoire = service.getContractMemoire(Long.valueOf(this.contractBackupID));
                String name = contractMemoire.getContractID();
                out.println(name);
            } else {
                out.println("");
            }

        } catch (TlmsServiceException e) {
            log.error("TlmsServiceException", e);
        } catch (Exception e) {
            log.error("Exception", e);
        }

        return super.doStartTag();
    }

}

⌨️ 快捷键说明

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