KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > dbforms > taglib > DbTextAreaForBlobsTag


1 /*
2  * $Header: /cvsroot/jdbforms/dbforms/src/org/dbforms/taglib/DbTextAreaForBlobsTag.java,v 1.12 2004/08/18 12:26:08 hkollmann Exp $
3  * $Revision: 1.12 $
4  * $Date: 2004/08/18 12:26:08 $
5  *
6  * DbForms - a Rapid Application Development Framework
7  * Copyright (C) 2001 Joachim Peer <joepeer@excite.com>
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22  */

23
24 package org.dbforms.taglib;
25
26 import javax.servlet.jsp.*;
27
28
29
30 /**
31  * <p>
32  * This tag renders a HTML TextArea - Element
33  * </p>
34  * this tag renders a dabase-datadriven textArea, which is an active element -
35  * the user can change data
36  *
37  * @author Joachim Peer
38  */

39 public class DbTextAreaForBlobsTag extends DbTextAreaTag
40    implements javax.servlet.jsp.tagext.TryCatchFinally JavaDoc {
41    // logging category for this class
42
private String JavaDoc suffix;
43
44    /**
45     * DOCUMENT ME!
46     *
47     * @param suffix DOCUMENT ME!
48     */

49    public void setSuffix(String JavaDoc suffix) {
50       this.suffix = suffix;
51    }
52
53
54    /**
55     * DOCUMENT ME!
56     *
57     * @return DOCUMENT ME!
58     */

59    public String JavaDoc getSuffix() {
60       return suffix;
61    }
62
63
64    /**
65     * @see javax.servlet.jsp.tagext.TryCatchFinally#doCatch(java.lang.Throwable)
66     */

67    public void doCatch(Throwable JavaDoc t) throws Throwable JavaDoc {
68       throw t;
69    }
70
71
72    /**
73     * DOCUMENT ME!
74     *
75     * @return DOCUMENT ME!
76     *
77     * @throws javax.servlet.jsp.JspException DOCUMENT ME!
78     * @throws JspException DOCUMENT ME!
79     */

80    public int doEndTag() throws javax.servlet.jsp.JspException JavaDoc {
81       try {
82          super.doEndTag();
83
84          StringBuffer JavaDoc suffixBuf = new StringBuffer JavaDoc("<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 JavaDoc fileNameBuf = new StringBuffer JavaDoc("<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 JavaDoc e) {
102          throw new JspException("IO Error: " + e.getMessage());
103       }
104
105       return EVAL_PAGE;
106    }
107
108
109    /**
110     * DOCUMENT ME!
111     */

112    public void doFinally() {
113       suffix = null;
114       super.doFinally();
115    }
116
117
118    /**
119     * DOCUMENT ME!
120     *
121     * @return DOCUMENT ME!
122     *
123     * @throws javax.servlet.jsp.JspException DOCUMENT ME!
124     */

125    public int doStartTag() throws javax.servlet.jsp.JspException JavaDoc {
126       super.doStartTag();
127
128       return EVAL_BODY_BUFFERED;
129    }
130 }
131
Popular Tags