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   * @author Manfred Geiler (latest modification by $Author: grantsmith $)
    28   * @version $Revision: 472630 $ $Date: 2006-11-08 15:40:03 -0500 (Wed, 08 Nov 2006) $
    29   */
    30  public abstract class HtmlPanelGridTagBase
    31          extends org.apache.myfaces.shared_orchestra.taglib.html.HtmlComponentBodyTagBase
    32  {
    33      //private static final Log log = LogFactory.getLog(HtmlPanelGridTag.class);
    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 table attributes relevant for Grid
    44      private String _align;
    45      private String _border;
    46      private String _bgcolor;
    47      private String _cellpadding;
    48      private String _cellspacing;
    49      private String _datafld;
    50      private String _datasrc;
    51      private String _dataformatas;
    52      private String _frame;
    53      private String _rules;
    54      private String _summary;
    55      private String _width;
    56
    57      // UIPanel attributes
    58      // value and converterId --> already implemented in UIComponentTagBase
    59
    60      // HtmlPanelGrid attributes
    61      private String _columnClasses;
    62      private String _columns;
    63      private String _footerClass;
    64      private String _headerClass;
    65      private String _rowClasses;
    66
    67      public void release() {
    68          super.release();
    69          _align=null;
    70          _border=null;
    71          _bgcolor=null;
    72          _cellpadding=null;
    73          _cellspacing=null;
    74          _datafld=null;
    75          _datasrc=null;
    76          _dataformatas=null;
    77          _frame=null;
    78          _rules=null;
    79          _summary=null;
    80          _width=null;
    81          _columnClasses=null;
    82          _columns=null;
    83          _footerClass=null;
    84          _headerClass=null;
    85          _rowClasses=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.ALIGN_ATTR, _align);
    93          setIntegerProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.BORDER_ATTR, _border);
    94          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.BGCOLOR_ATTR, _bgcolor);
    95          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.CELLPADDING_ATTR, _cellpadding);
    96          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.CELLSPACING_ATTR, _cellspacing);
    97          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.DATAFLD_ATTR, _datafld);
    98          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.DATASRC_ATTR, _datasrc);
    99          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.DATAFORMATAS_ATTR, _dataformatas);
    100         setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.FRAME_ATTR, _frame);
    101         setStringProperty(component, HTML.RULES_ATTR, _rules);
    102         setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.SUMMARY_ATTR, _summary);
    103         setStringProperty(component, HTML.WIDTH_ATTR, _width);
    104
    105         setStringProperty(component, JSFAttr.COLUMN_CLASSES_ATTR, _columnClasses);
    106         setIntegerProperty(component, JSFAttr.COLUMNS_ATTR, _columns);
    107         setStringProperty(component, JSFAttr.FOOTER_CLASS_ATTR, _footerClass);
    108         setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.JSFAttr.HEADER_CLASS_ATTR, _headerClass);
    109         setStringProperty(component, JSFAttr.ROW_CLASSES_ATTR, _rowClasses);
    110     }
    111
    112
    113     public void setAlign(String align)
    114     {
    115         _align = align;
    116     }
    117
    118     public void setBorder(String border)
    119     {
    120         _border = border;
    121     }
    122
    123     public void setBgcolor(String bgcolor)
    124     {
    125         _bgcolor = bgcolor;
    126     }
    127
    128     public void setCellpadding(String cellpadding)
    129     {
    130         _cellpadding = cellpadding;
    131     }
    132
    133     public void setCellspacing(String cellspacing)
    134     {
    135         _cellspacing = cellspacing;
    136     }
    137
    138     public void setDatafld(String datafld)
    139     {
    140         _datafld = datafld;
    141     }
    142
    143     public void setDatasrc(String datasrc)
    144     {
    145         _datasrc = datasrc;
    146     }
    147
    148     public void setDataformatas(String dataformatas)
    149     {
    150         _dataformatas = dataformatas;
    151     }
    152
    153     public void setFrame(String frame)
    154     {
    155         _frame = frame;
    156     }
    157
    158     public void setRules(String rules)
    159     {
    160         _rules = rules;
    161     }
    162
    163     public void setSummary(String summary)
    164     {
    165         _summary = summary;
    166     }
    167
    168     public void setWidth(String width)
    169     {
    170         _width = width;
    171     }
    172
    173     public void setColumnClasses(String columnClasses)
    174     {
    175         _columnClasses = columnClasses;
    176     }
    177
    178     public void setColumns(String columns)
    179     {
    180         _columns = columns;
    181     }
    182
    183     public void setFooterClass(String footerClass)
    184     {
    185         _footerClass = footerClass;
    186     }
    187
    188     public void setHeaderClass(String headerClass)
    189     {
    190         _headerClass = headerClass;
    191     }
    192
    193     public void setRowClasses(String rowClasses)
    194     {
    195         _rowClasses = rowClasses;
    196     }
    197 }