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   * @author Martin Marinschek
26   * @version $Revision: 169655 $ $Date: 2005-05-11 16:45:06 +0000 (Wed, 11 May 2005) $
27   */
28  public abstract class HtmlOutputLinkTagBase
29      extends HtmlComponentTagBase
30  {
31      // UIComponent attributes --> already implemented in UIComponentTagBase
32  
33      // user role attributes --> already implemented in UIComponentTagBase
34  
35      // HTML universal attributes --> already implemented in HtmlComponentTagBase
36  
37      // HTML event handler attributes --> already implemented in HtmlComponentTagBase
38  
39      // HTML anchor attributes relevant for command link
40      private String _accesskey;
41      private String _charset;
42      private String _coords;
43      private String _hreflang;
44      private String _rel;
45      private String _rev;
46      private String _shape;
47      private String _tabindex;
48      private String _target;
49      private String _type;
50      //FIXME: is mentioned in JSF API, but is no official anchor-attribute of HTML 4.0... what to do?
51      private String _onblur;
52      //FIXME: is mentioned in JSF API, but is no official anchor-attribute of HTML 4.0... what to do?
53      private String _onfocus;
54  
55      // UIOutput attributes
56      // value and converterId --> already implemented in UIComponentTagBase
57  
58      //HtmlCommandLink Attributes
59  
60      public void release() {
61          super.release();
62          _accesskey=null;
63          _charset=null;
64          _coords=null;
65          _hreflang=null;
66          _rel=null;
67          _rev=null;
68          _shape=null;
69          _tabindex=null;
70          _target=null;
71          _type=null;
72          _onblur=null;
73          _onfocus=null;
74      }
75  
76      protected void setProperties(UIComponent component)
77      {
78          super.setProperties(component);
79  
80          setStringProperty(component, HTML.ACCESSKEY_ATTR, _accesskey);
81          setStringProperty(component, HTML.CHARSET_ATTR, _charset);
82          setStringProperty(component, HTML.COORDS_ATTR, _coords);
83          setStringProperty(component, HTML.HREFLANG_ATTR, _hreflang);
84          setStringProperty(component, HTML.REL_ATTR, _rel);
85          setStringProperty(component, HTML.REV_ATTR, _rev);
86          setStringProperty(component, HTML.SHAPE_ATTR, _shape);
87          setStringProperty(component, HTML.TABINDEX_ATTR, _tabindex);
88          setStringProperty(component, HTML.TARGET_ATTR, _target);
89          setStringProperty(component, HTML.TYPE_ATTR, _type);
90          setStringProperty(component, HTML.ONBLUR_ATTR, _onblur);
91          setStringProperty(component, HTML.ONFOCUS_ATTR, _onfocus);
92     }
93  
94      public void setAccesskey(String accesskey)
95      {
96          _accesskey = accesskey;
97      }
98  
99      public void setCharset(String charset)
100     {
101         _charset = charset;
102     }
103 
104     public void setCoords(String coords)
105     {
106         _coords = coords;
107     }
108 
109     public void setHreflang(String hreflang)
110     {
111         _hreflang = hreflang;
112     }
113 
114     public void setOnblur(String onblur)
115     {
116         _onblur = onblur;
117     }
118 
119     public void setOnfocus(String onfocus)
120     {
121         _onfocus = onfocus;
122     }
123 
124     public void setRel(String rel)
125     {
126         _rel = rel;
127     }
128 
129     public void setRev(String rev)
130     {
131         _rev = rev;
132     }
133 
134     public void setShape(String shape)
135     {
136         _shape = shape;
137     }
138 
139     public void setTabindex(String tabindex)
140     {
141         _tabindex = tabindex;
142     }
143 
144     public void setTarget(String target)
145     {
146         _target = target;
147     }
148 
149     public void setType(String type)
150     {
151         _type = type;
152     }
153 }