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   * @author Manfred Geiler (latest modification by $Author: grantsmith $)
    27   * @author Martin Marinschek
    28   * @version $Revision: 472618 $ $Date: 2006-11-08 15:06:54 -0500 (Wed, 08 Nov 2006) $
    29   */
    30  public abstract class HtmlCommandLinkTagBase
    31      extends HtmlComponentTagBase
    32  {
    33      //private static final Log log = LogFactory.getLog(HtmlCommandLinkTag.class);
    34
    35      // UIComponent attributes --> already implemented in UIComponentTagBase
    36
    37      // user role attributes --> already implemented in UIComponentTagBase
    38
    39      // HTML universal attributes --> already implemented in HtmlComponentTagBase
    40
    41      // HTML event handler attributes --> already implemented in HtmlComponentTagBase
    42
    43      // HTML anchor attributes relevant for command link
    44      private String _accesskey;
    45      private String _charset;
    46      private String _coords;
    47      private String _hreflang;
    48      private String _rel;
    49      private String _rev;
    50      private String _shape;
    51      private String _tabindex;
    52      private String _type;
    53      private String _target;
    54      //HtmlCommandLink Attributes
    55      //FIXME: is mentioned in JSF API, but is no official anchor-attribute of HTML 4.0... what to do?
    56      private String _onblur;
    57      //FIXME: is mentioned in JSF API, but is no official anchor-attribute of HTML 4.0... what to do?
    58      private String _onfocus;
    59
    60      // UICommand attributes
    61      private String _action;
    62      private String _immediate;
    63      private String _actionListener;
    64
    65      public void release() {
    66          super.release();
    67          _accesskey=null;
    68          _charset=null;
    69          _coords=null;
    70          _hreflang=null;
    71          _rel=null;
    72          _rev=null;
    73          _shape=null;
    74          _tabindex=null;
    75          _type=null;
    76          _target=null;
    77          _onblur=null;
    78          _onfocus=null;
    79          _action=null;
    80          _immediate=null;
    81          _actionListener=null;
    82      }
    83
    84      protected void setProperties(UIComponent component)
    85      {
    86          super.setProperties(component);
    87
    88          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.ACCESSKEY_ATTR, _accesskey);
    89          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.CHARSET_ATTR, _charset);
    90          setStringProperty(component, HTML.COORDS_ATTR, _coords);
    91          setStringProperty(component, HTML.HREFLANG_ATTR, _hreflang);
    92          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.REL_ATTR, _rel);
    93          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.REV_ATTR, _rev);
    94          setStringProperty(component, HTML.SHAPE_ATTR, _shape);
    95          setStringProperty(component, HTML.TABINDEX_ATTR, _tabindex);
    96          setStringProperty(component, HTML.TYPE_ATTR, _type);
    97          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.ONBLUR_ATTR, _onblur);
    98          setStringProperty(component, HTML.ONFOCUS_ATTR, _onfocus);
    99          setStringProperty(component, HTML.TARGET_ATTR, _target);
    100         setActionProperty(component, _action);
    101         setActionListenerProperty(component, _actionListener);
    102         setBooleanProperty(component, org.apache.myfaces.shared_orchestra.renderkit.JSFAttr.IMMEDIATE_ATTR, _immediate);
    103    }
    104
    105     public void setAccesskey(String accesskey)
    106     {
    107         _accesskey = accesskey;
    108     }
    109
    110     public void setCharset(String charset)
    111     {
    112         _charset = charset;
    113     }
    114
    115     public void setCoords(String coords)
    116     {
    117         _coords = coords;
    118     }
    119
    120     public void setHreflang(String hreflang)
    121     {
    122         _hreflang = hreflang;
    123     }
    124
    125     public void setOnblur(String onblur)
    126     {
    127         _onblur = onblur;
    128     }
    129
    130     public void setOnfocus(String onfocus)
    131     {
    132         _onfocus = onfocus;
    133     }
    134
    135     public void setRel(String rel)
    136     {
    137         _rel = rel;
    138     }
    139
    140     public void setRev(String rev)
    141     {
    142         _rev = rev;
    143     }
    144
    145     public void setShape(String shape)
    146     {
    147         _shape = shape;
    148     }
    149
    150     public void setTabindex(String tabindex)
    151     {
    152         _tabindex = tabindex;
    153     }
    154
    155     public void setType(String type)
    156     {
    157         _type = type;
    158     }
    159
    160     public void setAction(String action)
    161     {
    162         _action = action;
    163     }
    164
    165     public void setImmediate(String immediate)
    166     {
    167         _immediate = immediate;
    168     }
    169
    170     public void setActionListener(String actionListener)
    171     {
    172         _actionListener = actionListener;
    173     }
    174
    175
    176     public void setTarget(String target)
    177     {
    178         this._target = target;
    179     }
    180 }