KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > blandware > atleap > webapp > form > core > BaseFilterForm


1 /*
2  * Copyright 2004 Blandware (http://www.blandware.com)
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package com.blandware.atleap.webapp.form.core;
17
18 import com.blandware.atleap.webapp.form.BaseForm;
19 import org.apache.struts.action.ActionMapping;
20
21 import javax.servlet.http.HttpServletRequest JavaDoc;
22
23 /**
24  * <p>Base Action Form for all filter types.
25  * </p>
26  * <p><a HREF="BaseFilterForm.java.htm"><i>View Source</i></a></p>
27  * <p/>
28  *
29  * @author Sergey Zubtcovskii <a HREF="mailto:sergey.zubtcovskii@blandware.com">&lt;sergey.zubtcovskii@blandware.com&gt;</a>
30  * @version $Revision: 1.8 $ $Date: 2006/03/16 11:09:42 $
31  */

32 public class BaseFilterForm extends BaseForm {
33
34     protected String JavaDoc fieldName = new String JavaDoc();
35     protected String JavaDoc gridName = new String JavaDoc();
36     protected String JavaDoc pageUrl = new String JavaDoc();
37     protected String JavaDoc fieldKey = null;
38     protected String JavaDoc clearFilter = null;
39     protected String JavaDoc rowIterators = null;
40
41     /**
42      * Creates the new instance of FilterRowsForm
43      */

44     public BaseFilterForm() {
45     }
46
47     /**
48      * Returns name of field to which this filter is assigned
49      *
50      * @return name of field
51      */

52     public String JavaDoc getFieldName() {
53         return fieldName;
54     }
55
56     /**
57      * Sets name of field to which this filter is assigned
58      *
59      * @param fieldName name of field to set
60      */

61     public void setFieldName(String JavaDoc fieldName) {
62         this.fieldName = fieldName;
63     }
64
65     /**
66      * Returns name of grid to which this filter belongs
67      *
68      * @return name of grid
69      */

70     public String JavaDoc getGridName() {
71         return gridName;
72     }
73
74     /**
75      * Sets name of grid to which this filter belongs
76      *
77      * @param gridName name of grid
78      */

79     public void setGridName(String JavaDoc gridName) {
80         this.gridName = gridName;
81     }
82
83     /**
84      * Returns URL of page on which the filtered field is located
85      *
86      * @return URL of page
87      */

88     public String JavaDoc getPageUrl() {
89         return pageUrl;
90     }
91
92     /**
93      * Sets URL of page on which the filtered field is located
94      *
95      * @param pageUrl URL of page to set
96      */

97     public void setPageUrl(String JavaDoc pageUrl) {
98         this.pageUrl = pageUrl;
99     }
100
101     /**
102      * Returns i18n key under which a localized field name is stored
103      *
104      * @return field i18n key
105      */

106     public String JavaDoc getFieldKey() {
107         return fieldKey;
108     }
109
110     /**
111      * Sets i18n key under which a localized field name is stored
112      *
113      * @param fieldKey field i18n key
114      */

115     public void setFieldKey(String JavaDoc fieldKey) {
116         this.fieldKey = fieldKey;
117     }
118
119     /**
120      * If the returned value is not <code>null</code>, the filter will be
121      * cleared
122      *
123      * @return whether filter will be cleared
124      */

125     public String JavaDoc getClearFilter() {
126         return clearFilter;
127     }
128
129     /**
130      * If the set value is not <code>null</code>, the filter will be
131      * cleared
132      */

133     public void setClearFilter(String JavaDoc clearFilter) {
134         this.clearFilter = clearFilter;
135     }
136
137     /**
138      * Returns row iterators
139      *
140      * @return row iterators
141      */

142     public String JavaDoc getRowIterators() {
143         return rowIterators;
144     }
145
146     /**
147      * Sets row iterators
148      *
149      * @param rowIterators row iterators to set
150      */

151     public void setRowIterators(String JavaDoc rowIterators) {
152         this.rowIterators = rowIterators;
153     }
154
155     /**
156      * Resets all properties to their default properties
157      *
158      * @param mapping The ActionMapping used to select this instance
159      * @param request The non-http request we are proceeding
160      */

161     public void reset(ActionMapping mapping, HttpServletRequest JavaDoc request) {
162         this.fieldKey = null;
163         this.rowIterators = null;
164     }
165
166 }
Popular Tags