Coverage Report - org.seasar.teeda.core.taglib.html.InputTagBase
 
Classes in this File Line Coverage Branch Coverage Complexity
InputTagBase
94%
30/32
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  
 
 20  
 import org.seasar.teeda.core.JsfConstants;
 21  
 import org.seasar.teeda.core.taglib.UIComponentTagBase;
 22  
 
 23  
 /**
 24  
  * @author yone
 25  
  * @author shot
 26  
  */
 27  37
 public abstract class InputTagBase extends UIComponentTagBase {
 28  
 
 29  
     private String immediate;
 30  
 
 31  
     private String required;
 32  
 
 33  
     private String validator;
 34  
 
 35  
     private String valueChangeListener;
 36  
 
 37  
     private String label;
 38  
 
 39  
     protected void setProperties(UIComponent component) {
 40  11
         super.setProperties(component);
 41  11
         setComponentProperty(component, JsfConstants.MAXLENGTH_ATTR,
 42  
                 getMaxlength());
 43  11
         setComponentProperty(component, JsfConstants.IMMEDIATE_ATTR,
 44  
                 getImmediate());
 45  11
         setComponentProperty(component, JsfConstants.REQUIRED_ATTR,
 46  
                 getRequired());
 47  11
         setValidatorProperty(component, getValidator());
 48  11
         setValueChangeListenerProperty(component, getValueChangeListener());
 49  11
         setComponentProperty(component, JsfConstants.READONLY_ATTR,
 50  
                 getReadonly());
 51  11
         setComponentProperty(component, JsfConstants.LABEL_ATTR, getLabel());
 52  11
     }
 53  
 
 54  
     public void release() {
 55  4
         super.release();
 56  4
         immediate = null;
 57  4
         required = null;
 58  4
         validator = null;
 59  4
         valueChangeListener = null;
 60  4
         label = null;
 61  4
     }
 62  
 
 63  
     public void setImmediate(String immediate) {
 64  12
         this.immediate = immediate;
 65  12
     }
 66  
 
 67  
     public void setRequired(String required) {
 68  12
         this.required = required;
 69  12
     }
 70  
 
 71  
     public void setValidator(String validator) {
 72  12
         this.validator = validator;
 73  12
     }
 74  
 
 75  
     public void setValueChangeListener(String valueChangeListener) {
 76  12
         this.valueChangeListener = valueChangeListener;
 77  12
     }
 78  
 
 79  
     public void setLabel(String label) {
 80  0
         this.label = label;
 81  0
     }
 82  
 
 83  
     public String getImmediate() {
 84  12
         return immediate;
 85  
     }
 86  
 
 87  
     public String getRequired() {
 88  12
         return required;
 89  
     }
 90  
 
 91  
     public String getValidator() {
 92  12
         return validator;
 93  
     }
 94  
 
 95  
     public String getValueChangeListener() {
 96  12
         return valueChangeListener;
 97  
     }
 98  
 
 99  
     public String getLabel() {
 100  11
         return label;
 101  
     }
 102  
 
 103  
 }