KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > struts > webapp > tiles > portal > MenuSettingsForm


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

18
19 package org.apache.struts.webapp.tiles.portal;
20
21 import org.apache.struts.action.ActionForm;
22
23
24 /**
25  * Action form used to read data from web page form.
26  */

27 public final class MenuSettingsForm extends ActionForm {
28
29     /** Validate value */
30   protected String JavaDoc validate;
31     /** empty list used by reset */
32   protected String JavaDoc[] empty = {};
33     /** list of items selected by user */
34   protected String JavaDoc[] selected;
35
36     /**
37      * Set selected items
38      */

39   public void setSelected( String JavaDoc array[] )
40     {
41     selected = array;
42     }
43
44     /**
45      * Get selected items
46      */

47   public String JavaDoc[] getSelected()
48     {
49     return selected;
50     }
51
52     /**
53      * Get selected items
54      */

55   public String JavaDoc[] getSelectedChoices()
56     {
57     return empty;
58     }
59
60    /**
61     * Is this form submitted ?
62     */

63   public boolean isSubmitted()
64     {
65     return validate != null;
66     }
67
68    /**
69     * Is this form submitted ?
70     */

71   public void setValidate( String JavaDoc value)
72     {
73     this.validate = value;
74     }
75
76     /**
77      * Reset properties
78      */

79   public void reset()
80     {
81     selected = empty;
82     validate = null;
83     }
84 }
85
86
Popular Tags