KickJava   Java API By Example, From Geeks To Geeks.

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


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.ActionErrors;
20 import org.apache.struts.action.ActionMapping;
21
22 import javax.servlet.http.HttpServletRequest JavaDoc;
23
24 /**
25  * <p>ActionForm bean that holds layout definition and action page id
26  * to use when switchng from one layout to another in list of menu items</p>
27  * <p><a HREF="SwitchActionPageLayoutForm.java.htm"><i>View Source</i></a></p>
28  *
29  * @author Sergey Zubtcovskii <a HREF="mailto:sergey.zubtcovskii@blandware.com">&lt;sergey.zubtcovskii@blandware.com&gt;</a>
30  * @version $Revision: 1.4 $ $Date: 2005/08/04 17:25:16 $
31  * @struts.form name="switchActionPageLayoutForm"
32  */

33 public class SwitchActionPageLayoutForm extends BaseForm {
34
35     protected String JavaDoc layoutDefinition;
36     protected String JavaDoc actionPageId;
37
38     /**
39      * Creates the new instance of SwitchActionPageLayoutForm
40      */

41     public SwitchActionPageLayoutForm() {
42     }
43
44     /**
45      * Returns layout definition
46      *
47      * @return layout definition
48      */

49     public String JavaDoc getLayoutDefinition() {
50         return layoutDefinition;
51     }
52
53     /**
54      * Sets layout definition
55      *
56      * @param layoutDefinition layout definition to set
57      */

58     public void setLayoutDefinition(String JavaDoc layoutDefinition) {
59         this.layoutDefinition = layoutDefinition;
60     }
61
62     /**
63      * Returns action page ID
64      *
65      * @return action page ID
66      */

67     public String JavaDoc getActionPageId() {
68         return actionPageId;
69     }
70
71     /**
72      * Sets action page ID
73      *
74      * @param actionPageId action page ID to set
75      */

76     public void setActionPageId(String JavaDoc actionPageId) {
77         this.actionPageId = actionPageId;
78     }
79
80     /**
81      * Resets all properties to their default values
82      *
83      * @param mapping The ActionMapping used to select this instance
84      * @param request The non-http request we are proceeding
85      */

86     public void reset(ActionMapping mapping, HttpServletRequest JavaDoc request) {
87         layoutDefinition = null;
88         actionPageId = null;
89     }
90
91     /**
92      * Form validation -- this form is always valid
93      *
94      * @param mapping The ActionMapping used to select this instance
95      * @param request The non-http request we are proceeding
96      * @return Instance of ActionErrors contains all validation errors
97      */

98     public ActionErrors validate(ActionMapping mapping, HttpServletRequest JavaDoc request) {
99         return null;
100     }
101 }
Popular Tags