KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > jaspersoft > jasperserver > war > tags > ParametersFormTag


1 /*
2  * Copyright (C) 2006 JasperSoft http://www.jaspersoft.com
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed WITHOUT ANY WARRANTY; and without the
10  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11  * See the GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
15  * or write to:
16  *
17  * Free Software Foundation, Inc.,
18  * 59 Temple Place - Suite 330,
19  * Boston, MA USA 02111-1307
20  */

21 package com.jaspersoft.jasperserver.war.tags;
22
23 import javax.servlet.jsp.JspException JavaDoc;
24 import javax.servlet.jsp.tagext.TagSupport JavaDoc;
25
26 import org.apache.commons.logging.Log;
27 import org.apache.commons.logging.LogFactory;
28
29
30 /**
31  * @author Ionut Nedelcu (ionutned@users.sourceforge.net)
32  * @version $Id: ParametersFormTag.java 4363 2006-08-30 03:40:51Z swood $
33  */

34 public class ParametersFormTag extends TagSupport JavaDoc
35 {
36     private static final Log log = LogFactory.getLog(ParametersFormTag.class);
37     
38     public static final String JavaDoc DEFAULT_RENDER_JSP = "/WEB-INF/jsp/DefaultParametersForm.jsp";
39     public static final String JavaDoc REPORT_PARAMETERS_ATTR = "reportparams";
40     public static final String JavaDoc WRAPPERS_ATTR = "wrappers";
41     public static final String JavaDoc SUBMIT_PARAM = "_eventId_submit";
42     public static final String JavaDoc CANCEL_PARAM = "_eventId_cancel";
43
44     private String JavaDoc renderJsp;
45     private String JavaDoc reportName;
46
47
48     /**
49      *
50      */

51     public int doEndTag() throws JspException JavaDoc
52     {
53         try {
54             pageContext.include(getRenderJsp());
55
56         } catch (Exception JavaDoc e) {
57             log.error(e, e);
58             throw new JspException JavaDoc(e);
59         }
60
61         return EVAL_PAGE;
62     }
63
64
65     /**
66      *
67      */

68     public String JavaDoc getRenderJsp() {
69         if (renderJsp == null || renderJsp.trim().length() == 0) {
70             return DEFAULT_RENDER_JSP;
71         }
72         return renderJsp;
73     }
74
75     /**
76      *
77      */

78     public void setRenderJsp(String JavaDoc renderJsp) {
79         this.renderJsp = renderJsp;
80     }
81
82     public String JavaDoc getReportName()
83     {
84         return reportName;
85     }
86
87     public void setReportName(String JavaDoc reportName)
88     {
89         this.reportName = reportName;
90     }
91 }
92
Popular Tags