KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > laures > cewolf > taglib > tags > ParamTag


1 /* ================================================================
2  * Cewolf : Chart enabling Web Objects Framework
3  * ================================================================
4  *
5  * Project Info: http://cewolf.sourceforge.net
6  * Project Lead: Guido Laures (guido@laures.de);
7  *
8  * (C) Copyright 2002, by Guido Laures
9  *
10  * This library is free software; you can redistribute it and/or modify it under the terms
11  * of the GNU Lesser General Public License as published by the Free Software Foundation;
12  * either version 2.1 of
13  * the License, or (at your option) any later version.
14  *
15  * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
16  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17  * See the GNU Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public License along with this
20  * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */

23
24 package de.laures.cewolf.taglib.tags;
25
26 import java.io.Serializable JavaDoc;
27
28 /**
29  * Tag <param> which defines a key/value pair which is set in the parent
30  * tag. This must implement the Parameterized interface.
31  * @see Parameterized
32  * @author Guido Laures
33  */

34 public class ParamTag extends CewolfBodyTag {
35
36     private String JavaDoc name;
37     private Object JavaDoc value;
38
39     public int doEndTag() {
40         Parameterized parent = (Parameterized)getParent();
41         parent.addParameter(name, value);
42         return doAfterEndTag(EVAL_PAGE);
43     }
44
45     protected void reset() {
46     }
47
48     public void setName(String JavaDoc name) {
49         this.name = name;
50     }
51
52     public void setValue(Serializable JavaDoc val) {
53         this.value = val;
54     }
55
56 }
57
Popular Tags