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  /***
27   * @author Manfred Geiler (latest modification by $Author: cagatay $)
28   * @version $Revision: 606793 $ $Date: 2007-12-25 10:20:46 -0500 (Tue, 25 Dec 2007) $
29   * @deprecated use {@link HtmlInputTextELTagBase} instead
30   */
31  public abstract class HtmlInputTextTagBase
32          extends org.apache.myfaces.shared.taglib.html.HtmlInputTagBase
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 input attributes
43      private String _accesskey;
44      private String _align;
45      private String _alt; //FIXME: not in API, HTML 4.0 transitional attribute and not in strict... what to do?
46      private String _disabled;
47      private String _maxlength;
48      private String _onblur;
49      private String _onchange;
50      private String _onfocus;
51      private String _onselect;
52      private String _readonly;
53      private String _size;
54      private String _tabindex;
55  
56      // UIOutput attributes
57      // value and converterId --> already implemented in UIComponentTagBase
58  
59      // UIInput attributes
60      // --> already implemented in HtmlInputTagBase
61  
62      public void release() {
63          super.release();
64          _accesskey=null;
65          _align=null;
66          _alt=null;
67          _disabled=null;
68          _maxlength=null;
69          _onblur=null;
70          _onchange=null;
71          _onfocus=null;
72          _onselect=null;
73          _readonly=null;
74          _size=null;
75          _tabindex=null;
76      }
77  
78      protected void setProperties(UIComponent component)
79      {
80          super.setProperties(component);
81  
82          setStringProperty(component, org.apache.myfaces.shared.renderkit.html.HTML.ACCESSKEY_ATTR, _accesskey);
83          setStringProperty(component, org.apache.myfaces.shared.renderkit.html.HTML.ALIGN_ATTR, _align);
84          setStringProperty(component, org.apache.myfaces.shared.renderkit.html.HTML.ALT_ATTR, _alt);
85          setBooleanProperty(component, org.apache.myfaces.shared.renderkit.html.HTML.DISABLED_ATTR, _disabled);
86          setIntegerProperty(component, org.apache.myfaces.shared.renderkit.html.HTML.MAXLENGTH_ATTR, _maxlength);
87          setStringProperty(component, HTML.ONBLUR_ATTR, _onblur);
88          setStringProperty(component, org.apache.myfaces.shared.renderkit.html.HTML.ONCHANGE_ATTR, _onchange);
89          setStringProperty(component, org.apache.myfaces.shared.renderkit.html.HTML.ONFOCUS_ATTR, _onfocus);
90          setStringProperty(component, org.apache.myfaces.shared.renderkit.html.HTML.ONSELECT_ATTR, _onselect);
91          setBooleanProperty(component, org.apache.myfaces.shared.renderkit.html.HTML.READONLY_ATTR, _readonly);
92          setIntegerProperty(component, org.apache.myfaces.shared.renderkit.html.HTML.SIZE_ATTR, _size);
93          setStringProperty(component, org.apache.myfaces.shared.renderkit.html.HTML.TABINDEX_ATTR, _tabindex);
94      }
95  
96      public void setAccesskey(String accesskey)
97      {
98          _accesskey = accesskey;
99      }
100 
101     public void setAlign(String align)
102     {
103         _align = align;
104     }
105 
106     public void setAlt(String alt)
107     {
108         _alt = alt;
109     }
110 
111     public void setDisabled(String disabled)
112     {
113         _disabled = disabled;
114     }
115 
116     public void setMaxlength(String maxlength)
117     {
118         _maxlength = maxlength;
119     }
120 
121     public void setOnblur(String onblur)
122     {
123         _onblur = onblur;
124     }
125 
126     public void setOnchange(String onchange)
127     {
128         _onchange = onchange;
129     }
130 
131     public void setOnfocus(String onfocus)
132     {
133         _onfocus = onfocus;
134     }
135 
136     public void setOnselect(String onselect)
137     {
138         _onselect = onselect;
139     }
140 
141     public void setReadonly(String readonly)
142     {
143         _readonly = readonly;
144     }
145 
146     public void setSize(String size)
147     {
148         _size = size;
149     }
150 
151     public void setTabindex(String tabindex)
152     {
153         _tabindex = tabindex;
154     }
155 }