1 6 7 package com.quikj.application.web.talk.jspbeans; 8 9 import javax.servlet.http.*; 10 import javax.servlet.jsp.*; 11 import java.io.*; 12 13 17 public class ChatEmailMessageTag extends javax.servlet.jsp.tagext.TagSupport 18 { 19 20 21 private String rows; 22 23 24 private String cols; 25 26 27 public ChatEmailMessageTag() 28 { 29 } 30 31 public int doStartTag() 32 { 33 try 34 { 35 JspWriter out = pageContext.getOut(); 36 HttpServletRequest request = (HttpServletRequest)pageContext.getRequest(); 37 38 out.print("<textarea name=\"body\""); 39 40 if (cols != null) 41 { 42 out.print (" cols=\"" + cols + "\""); 43 } 44 45 if (rows != null) 46 { 47 out.print (" rows=\"" + rows + "\""); 48 } 49 50 out.println (">"); 51 52 String value = ((ContactCenterEmailForm)(request.getAttribute("formBean"))).getMessage(); 53 54 out.println(value + "</textarea>"); 55 56 } 57 catch (IOException ex) 58 { 59 return SKIP_PAGE; 60 } 61 62 return EVAL_PAGE; 63 } 64 65 69 public String getRows() 70 { 71 return this.rows; 72 } 73 74 78 public void setRows(String rows) 79 { 80 this.rows = rows; 81 } 82 83 87 public String getCols() 88 { 89 return this.cols; 90 } 91 92 96 public void setCols(String cols) 97 { 98 this.cols = cols; 99 } 100 101 } 102 | Popular Tags |