KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > clipbuilder > html > struts > EditParamForm


1 package org.jahia.clipbuilder.html.struts;
2
3 import java.util.*;
4
5 import javax.servlet.http.*;
6
7 import org.jahia.clipbuilder.html.bean.*;
8 import org.jahia.clipbuilder.html.struts.Util.*;
9 import org.apache.struts.action.*;
10 import org.jahia.clipbuilder.html.SessionManager;
11
12 /**
13  * Description of the Class
14  *
15  *@author Tlili Khaled
16  */

17 public class EditParamForm extends AbstractWizardForm {
18     private String JavaDoc resetAll;
19     private String JavaDoc selectedUrl;
20     private List actifFormParamsList;
21     private List actifQueryParamsList;
22     private String JavaDoc bodyContent;
23     private String JavaDoc showLabel;
24     private String JavaDoc showHTML;
25     private String JavaDoc update;
26     private static org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(EditParamForm.class);
27
28
29
30     /**
31      * Sets the ResetAll attribute of the EditParamForm object
32      *
33      *@param resetAll The new ResetAll value
34      */

35     public void setResetAll(String JavaDoc resetAll) {
36         this.resetAll = resetAll;
37     }
38
39
40     /**
41      * Sets the SelectedUrl attribute of the EditParamForm object
42      *
43      *@param selectedUrl The new SelectedUrl value
44      */

45     public void setSelectedUrl(String JavaDoc selectedUrl) {
46         this.selectedUrl = selectedUrl;
47     }
48
49
50     /**
51      * Sets the ActifParamsList attribute of the EditParamForm object
52      *
53      *@param actifParamsList The new ActifParamsList value
54      */

55     public void setActifFormParamsList(List actifParamsList) {
56         this.actifFormParamsList = actifParamsList;
57     }
58
59
60
61     /**
62      * Sets the BodyContent attribute of the EditParamForm object
63      *
64      *@param bodyContent The new BodyContent value
65      */

66     public void setBodyContent(String JavaDoc bodyContent) {
67         this.bodyContent = bodyContent;
68     }
69
70
71     /**
72      * Sets the ShowLabel attribute of the EditParamForm object
73      *
74      *@param showLabel The new ShowLabel value
75      */

76     public void setShowLabel(String JavaDoc showLabel) {
77         this.showLabel = showLabel;
78     }
79
80
81     /**
82      * Sets the ShowHTML attribute of the EditParamForm object
83      *
84      *@param showHTML The new ShowHTML value
85      */

86     public void setShowHTML(String JavaDoc showHTML) {
87         this.showHTML = showHTML;
88     }
89
90
91     /**
92      * Sets the ActifQueryParamsList attribute of the EditParamForm object
93      *
94      *@param actifQueryParamsList The new ActifQueryParamsList value
95      */

96     public void setActifQueryParamsList(List actifQueryParamsList) {
97         this.actifQueryParamsList = actifQueryParamsList;
98     }
99
100
101     /**
102      * Sets the Update attribute of the EditParamForm object
103      *
104      *@param update The new Update value
105      */

106     public void setUpdate(String JavaDoc update) {
107         this.update = update;
108     }
109
110
111     /**
112      * Gets the Id attribute of the EditParamForm object
113      *
114      *@return The Id value
115      */

116     public int getId() {
117         return Constants.EDITPARAM;
118     }
119
120
121     /**
122      * Gets the ResetAll attribute of the EditParamForm object
123      *
124      *@return The ResetAll value
125      */

126     public String JavaDoc getResetAll() {
127         return resetAll;
128     }
129
130
131     /**
132      * Gets the SelectedUrl attribute of the EditParamForm object
133      *
134      *@return The SelectedUrl value
135      */

136     public String JavaDoc getSelectedUrl() {
137         return selectedUrl;
138     }
139
140
141     /**
142      * Gets the ActifParamsList attribute of the EditParamForm object
143      *
144      *@return The ActifParamsList value
145      */

146     public List getActifFormParamsList() {
147         return actifFormParamsList;
148     }
149
150
151     /**
152      * Gets the BodyContent attribute of the EditParamForm object
153      *
154      *@return The BodyContent value
155      */

156     public String JavaDoc getBodyContent() {
157         return bodyContent;
158     }
159
160
161     /**
162      * Gets the ShowLabel attribute of the EditParamForm object
163      *
164      *@return The ShowLabel value
165      */

166     public String JavaDoc getShowLabel() {
167         return showLabel;
168     }
169
170
171     /**
172      * Gets the Errors attribute of the EditParamForm object
173      *
174      *@return The Errors value
175      */

176     public ActionErrors getErrors() {
177         ActionErrors errors = new ActionErrors();
178         return errors;
179     }
180
181
182
183     /**
184      * Gets the ShowHTML attribute of the EditParamForm object
185      *
186      *@return The ShowHTML value
187      */

188     public String JavaDoc getShowHTML() {
189         return showHTML;
190     }
191
192
193     /**
194      * Gets the ActifQueryParamsList attribute of the EditParamForm object
195      *
196      *@return The ActifQueryParamsList value
197      */

198     public List getActifQueryParamsList() {
199         return actifQueryParamsList;
200     }
201
202
203     /**
204      * Gets the Update attribute of the EditParamForm object
205      *
206      *@return The Update value
207      */

208     public String JavaDoc getUpdate() {
209         return update;
210     }
211
212
213     /**
214      * Description of the Method
215      *
216      *@param actionMapping Description of Parameter
217      *@param httpServletRequest Description of Parameter
218      *@return Description of the Returned Value
219      */

220     public ActionErrors validate(ActionMapping actionMapping,
221             HttpServletRequest httpServletRequest) {
222
223         return null;
224     }
225
226
227     /**
228      * Description of the Method
229      *
230      *@param actionMapping Description of Parameter
231      *@param httpServletRequest Description of Parameter
232      */

233     public void reset(ActionMapping actionMapping,
234             HttpServletRequest httpServletRequest) {
235     }
236
237
238     /**
239      * Description of the Method
240      *
241      *@param cBean Description of Parameter
242      */

243     public void loadFromClipperBean(ClipperBean cBean) {
244
245         String JavaDoc position = getSelectedUrl();
246
247         // this can occur the first time the edit page is accesed
248
if (position == null) {
249             //there is at leat one element in the urlListBean
250
position = "0";
251             setSelectedUrl(position);
252             logger.debug("[ First url selected autommatically]");
253         }
254
255         //Activate form list
256
int posUrl = Integer.parseInt(position);
257         List fList = cBean.getAllFormParam(posUrl);
258         if (fList.isEmpty()) {
259             logger.debug("[ Form Param list is empty ]");
260         }
261         setActifFormParamsList(fList);
262         logger.debug("[ Actif Parameters List is set from first url at position " +posUrl + " ]");
263
264         //Activate query list
265
List qList = cBean.getAllQueryParam(posUrl);
266         if (qList.isEmpty()) {
267             logger.debug("[ Query param list is empty ]");
268         }
269
270         setActifQueryParamsList(qList);
271     }
272
273 }
274
Popular Tags