Coverage Report - org.apache.myfaces.shared_impl.taglib.core.SelectItemTagBase
 
Classes in this File Line Coverage Branch Coverage Complexity
SelectItemTagBase
0%
0/23
N/A
0
 
 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_impl.taglib.core;
 20  
 
 21  
 import org.apache.myfaces.shared_impl.renderkit.JSFAttr;
 22  
 
 23  
 import javax.el.ValueExpression;
 24  
 import javax.faces.component.UIComponent;
 25  
 
 26  
 /**
 27  
  * @author Thomas Spiegl (latest modification by $Author: lu4242 $)
 28  
  * @version $Revision: 684924 $ $Date: 2008-08-11 15:59:26 -0500 (Mon, 11 Aug 2008) $
 29  
  */
 30  0
 public class SelectItemTagBase
 31  
     extends org.apache.myfaces.shared_impl.taglib.UIComponentELTagBase
 32  
 {
 33  
     //private static final Log log = LogFactory.getLog(SelectItemTag.class);
 34  
 
 35  
     public String getComponentType()
 36  
     {
 37  0
         return "javax.faces.SelectItem";
 38  
     }
 39  
 
 40  
     public String getRendererType()
 41  
     {
 42  0
         return null;
 43  
     }
 44  
 
 45  
     // UISelectItem attributes
 46  
     private ValueExpression _itemDisabled;
 47  
     private ValueExpression _itemDescription;
 48  
     private ValueExpression _itemLabel;
 49  
     private ValueExpression _itemValue;
 50  
     private ValueExpression _escape;
 51  
 
 52  
     protected void setProperties(UIComponent component)
 53  
     {
 54  0
         super.setProperties(component);
 55  
 
 56  0
         setBooleanProperty(component, JSFAttr.ITEM_DISABLED_ATTR, _itemDisabled);
 57  0
         setStringProperty(component, JSFAttr.ITEM_DESCRIPTION_ATTR, _itemDescription);
 58  0
         setStringProperty(component, org.apache.myfaces.shared_impl.renderkit.JSFAttr.ITEM_LABEL_ATTR, _itemLabel);
 59  0
         setStringProperty(component, JSFAttr.ITEM_VALUE_ATTR, _itemValue);
 60  0
         setBooleanProperty(component, JSFAttr.ITEM_ESCAPED_ATTR, _escape, Boolean.TRUE);
 61  0
     }
 62  
 
 63  
     public void setItemDisabled(ValueExpression itemDisabled)
 64  
     {
 65  0
         _itemDisabled = itemDisabled;
 66  0
     }
 67  
 
 68  
     public void setItemDescription(ValueExpression itemDescription)
 69  
     {
 70  0
         _itemDescription = itemDescription;
 71  0
     }
 72  
 
 73  
     public void setItemLabel(ValueExpression itemLabel)
 74  
     {
 75  0
         _itemLabel = itemLabel;
 76  0
     }
 77  
 
 78  
     @Deprecated
 79  
     protected void setItemValue(String itemValue)
 80  
     {
 81  0
         _itemValue = getFacesContext().getApplication().getExpressionFactory().createValueExpression(
 82  
                     getFacesContext().getELContext(),itemValue,String.class);
 83  0
     }
 84  
 
 85  
     public void setItemValue(ValueExpression itemValue)
 86  
     {
 87  0
         _itemValue = itemValue;
 88  0
     }
 89  
 
 90  
     public void setEscape(ValueExpression escape)
 91  
     {
 92  0
         _escape = escape;
 93  0
     }
 94  
 
 95  
     protected ValueExpression getItemValue()
 96  
     {
 97  0
         return _itemValue;
 98  
     }
 99  
 
 100  
 }