KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * $Header: /cvsroot/jdbforms/dbforms/src/org/dbforms/taglib/DbPosTag.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 org.dbforms.util.Util;
27
28
29
30 /**
31  * <p>
32  * renders a position to use with keyToDestPos. This is the same string wich
33  * would be used as value in the DbassociatedRadioTag.
34  * </p>
35  */

36 public class DbPosTag extends DbBaseHandlerTag
37    implements javax.servlet.jsp.tagext.TryCatchFinally JavaDoc {
38    /**
39     * @see javax.servlet.jsp.tagext.TryCatchFinally#doCatch(java.lang.Throwable)
40     */

41    public void doCatch(Throwable JavaDoc t) throws Throwable JavaDoc {
42       throw t;
43    }
44
45
46    /**
47     * DOCUMENT ME!
48     *
49     * @return DOCUMENT ME!
50     *
51     * @throws javax.servlet.jsp.JspException DOCUMENT ME!
52     * @throws JspException DOCUMENT ME!
53     */

54    public int doEndTag() throws javax.servlet.jsp.JspException JavaDoc {
55       try {
56          StringBuffer JavaDoc tagBuf = new StringBuffer JavaDoc();
57          tagBuf.append(getParentForm().getTable().getId());
58          tagBuf.append("_");
59          tagBuf.append(getParentForm().getPositionPath());
60          pageContext.getOut()
61                     .write(Util.decode(tagBuf.toString(),
62                                        pageContext.getRequest().getCharacterEncoding()));
63       } catch (java.io.IOException JavaDoc ioe) {
64          throw new javax.servlet.jsp.JspException JavaDoc("IO Error: "
65                                                   + ioe.getMessage());
66       }
67
68       return EVAL_PAGE;
69    }
70
71
72    /**
73     * DOCUMENT ME!
74     */

75    public void doFinally() {
76       super.doFinally();
77    }
78 }
79
Popular Tags