View Javadoc

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.JSFAttr;
19  import org.apache.myfaces.renderkit.html.HTML;
20  
21  import javax.faces.component.UIComponent;
22  
23  
24  /***
25   * @author Manfred Geiler (latest modification by $Author: grantsmith $)
26   * @version $Revision: 169655 $ $Date: 2005-05-11 16:45:06 +0000 (Wed, 11 May 2005) $
27   */
28  public abstract class HtmlInputTagBase
29      extends HtmlComponentTagBase
30  {
31      // UIComponent attributes --> already implemented in UIComponentTagBase
32  
33      // UIOutput attributes
34      // value and converterId --> already implemented in UIComponentTagBase
35  
36      // UIInput attributes
37      private String _immediate;
38      private String _required;
39      private String _validator;
40      private String _valueChangeListener;
41      private String _readonly;
42  
43      public void release() {
44          super.release();
45  
46          _immediate=null;
47          _required=null;
48          _validator=null;
49          _valueChangeListener=null;
50          _readonly=null;
51      }
52  
53      protected void setProperties(UIComponent component)
54      {
55          super.setProperties(component);
56  
57          setBooleanProperty(component, JSFAttr.IMMEDIATE_ATTR, _immediate);
58          setBooleanProperty(component, JSFAttr.REQUIRED_ATTR, _required);
59          setValidatorProperty(component, _validator);
60          setValueChangedListenerProperty(component, _valueChangeListener);
61          setBooleanProperty(component, HTML.READONLY_ATTR, _readonly);
62      }
63  
64      public void setImmediate(String immediate)
65      {
66          _immediate = immediate;
67      }
68  
69      public void setRequired(String required)
70      {
71          _required = required;
72      }
73  
74      public void setValidator(String validator)
75      {
76          _validator = validator;
77      }
78  
79      public void setValueChangeListener(String valueChangeListener)
80      {
81          _valueChangeListener = valueChangeListener;
82      }
83      public void setReadonly(String _readonly) {
84          this._readonly = _readonly;
85      }
86  
87  }