KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > mlw > vlh > web > tag > TableInfo


1 /**
2  * Copyright (c) 2003 held jointly by the individual authors.
3  *
4  * This library is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser General Public License as published
6  * by the Free Software Foundation; either version 2.1 of the License, or
7  * (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; with out even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this library; if not, write to the Free Software Foundation,
16  * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
17  *
18  * > http://www.gnu.org/copyleft/lesser.html
19  * > http://www.opensource.org/licenses/lgpl-license.php
20  */

21 package net.mlw.vlh.web.tag;
22
23 import java.util.HashMap JavaDoc;
24 import java.util.Map JavaDoc;
25
26 import javax.servlet.jsp.PageContext JavaDoc;
27
28 import net.mlw.vlh.web.ValueListConfigBean;
29
30 /**
31  * @author Matthew L. Wilson
32  * @version $Revision: 1.9 $ $Date: 2005/11/23 14:51:53 $
33  */

34 public class TableInfo
35 {
36    public static final String JavaDoc DEFAULT_ID = "";
37
38    private String JavaDoc id = DEFAULT_ID;
39
40    /** The web address to post to if actions are desired. * */
41    private String JavaDoc url;
42
43    /** The name of the ValueList. * */
44    private String JavaDoc name;
45
46    /** Holds the included parameters. */
47    private Map JavaDoc parameters = new HashMap JavaDoc();
48
49    private ValueListConfigBean config;
50
51    private PageContext JavaDoc pageContext;
52
53    /** Default constructor. */
54    public TableInfo(String JavaDoc id)
55    {
56       this.id = id;
57    }
58
59    /**
60     * Gets the base url that the links are build upon.
61     *
62     * @return The base url that the links are build upon.
63     */

64    public String JavaDoc getUrl()
65    {
66       return url;
67    }
68
69    /**
70     * Sets the base url that the links are build upon.
71     *
72     * @param url
73     * The base url that the links are build upon.
74     */

75    public void setUrl(String JavaDoc url)
76    {
77       this.url = url;
78    }
79
80    /**
81     * @return Returns the parameters.
82     */

83    public Map JavaDoc getParameters()
84    {
85       return parameters;
86    }
87
88    // public String getParametersAsString()
89
// {
90
// return JspUtils.toUrlString(parameters);
91
// }
92

93    // public String getParametersAsString(List exclude)
94
// {
95
// return JspUtils.toUrlString(parameters, exclude);
96
// }
97

98    /**
99     * @return Returns the name.
100     */

101    public String JavaDoc getName()
102    {
103       return name;
104    }
105
106    /**
107     * @param name
108     * The name to set.
109     */

110    public void setName(String JavaDoc name)
111    {
112       this.name = name;
113    }
114
115    /**
116     * @return Returns the id.
117     */

118    public String JavaDoc getId()
119    {
120       return id;
121    }
122
123    /**
124     * @param id The id to set.
125     */

126    public void setId(String JavaDoc id)
127    {
128       if (id != null)
129       {
130          this.id = id;
131       }
132    }
133
134    /**
135     * @return Returns the config.
136     */

137    public ValueListConfigBean getConfig()
138    {
139       return config;
140    }
141
142    /**
143     * @return Returns the pageContext.
144     */

145    public PageContext JavaDoc getPageContext()
146    {
147       return pageContext;
148    }
149
150    /**
151     * @param config The config to set.
152     */

153    public void setConfig(ValueListConfigBean config)
154    {
155       this.config = config;
156    }
157
158    /**
159     * @param pageContext The pageContext to set.
160     */

161    public void setPageContext(PageContext JavaDoc pageContext)
162    {
163       this.pageContext = pageContext;
164    }
165 }
Popular Tags