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