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