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