1 23 24 package org.dbforms.taglib; 25 26 import javax.servlet.jsp.*; 27 28 29 30 39 public class DbTextAreaForBlobsTag extends DbTextAreaTag 40 implements javax.servlet.jsp.tagext.TryCatchFinally { 41 private String suffix; 43 44 49 public void setSuffix(String suffix) { 50 this.suffix = suffix; 51 } 52 53 54 59 public String getSuffix() { 60 return suffix; 61 } 62 63 64 67 public void doCatch(Throwable t) throws Throwable { 68 throw t; 69 } 70 71 72 80 public int doEndTag() throws javax.servlet.jsp.JspException { 81 try { 82 super.doEndTag(); 83 84 StringBuffer suffixBuf = new StringBuffer ("<input type=\"hidden\" name=\""); 85 suffixBuf.append("suffix_" + getFormFieldName()); 86 suffixBuf.append("\" value=\""); 87 suffixBuf.append(suffix); 88 suffixBuf.append("\"/>"); 89 90 pageContext.getOut() 91 .write(suffixBuf.toString()); 92 93 StringBuffer fileNameBuf = new StringBuffer ("<input type=\"hidden\" name=\""); 94 fileNameBuf.append("fn_" + getFormFieldName()); 95 fileNameBuf.append("\" value=\""); 96 fileNameBuf.append(getFormFieldValue()); 97 fileNameBuf.append("\"/>"); 98 99 pageContext.getOut() 100 .write(fileNameBuf.toString()); 101 } catch (java.io.IOException e) { 102 throw new JspException("IO Error: " + e.getMessage()); 103 } 104 105 return EVAL_PAGE; 106 } 107 108 109 112 public void doFinally() { 113 suffix = null; 114 super.doFinally(); 115 } 116 117 118 125 public int doStartTag() throws javax.servlet.jsp.JspException { 126 super.doStartTag(); 127 128 return EVAL_BODY_BUFFERED; 129 } 130 } 131 | Popular Tags |