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: paulsp $)
    28   * @author Martin Marinschek
    29   * @version $Revision: 495096 $ $Date: 2007-01-10 21:55:38 -0500 (Wed, 10 Jan 2007) $
    30   */
    31  public abstract class HtmlSelectManyCheckboxTagBase
    32          extends org.apache.myfaces.shared_orchestra.taglib.html.HtmlInputTagBase
    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 input attributes relevant for checkbox-list
    43      private String _accesskey;
    44      private String _alt;
    45      private String _datafld;
    46      private String _datasrc;
    47      private String _dataformatas;
    48      private String _disabled;
    49      private String _onblur;
    50      private String _onchange;
    51      private String _onfocus;
    52      private String _onselect;
    53      private String _readonly;
    54      private String _size; //TODO: needed?
    55      private String _tabindex;
    56
    57      // UIInput attributes
    58      // --> already implemented in HtmlInputTagBase
    59
    60      // UISelectMany attributes
    61      //selectedValues cannot be set here, is set in JSP-parsing
    62
    63      // HTMLSelectManyAttributes attributes
    64      private String _disabledClass;
    65      private String _enabledClass;
    66      private String _layout;
    67      private String _border;
    68
    69
    70      public void release() {
    71          super.release();
    72          _accesskey=null;
    73          _alt=null;
    74          _datafld=null;
    75          _datasrc=null;
    76          _dataformatas=null;
    77          _disabled=null;
    78          _onblur=null;
    79          _onchange=null;
    80          _onfocus=null;
    81          _onselect=null;
    82          _readonly=null;
    83          _size=null;
    84          _tabindex=null;
    85          _disabledClass=null;
    86          _enabledClass=null;
    87          _layout=null;
    88          _border=null;
    89      }
    90
    91      protected void setProperties(UIComponent component)
    92      {
    93          super.setProperties(component);
    94
    95          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.ACCESSKEY_ATTR, _accesskey);
    96          setStringProperty(component, HTML.ALT_ATTR, _alt);
    97          setStringProperty(component, HTML.DATAFLD_ATTR, _datafld);
    98          setStringProperty(component, HTML.DATASRC_ATTR, _datasrc);
    99          setStringProperty(component, HTML.DATAFORMATAS_ATTR, _dataformatas);
    100         setBooleanProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.DISABLED_ATTR, _disabled);
    101         setStringProperty(component, HTML.ONBLUR_ATTR, _onblur);
    102         setStringProperty(component, HTML.ONCHANGE_ATTR, _onchange);
    103         setStringProperty(component, HTML.ONFOCUS_ATTR, _onfocus);
    104         setStringProperty(component, HTML.ONSELECT_ATTR, _onselect);
    105         setBooleanProperty(component, HTML.READONLY_ATTR, _readonly);
    106         setIntegerProperty(component, HTML.SIZE_ATTR, _size);
    107         setStringProperty(component, HTML.TABINDEX_ATTR, _tabindex);
    108
    109         setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.JSFAttr.DISABLED_CLASS_ATTR, _disabledClass);
    110         setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.JSFAttr.ENABLED_CLASS_ATTR, _enabledClass);
    111         setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.JSFAttr.LAYOUT_ATTR, _layout);
    112         setIntegerProperty(component, HTML.BORDER_ATTR, _border);
    113    }
    114
    115     public void setAccesskey(String accesskey)
    116     {
    117         _accesskey = accesskey;
    118     }
    119
    120     public void setAlt(String alt)
    121     {
    122         _alt = alt;
    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 setSize(String size)
    171     {
    172         _size = size;
    173     }
    174
    175     public void setTabindex(String tabindex)
    176     {
    177         _tabindex = tabindex;
    178     }
    179
    180     public void setDisabledClass(String disabledClass)
    181     {
    182         _disabledClass = disabledClass;
    183     }
    184
    185     public void setEnabledClass(String enabledClass)
    186     {
    187         _enabledClass = enabledClass;
    188     }
    189
    190     public void setLayout(String layout)
    191     {
    192         _layout = layout;
    193     }
    194
    195     public void setBorder(String border)
    196     {
    197         _border = border;
    198     }
    199 }