Coverage Report - org.seasar.teeda.core.taglib.html.DataTableTag
 
Classes in this File Line Coverage Branch Coverage Complexity
DataTableTag
100%
46/46
N/A
1
 
 1  
 /*
 2  
  * Copyright 2004-2011 the Seasar Foundation and the Others.
 3  
  *
 4  
  * Licensed under the Apache License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  *     http://www.apache.org/licenses/LICENSE-2.0
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 13  
  * either express or implied. See the License for the specific language
 14  
  * governing permissions and limitations under the License.
 15  
  */
 16  
 package org.seasar.teeda.core.taglib.html;
 17  
 
 18  
 import javax.faces.component.UIComponent;
 19  
 import javax.faces.component.html.HtmlDataTable;
 20  
 
 21  
 import org.seasar.teeda.core.JsfConstants;
 22  
 import org.seasar.teeda.core.taglib.UIComponentTagBase;
 23  
 
 24  
 /**
 25  
  * @author yone
 26  
  * @author shot
 27  
  */
 28  4
 public class DataTableTag extends UIComponentTagBase {
 29  
 
 30  
     private String first;
 31  
 
 32  
     private String var;
 33  
 
 34  
     private String columnClasses;
 35  
 
 36  
     private String footerClass;
 37  
 
 38  
     private String headerClass;
 39  
 
 40  
     private String rowClasses;
 41  
 
 42  
     public String getComponentType() {
 43  1
         return HtmlDataTable.COMPONENT_TYPE;
 44  
     }
 45  
 
 46  
     public String getRendererType() {
 47  3
         return "javax.faces.Table";
 48  
     }
 49  
 
 50  
     protected void setProperties(UIComponent component) {
 51  1
         super.setProperties(component);
 52  1
         setComponentProperty(component, JsfConstants.FIRST_ATTR, getFirst());
 53  1
         setComponentProperty(component, JsfConstants.ROWS_ATTR, getRows());
 54  1
         setComponentProperty(component, JsfConstants.VAR_ATTR, getVar());
 55  1
         setComponentProperty(component, JsfConstants.BGCOLOR_ATTR, getBgcolor());
 56  1
         setComponentProperty(component, JsfConstants.BORDER_ATTR, getBorder());
 57  1
         setComponentProperty(component, JsfConstants.CELLPADDING_ATTR,
 58  
                 getCellpadding());
 59  1
         setComponentProperty(component, JsfConstants.CELLSPACING_ATTR,
 60  
                 getCellspacing());
 61  1
         setComponentProperty(component, JsfConstants.COLUMN_CLASSES_ATTR,
 62  
                 getColumnClasses());
 63  1
         setComponentProperty(component, JsfConstants.FOOTER_CLASS_ATTR,
 64  
                 getFooterClass());
 65  1
         setComponentProperty(component, JsfConstants.FRAME_ATTR, getFrame());
 66  1
         setComponentProperty(component, JsfConstants.HEADER_CLASS_ATTR,
 67  
                 getHeaderClass());
 68  1
         setComponentProperty(component, JsfConstants.ROW_CLASSES_ATTR,
 69  
                 getRowClasses());
 70  1
         setComponentProperty(component, JsfConstants.RULES_ATTR, getRules());
 71  1
         setComponentProperty(component, JsfConstants.SUMMARY_ATTR, getSummary());
 72  1
         setComponentProperty(component, JsfConstants.WIDTH_ATTR, getWidth());
 73  1
     }
 74  
 
 75  
     public void release() {
 76  1
         super.release();
 77  1
         first = null;
 78  1
         var = null;
 79  1
         columnClasses = null;
 80  1
         footerClass = null;
 81  1
         headerClass = null;
 82  1
         rowClasses = null;
 83  1
     }
 84  
 
 85  
     public void setFirst(String first) {
 86  2
         this.first = first;
 87  2
     }
 88  
 
 89  
     public void setVar(String var) {
 90  2
         this.var = var;
 91  2
     }
 92  
 
 93  
     public void setColumnClasses(String columnClasses) {
 94  2
         this.columnClasses = columnClasses;
 95  2
     }
 96  
 
 97  
     public void setFooterClass(String footerClass) {
 98  2
         this.footerClass = footerClass;
 99  2
     }
 100  
 
 101  
     public void setHeaderClass(String headerClass) {
 102  2
         this.headerClass = headerClass;
 103  2
     }
 104  
 
 105  
     public void setRowClasses(String rowClasses) {
 106  2
         this.rowClasses = rowClasses;
 107  2
     }
 108  
 
 109  
     public String getColumnClasses() {
 110  2
         return columnClasses;
 111  
     }
 112  
 
 113  
     public String getFirst() {
 114  2
         return first;
 115  
     }
 116  
 
 117  
     public String getFooterClass() {
 118  2
         return footerClass;
 119  
     }
 120  
 
 121  
     public String getHeaderClass() {
 122  2
         return headerClass;
 123  
     }
 124  
 
 125  
     public String getRowClasses() {
 126  2
         return rowClasses;
 127  
     }
 128  
 
 129  
     public String getVar() {
 130  2
         return var;
 131  
     }
 132  
 
 133  
 }