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.JSFAttr;
    22  import org.apache.myfaces.shared_orchestra.renderkit.html.HTML;
    23
    24  import javax.faces.component.UIComponent;
    25
    26
    27  /**
    28   * @author Manfred Geiler (latest modification by $Author: paulsp $)
    29   * @author Martin Marinschek
    30   * @version $Revision: 495124 $ $Date: 2007-01-11 00:25:08 -0500 (Thu, 11 Jan 2007) $
    31   */
    32  public abstract class HtmlOutputLabelTagBase
    33      extends org.apache.myfaces.shared_orchestra.taglib.html.HtmlComponentTagBase
    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 label attributes
    44      private String _accesskey;
    45      private String _onblur;
    46      private String _onfocus;
    47
    48      // UIOutput attributes
    49      // value and converterId --> already implemented in UIComponentTagBase
    50
    51      //HTMLOutputLabel attributes
    52      private String _for;
    53      private String _tabindex;
    54
    55      public void release() {
    56          super.release();
    57          _accesskey=null;
    58          _onblur=null;
    59          _onfocus=null;
    60          _for=null;
    61          _tabindex=null;
    62      }
    63
    64      protected void setProperties(UIComponent component)
    65      {
    66          super.setProperties(component);
    67
    68          setStringProperty(component, HTML.ACCESSKEY_ATTR, _accesskey);
    69          setStringProperty(component, HTML.ONBLUR_ATTR, _onblur);
    70          setStringProperty(component, HTML.ONFOCUS_ATTR, _onfocus);
    71
    72          setStringProperty(component, JSFAttr.FOR_ATTR, _for);
    73          setStringProperty(component, HTML.TABINDEX_ATTR, _tabindex);
    74     }
    75
    76      public void setAccesskey(String accesskey)
    77      {
    78          _accesskey = accesskey;
    79      }
    80
    81      public void setOnblur(String onblur)
    82      {
    83          _onblur = onblur;
    84      }
    85
    86      public void setOnfocus(String onfocus)
    87      {
    88          _onfocus = onfocus;
    89      }
    90
    91      public void setFor(String aFor)
    92      {
    93          _for = aFor;
    94      }
    95
    96      public void setTabindex(String tabindex)
    97      {
    98          _tabindex = tabindex;
    99      }
    100 }