View Javadoc

1   /*
2    *  Licensed to the Apache Software Foundation (ASF) under one
3    *  or more contributor license agreements.  See the NOTICE file
4    *  distributed with this work for additional information
5    *  regarding copyright ownership.  The ASF licenses this file
6    *  to you under the Apache License, Version 2.0 (the
7    *  "License"); you may not use this file except in compliance
8    *  with the License.  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,
13   *  software distributed under the License is distributed on an
14   *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   *  KIND, either express or implied.  See the License for the
16   *  specific language governing permissions and limitations
17   *  under the License.
18   */
19  package org.apache.myfaces.shared.taglib.html;
20  
21  import org.apache.myfaces.shared.renderkit.html.HTML;
22  
23  import javax.faces.component.UIComponent;
24  
25  /***
26   * @author Manfred Geiler (latest modification by $Author: cagatay $)
27   * @version $Revision: 606793 $ $Date: 2007-12-25 10:20:46 -0500 (Tue, 25 Dec 2007) $
28   * @deprecated use {@link HtmlFormELTagBase} instead
29   */
30  public abstract class HtmlFormTagBase
31          extends org.apache.myfaces.shared.taglib.html.HtmlComponentTagBase
32  {
33      //private static final Log log = LogFactory.getLog(HtmlFormTag.class);
34  
35      // UIComponent attributes --> already implemented in UIComponentTagBase
36  
37      // user role attributes --> already implemented in UIComponentTagBase
38  
39      // HTML universal attributes --> already implemented in HtmlComponentTagBase
40  
41      // HTML event handler attributes --> already implemented in HtmlComponentTagBase
42  
43      // HTML form attributes
44  
45      private String _accept;
46      private String _acceptCharset;
47      private String _enctype;
48      private String _name;
49      private String _onreset;
50      private String _onsubmit;
51      private String _target;
52  
53      // UIForm attributes --> none so far
54      public void release() {
55          super.release();
56          _accept=null;
57          _acceptCharset=null;
58          _enctype=null;
59          _name=null;
60          _onreset=null;
61          _onsubmit=null;
62          _target=null;
63      }
64  
65      protected void setProperties(UIComponent component)
66      {
67          super.setProperties(component);
68          setStringProperty(component, org.apache.myfaces.shared.renderkit.html.HTML.ACCEPT_ATTR, _accept);
69          setStringProperty(component, org.apache.myfaces.shared.renderkit.html.HTML.ACCEPT_CHARSET_ATTR, _acceptCharset);
70          setStringProperty(component, org.apache.myfaces.shared.renderkit.html.HTML.ENCTYPE_ATTR, _enctype);
71          setStringProperty(component, HTML.NAME_ATTR, _name);
72          setStringProperty(component, org.apache.myfaces.shared.renderkit.html.HTML.ONRESET_ATTR, _onreset);
73          setStringProperty(component, org.apache.myfaces.shared.renderkit.html.HTML.ONSUMBIT_ATTR, _onsubmit);
74          setStringProperty(component, org.apache.myfaces.shared.renderkit.html.HTML.TARGET_ATTR, _target);
75      }
76  
77      public void setAccept(String accept)
78      {
79          _accept = accept;
80      }
81  
82      public void setAcceptCharset(String acceptCharset)
83      {
84          _acceptCharset = acceptCharset;
85      }
86  
87      public void setEnctype(String enctype)
88      {
89          _enctype = enctype;
90      }
91  
92      public void setName(String name)
93      {
94          _name = name;
95      }
96  
97      public void setOnreset(String onreset)
98      {
99          _onreset = onreset;
100     }
101 
102     public void setOnsubmit(String onsubmit)
103     {
104         _onsubmit = onsubmit;
105     }
106 
107     public void setTarget(String target)
108     {
109         _target = target;
110     }
111 
112 }