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: grantsmith $)
    29   * @author Martin Marinschek
    30   * @version $Revision: 472630 $ $Date: 2006-11-08 15:40:03 -0500 (Wed, 08 Nov 2006) $
    31   */
    32  public abstract class HtmlSelectOneRadioTagBase
    33          extends org.apache.myfaces.shared_orchestra.taglib.html.HtmlInputTagBase
    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 input attributes relevant for radio
    44      private String _accesskey;
    45      private String _alt;
    46      private String _datafld;
    47      private String _datasrc;
    48      private String _dataformatas;
    49      private String _disabled;
    50      private String _onblur;
    51      private String _onchange;
    52      private String _onfocus;
    53      private String _onselect;
    54      private String _readonly;
    55      private String _tabindex;
    56
    57      // UIInput attributes
    58      // --> already implemented in HtmlInputTagBase
    59
    60      // HTMLSelectOneRadio attributes
    61      private String _border;
    62      private String _disabledClass;
    63      private String _enabledClass;
    64      private String _layout;
    65
    66      public void release() {
    67          super.release();
    68
    69          _accesskey=null;
    70          _alt=null;
    71          _datafld=null;
    72          _datasrc=null;
    73          _dataformatas=null;
    74          _disabled=null;
    75          _onblur=null;
    76          _onchange=null;
    77          _onfocus=null;
    78          _onselect=null;
    79          _readonly=null;
    80          _tabindex=null;
    81          _border=null;
    82          _disabledClass=null;
    83          _enabledClass=null;
    84          _layout=null;
    85      }
    86
    87      protected void setProperties(UIComponent component)
    88      {
    89          super.setProperties(component);
    90
    91          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.ACCESSKEY_ATTR, _accesskey);
    92          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.ALT_ATTR, _alt);
    93          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.DATAFLD_ATTR, _datafld);
    94          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.DATASRC_ATTR, _datasrc);
    95          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.DATAFORMATAS_ATTR, _dataformatas);
    96          setBooleanProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.DISABLED_ATTR, _disabled);
    97          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.ONBLUR_ATTR, _onblur);
    98          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.ONCHANGE_ATTR, _onchange);
    99          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.ONFOCUS_ATTR, _onfocus);
    100         setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.ONSELECT_ATTR, _onselect);
    101         setBooleanProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.READONLY_ATTR, _readonly);
    102         setStringProperty(component, HTML.TABINDEX_ATTR, _tabindex);
    103
    104         setIntegerProperty(component, JSFAttr.BORDER_ATTR, _border);
    105         setStringProperty(component, JSFAttr.DISABLED_CLASS_ATTR, _disabledClass);
    106         setStringProperty(component, JSFAttr.ENABLED_CLASS_ATTR, _enabledClass);
    107         setStringProperty(component, JSFAttr.LAYOUT_ATTR, _layout);
    108     }
    109
    110     public void setAccesskey(String accesskey)
    111     {
    112         _accesskey = accesskey;
    113     }
    114
    115     public void setAlt(String alt)
    116     {
    117         _alt = alt;
    118     }
    119
    120     public void setBorder(String border)
    121     {
    122         _border = border;
    123     }
    124
    125     public void setDatafld(String datafld)
    126     {
    127         _datafld = datafld;
    128     }
    129
    130     public void setDatasrc(String datasrc)
    131     {
    132         _datasrc = datasrc;
    133     }
    134
    135     public void setDataformatas(String dataformatas)
    136     {
    137         _dataformatas = dataformatas;
    138     }
    139
    140     public void setDisabled(String disabled)
    141     {
    142         _disabled = disabled;
    143     }
    144
    145     public void setOnblur(String onblur)
    146     {
    147         _onblur = onblur;
    148     }
    149
    150     public void setOnchange(String onchange)
    151     {
    152         _onchange = onchange;
    153     }
    154
    155     public void setOnfocus(String onfocus)
    156     {
    157         _onfocus = onfocus;
    158     }
    159
    160     public void setOnselect(String onselect)
    161     {
    162         _onselect = onselect;
    163     }
    164
    165     public void setReadonly(String readonly)
    166     {
    167         _readonly = readonly;
    168     }
    169
    170     public void setTabindex(String tabindex)
    171     {
    172         _tabindex = tabindex;
    173     }
    174
    175     public void setDisabledClass(String disabledClass)
    176     {
    177         _disabledClass = disabledClass;
    178     }
    179
    180     public void setEnabledClass(String enabledClass)
    181     {
    182         _enabledClass = enabledClass;
    183     }
    184
    185     public void setLayout(String layout)
    186     {
    187         _layout = layout;
    188     }
    189 }