View Javadoc

1   /*
2    * $Header: /cvsroot/jdbforms/dbforms/src/org/dbforms/taglib/DbPosTag.java,v 1.14 2006/01/13 13:38:51 hkollmann Exp $
3    * $Revision: 1.14 $
4    * $Date: 2006/01/13 13:38:51 $
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 AbstractDbBaseHandlerTag
37     implements javax.servlet.jsp.tagext.TryCatchFinally {
38  
39  	/***
40      * DOCUMENT ME!
41      *
42      * @return DOCUMENT ME!
43      *
44      * @throws javax.servlet.jsp.JspException DOCUMENT ME!
45      * @throws JspException DOCUMENT ME!
46      */
47     public int doEndTag() throws javax.servlet.jsp.JspException {
48        try {
49           StringBuffer tagBuf = new StringBuffer();
50           tagBuf.append(getParentForm().getTable().getId());
51           tagBuf.append("_");
52           tagBuf.append(getParentForm().getPositionPath());
53           pageContext.getOut()
54                      .write(Util.decode(tagBuf.toString(),
55                                         pageContext.getRequest().getCharacterEncoding()));
56        } catch (java.io.IOException ioe) {
57           throw new javax.servlet.jsp.JspException("IO Error: "
58                                                    + ioe.getMessage());
59        }
60  
61        return EVAL_PAGE;
62     }
63  
64  
65     /***
66      * DOCUMENT ME!
67      */
68     public void doFinally() {
69        super.doFinally();
70     }
71  }