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_orchestra.taglib.html;
20  
21  import org.apache.myfaces.shared_orchestra.renderkit.html.HTML;
22  
23  import javax.faces.component.UIComponent;
24  
25  /**
26   * @author Manfred Geiler (latest modification by $Author: grantsmith $)
27   * @version $Revision: 482275 $ $Date: 2006-12-04 13:14:25 -0500 (Mon, 04 Dec 2006) $
28   */
29  public abstract class HtmlFormTagBase
30          extends org.apache.myfaces.shared_orchestra.taglib.html.HtmlComponentTagBase
31  {
32      //private static final Log log = LogFactory.getLog(HtmlFormTag.class);
33  
34      // UIComponent attributes --> already implemented in UIComponentTagBase
35  
36      // user role attributes --> already implemented in UIComponentTagBase
37  
38      // HTML universal attributes --> already implemented in HtmlComponentTagBase
39  
40      // HTML event handler attributes --> already implemented in HtmlComponentTagBase
41  
42      // HTML form attributes
43  
44      private String _accept;
45      private String _acceptcharset;
46      private String _enctype;
47      private String _name;
48      private String _onreset;
49      private String _onsubmit;
50      private String _target;
51  
52      // UIForm attributes --> none so far
53      public void release() {
54          super.release();
55          _accept=null;
56          _acceptcharset=null;
57          _enctype=null;
58          _name=null;
59          _onreset=null;
60          _onsubmit=null;
61          _target=null;
62      }
63  
64      protected void setProperties(UIComponent component)
65      {
66          super.setProperties(component);
67          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.ACCEPT_ATTR, _accept);
68          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.ACCEPT_CHARSET_ATTR, _acceptcharset);
69          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.ENCTYPE_ATTR, _enctype);
70          setStringProperty(component, HTML.NAME_ATTR, _name);
71          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.ONRESET_ATTR, _onreset);
72          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.ONSUMBIT_ATTR, _onsubmit);
73          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.TARGET_ATTR, _target);
74      }
75  
76      public void setAccept(String accept)
77      {
78          _accept = accept;
79      }
80  
81      public void setAcceptcharset(String acceptcharset)
82      {
83          _acceptcharset = acceptcharset;
84      }
85  
86      public void setEnctype(String enctype)
87      {
88          _enctype = enctype;
89      }
90  
91      public void setName(String name)
92      {
93          _name = name;
94      }
95  
96      public void setOnreset(String onreset)
97      {
98          _onreset = onreset;
99      }
100 
101     public void setOnsubmit(String onsubmit)
102     {
103         _onsubmit = onsubmit;
104     }
105 
106     public void setTarget(String target)
107     {
108         _target = target;
109     }
110 
111 }