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 javax.faces.component.UIComponent;
    22
    23
    24  /**
    25   * @author Manfred Geiler (latest modification by $Author: grantsmith $)
    26   * @author Martin Marinschek
    27   * @version $Revision: 472630 $ $Date: 2006-11-08 15:40:03 -0500 (Wed, 08 Nov 2006) $
    28   */
    29  public abstract class HtmlSelectBooleanCheckboxTagBase
    30          extends org.apache.myfaces.shared_orchestra.taglib.html.HtmlInputTagBase
    31  {
    32      // UIComponent attributes --> already implemented in UIComponentTagBase
    33
    34      // user role attributes --> already implemented in UIComponentTagBase
    35
    36      // HTML universal attributes --> already implemented in HtmlComponentTagBase
    37
    38      // HTML event handler attributes --> already implemented in HtmlComponentTagBase
    39
    40      // HTML input attributes relevant for checkbox-input
    41      private String _accesskey;
    42      private String _alt;
    43      private String _checked;
    44      private String _datafld;
    45      private String _datasrc;
    46      private String _dataformatas;
    47      private String _disabled;
    48      private String _onblur;
    49      private String _onchange;
    50      private String _onfocus;
    51      private String _onselect;
    52      private String _readonly;
    53      private String _tabindex;
    54
    55      // UIInput attributes
    56      // --> already implemented in HtmlInputTagBase
    57
    58      // UISelectBoolean attributes
    59      //private String _selected; //is already covered by checked attribute
    60
    61      public void release() {
    62          super.release();
    63          _accesskey=null;
    64          _alt=null;
    65          _checked=null;
    66          _datafld=null;
    67          _datasrc=null;
    68          _dataformatas=null;
    69          _disabled=null;
    70          _onblur=null;
    71          _onchange=null;
    72          _onfocus=null;
    73          _onselect=null;
    74          _readonly=null;
    75          _tabindex=null;
    76      }
    77
    78      protected void setProperties(UIComponent component)
    79      {
    80          super.setProperties(component);
    81
    82          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.ACCESSKEY_ATTR, _accesskey);
    83          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.ALT_ATTR, _alt);
    84          setBooleanProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.CHECKED_ATTR, _checked);
    85          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.DATAFLD_ATTR, _datafld);
    86          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.DATASRC_ATTR, _datasrc);
    87          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.DATAFORMATAS_ATTR, _dataformatas);
    88          setBooleanProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.DISABLED_ATTR, _disabled);
    89          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.ONBLUR_ATTR, _onblur);
    90          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.ONCHANGE_ATTR, _onchange);
    91          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.ONFOCUS_ATTR, _onfocus);
    92          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.ONSELECT_ATTR, _onselect);
    93          setBooleanProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.READONLY_ATTR, _readonly);
    94          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.TABINDEX_ATTR, _tabindex);
    95     }
    96
    97      public void setAccesskey(String accesskey)
    98      {
    99          _accesskey = accesskey;
    100     }
    101
    102     public void setAlt(String alt)
    103     {
    104         _alt = alt;
    105     }
    106
    107     public void setChecked(String checked)
    108     {
    109         _checked = checked;
    110     }
    111
    112     public void setDatafld(String datafld)
    113     {
    114         _datafld = datafld;
    115     }
    116
    117     public void setDatasrc(String datasrc)
    118     {
    119         _datasrc = datasrc;
    120     }
    121
    122     public void setDataformatas(String dataformatas)
    123     {
    124         _dataformatas = dataformatas;
    125     }
    126
    127     public void setDisabled(String disabled)
    128     {
    129         _disabled = disabled;
    130     }
    131
    132     public void setOnblur(String onblur)
    133     {
    134         _onblur = onblur;
    135     }
    136
    137     public void setOnchange(String onchange)
    138     {
    139         _onchange = onchange;
    140     }
    141
    142     public void setOnfocus(String onfocus)
    143     {
    144         _onfocus = onfocus;
    145     }
    146
    147     public void setOnselect(String onselect)
    148     {
    149         _onselect = onselect;
    150     }
    151
    152     public void setReadonly(String readonly)
    153     {
    154         _readonly = readonly;
    155     }
    156
    157     public void setTabindex(String tabindex)
    158     {
    159         _tabindex = tabindex;
    160     }
    161
    162 }