ShowStyleName.java
上传用户:zghglow
上传日期:2022-08-09
资源大小:27227k
文件大小:2k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

JavaScript

  1. package com.chinacannel.xlchemical.Tag;
  2. import javax.servlet.jsp.tagext.*;
  3. import javax.servlet.jsp.JspException;
  4. import javax.servlet.jsp.JspWriter;
  5. public class ShowStyleName extends TagSupport {
  6.     private Long style;
  7.     public Long getStyle() {
  8.         return style;
  9.     }
  10.     public void setStyle(Long style) {
  11.         this.style = style;
  12.     }
  13.     public int doStartTag() throws JspException {
  14.         String name = "";
  15.         try {
  16.             JspWriter out = pageContext.getOut();
  17.             String Language = "";
  18.             if (this.pageContext.getSession().getAttribute("Language") != null) {
  19.                 Language = this.pageContext.getSession().getAttribute(
  20.                         "Language").toString();
  21.             }
  22.             if (this.getStyle().equals(new Long(1))) {
  23.                 if (Language.equals("CN")) {
  24.                     name = "企业信息";
  25.                 } else {
  26.                     name = "Profile";
  27.                 }
  28.             } else if (this.getStyle().equals(new Long(2))) {
  29.                 if (Language.equals("CN")) {
  30.                     name = "企业文化";
  31.                 } else {
  32.                     name = "Culture";
  33.                 }
  34.             } else if (this.getStyle().equals(new Long(3))) {
  35.                 if (Language.equals("CN")) {
  36.                     name = "新闻公告";
  37.                 } else {
  38.                     name = "News Notice";
  39.                 }
  40.             } else if (this.getStyle().equals(new Long(4))) {
  41.                 if (Language.equals("CN")) {
  42.                     name = "股东天地";
  43.                 } else {
  44.                     name = "Partners";
  45.                 }
  46.             } else if (this.getStyle().equals(new Long(5))) {
  47.                 if (Language.equals("CN")) {
  48.                     name = "生产经营";
  49.                 } else {
  50.                     name = "Product";
  51.                 }
  52.             } else if (this.getStyle().equals(new Long(6))) {
  53.                 if (Language.equals("CN")) {
  54.                     name = "人力资源";
  55.                 } else {
  56.                     name = "Human Resource";
  57.                 }
  58.             }
  59.             out.print(name);
  60.         } catch (Exception e) {
  61.             throw new JspException(e);
  62.         }
  63.         return 0;
  64.     }
  65. }