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.html.HTML;
19  
20  import javax.faces.component.UIComponent;
21  
22  
23  /***
24   * @author Manfred Geiler (latest modification by $Author: grantsmith $)
25   * @version $Revision: 169655 $ $Date: 2005-05-11 16:45:06 +0000 (Wed, 11 May 2005) $
26   */
27  public abstract class HtmlInputTextareaTagBase
28          extends HtmlInputTagBase
29  {
30      // UIComponent attributes --> already implemented in UIComponentTagBase
31  
32      // user role attributes --> already implemented in UIComponentTagBase
33  
34      // HTML universal attributes --> already implemented in HtmlComponentTagBase
35  
36      // HTML event handler attributes --> already implemented in HtmlComponentTagBase
37  
38      // HTML input attributes
39      private String _accesskey;
40      private String _cols;
41      private String _datafld; //FIXME: not in RI so far
42      private String _datasrc; //FIXME: not in RI so far
43      private String _dataformatas; //FIXME: not in RI so far
44      private String _disabled;
45      private String _onblur;
46      private String _onchange;
47      private String _onfocus;
48      private String _onselect;
49      private String _readonly;
50      private String _rows;
51      private String _tabindex;
52  
53      // UIOutput attributes
54      // value and converter --> already implemented in UIComponentTagBase
55  
56      // UIInput attributes
57      // --> already implemented in HtmlInputTagBase
58  
59      //HtmlTextArea attributes
60      // FIXME: is in RI, but not in HTML 4.0. what to do?
61      private String _alt;
62  
63      public void release() {
64          super.release();
65          _accesskey=null;
66          _cols=null;
67          _datafld=null;
68          _datasrc=null;
69          _dataformatas=null;
70          _disabled=null;
71          _onblur=null;
72          _onchange=null;
73          _onfocus=null;
74          _onselect=null;
75          _readonly=null;
76          _rows=null;
77          _tabindex=null;
78          _alt=null;
79      }
80  
81      protected void setProperties(UIComponent component)
82      {
83          super.setProperties(component);
84  
85          setStringProperty(component, HTML.ACCESSKEY_ATTR, _accesskey);
86          setIntegerProperty(component, HTML.COLS_ATTR, _cols);
87          setStringProperty(component, HTML.DATAFLD_ATTR, _datafld);
88          setStringProperty(component, HTML.DATASRC_ATTR, _datasrc);
89          setStringProperty(component, HTML.DATAFORMATAS_ATTR, _dataformatas);
90          setBooleanProperty(component, HTML.DISABLED_ATTR, _disabled);
91          setStringProperty(component, HTML.ONBLUR_ATTR, _onblur);
92          setStringProperty(component, HTML.ONCHANGE_ATTR, _onchange);
93          setStringProperty(component, HTML.ONFOCUS_ATTR, _onfocus);
94          setStringProperty(component, HTML.ONSELECT_ATTR, _onselect);
95          setBooleanProperty(component, HTML.READONLY_ATTR, _readonly);
96          setIntegerProperty(component, HTML.ROWS_ATTR, _rows);
97          setStringProperty(component, HTML.TABINDEX_ATTR, _tabindex);
98  
99          setStringProperty(component, HTML.ALT_ATTR, _alt);
100     }
101 
102     public void setAccesskey(String accesskey)
103     {
104         _accesskey = accesskey;
105     }
106 
107     public void setAlt(String alt)
108     {
109         _alt = alt;
110     }
111 
112     public void setCols(String cols)
113     {
114         _cols = cols;
115     }
116 
117     public void setDatafld(String datafld)
118     {
119         _datafld = datafld;
120     }
121 
122     public void setDatasrc(String datasrc)
123     {
124         _datasrc = datasrc;
125     }
126 
127     public void setDataformatas(String dataformatas)
128     {
129         _dataformatas = dataformatas;
130     }
131 
132     public void setDisabled(String disabled)
133     {
134         _disabled = disabled;
135     }
136 
137     public void setOnblur(String onblur)
138     {
139         _onblur = onblur;
140     }
141 
142     public void setOnchange(String onchange)
143     {
144         _onchange = onchange;
145     }
146 
147     public void setOnfocus(String onfocus)
148     {
149         _onfocus = onfocus;
150     }
151 
152     public void setOnselect(String onselect)
153     {
154         _onselect = onselect;
155     }
156 
157     public void setReadonly(String readonly)
158     {
159         _readonly = readonly;
160     }
161 
162     public void setRows(String rows)
163     {
164         _rows = rows;
165     }
166 
167     public void setTabindex(String tabindex)
168     {
169         _tabindex = tabindex;
170     }
171 
172 }