Coverage Report - org.seasar.teeda.core.taglib.core.SelectItemTag
 
Classes in this File Line Coverage Branch Coverage Complexity
SelectItemTag
100%
28/28
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.core;
 17  
 
 18  
 import javax.faces.component.UIComponent;
 19  
 import javax.faces.component.UISelectItem;
 20  
 
 21  
 import org.seasar.teeda.core.JsfConstants;
 22  
 import org.seasar.teeda.core.taglib.UIComponentTagBase;
 23  
 
 24  
 /**
 25  
  * @author yone
 26  
  */
 27  
 public class SelectItemTag extends UIComponentTagBase {
 28  
 
 29  
     private static final String COMPONENT_TYPE = UISelectItem.COMPONENT_TYPE;
 30  
 
 31  
     protected String itemDescription;
 32  
 
 33  
     protected String itemDisabled;
 34  
 
 35  
     protected String itemLabel;
 36  
 
 37  
     protected String itemValue;
 38  
 
 39  
     public SelectItemTag() {
 40  4
         super();
 41  4
     }
 42  
 
 43  
     public void setItemDescription(String itemDescription) {
 44  2
         this.itemDescription = itemDescription;
 45  2
     }
 46  
 
 47  
     public void setItemDisabled(String itemDisabled) {
 48  2
         this.itemDisabled = itemDisabled;
 49  2
     }
 50  
 
 51  
     public void setItemLabel(String itemLabel) {
 52  2
         this.itemLabel = itemLabel;
 53  2
     }
 54  
 
 55  
     public void setItemValue(String itemValue) {
 56  2
         this.itemValue = itemValue;
 57  2
     }
 58  
 
 59  
     public String getItemDescription() {
 60  1
         return itemDescription;
 61  
     }
 62  
 
 63  
     public String getItemDisabled() {
 64  1
         return itemDisabled;
 65  
     }
 66  
 
 67  
     public String getItemLabel() {
 68  1
         return itemLabel;
 69  
     }
 70  
 
 71  
     public String getItemValue() {
 72  1
         return itemValue;
 73  
     }
 74  
 
 75  
     public String getComponentType() {
 76  1
         return COMPONENT_TYPE;
 77  
     }
 78  
 
 79  
     public String getRendererType() {
 80  2
         return null;
 81  
     }
 82  
 
 83  
     protected void setProperties(UIComponent component) {
 84  1
         super.setProperties(component);
 85  1
         setComponentProperty(component, JsfConstants.ITEM_DESCRIPTION_ATTR,
 86  
                 itemDescription);
 87  1
         setComponentProperty(component, JsfConstants.ITEM_DISABLED_ATTR,
 88  
                 itemDisabled);
 89  1
         setComponentProperty(component, JsfConstants.ITEM_LABEL_ATTR, itemLabel);
 90  1
         setComponentProperty(component, JsfConstants.ITEM_VALUE_ATTR, itemValue);
 91  1
     }
 92  
 
 93  
     public void release() {
 94  1
         super.release();
 95  1
         itemDescription = null;
 96  1
         itemDisabled = null;
 97  1
         itemLabel = null;
 98  1
         itemValue = null;
 99  1
     }
 100  
 
 101  
 }