KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > taglib > html > HtmlFormTagBase


1 /*
2  * Copyright 2004 The Apache Software Foundation.
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 org.apache.myfaces.taglib.html;
17
18 import org.apache.myfaces.renderkit.html.HTML;
19
20 import javax.faces.component.UIComponent;
21
22 /**
23  * @author Manfred Geiler (latest modification by $Author: matzew $)
24  * @version $Revision: 1.4 $ $Date: 2005/02/18 18:24:35 $
25  * $Log: HtmlFormTagBase.java,v $
26  * Revision 1.4 2005/02/18 18:24:35 matzew
27  * added release() to tag clazzes.
28  *
29  * Revision 1.3 2004/10/13 11:51:01 matze
30  * renamed packages to org.apache
31  *
32  * Revision 1.2 2004/07/01 22:01:11 mwessendorf
33  * ASF switch
34  *
35  * Revision 1.1 2004/04/01 12:57:44 manolito
36  * additional extended component classes for user role support
37  *
38  */

39 public abstract class HtmlFormTagBase
40         extends HtmlComponentTagBase
41 {
42     //private static final Log log = LogFactory.getLog(HtmlFormTag.class);
43

44     // UIComponent attributes --> already implemented in UIComponentTagBase
45

46     // user role attributes --> already implemented in UIComponentTagBase
47

48     // HTML universal attributes --> already implemented in HtmlComponentTagBase
49

50     // HTML event handler attributes --> already implemented in HtmlComponentTagBase
51

52     // HTML form attributes
53

54     private String JavaDoc _accept;
55     private String JavaDoc _acceptCharset;
56     private String JavaDoc _enctype;
57     private String JavaDoc _name;
58     private String JavaDoc _onreset;
59     private String JavaDoc _onsubmit;
60     private String JavaDoc _target;
61
62     // UIForm attributes --> none so far
63
public void release() {
64         super.release();
65         _accept=null;
66         _acceptCharset=null;
67         _enctype=null;
68         _name=null;
69         _onreset=null;
70         _onsubmit=null;
71         _target=null;
72     }
73
74     protected void setProperties(UIComponent component)
75     {
76         super.setProperties(component);
77         setStringProperty(component, HTML.ACCEPT_ATTR, _accept);
78         setStringProperty(component, HTML.ACCEPT_CHARSET_ATTR, _acceptCharset);
79         setStringProperty(component, HTML.ENCTYPE_ATTR, _enctype);
80         setStringProperty(component, HTML.NAME_ATTR, _name);
81         setStringProperty(component, HTML.ONRESET_ATTR, _onreset);
82         setStringProperty(component, HTML.ONSUMBIT_ATTR, _onsubmit);
83         setStringProperty(component, HTML.TARGET_ATTR, _target);
84     }
85
86     public void setAccept(String JavaDoc accept)
87     {
88         _accept = accept;
89     }
90
91     public void setAcceptCharset(String JavaDoc acceptCharset)
92     {
93         _acceptCharset = acceptCharset;
94     }
95
96     public void setEnctype(String JavaDoc enctype)
97     {
98         _enctype = enctype;
99     }
100
101     public void setName(String JavaDoc name)
102     {
103         _name = name;
104     }
105
106     public void setOnreset(String JavaDoc onreset)
107     {
108         _onreset = onreset;
109     }
110
111     public void setOnsubmit(String JavaDoc onsubmit)
112     {
113         _onsubmit = onsubmit;
114     }
115
116     public void setTarget(String JavaDoc target)
117     {
118         _target = target;
119     }
120
121 }
122
Popular Tags