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