Coverage Report - org.seasar.teeda.core.taglib.html.CommandButtonTag
 
Classes in this File Line Coverage Branch Coverage Complexity
CommandButtonTag
100%
26/26
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.HtmlCommandButton;
 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  8
 public class CommandButtonTag extends UIComponentTagBase {
 29  
 
 30  
     private String immediate;
 31  
 
 32  
     private String actionListener;
 33  
 
 34  
     private String image;
 35  
 
 36  
     public String getComponentType() {
 37  1
         return HtmlCommandButton.COMPONENT_TYPE;
 38  
     }
 39  
 
 40  
     public String getRendererType() {
 41  11
         return "javax.faces.Button";
 42  
     }
 43  
 
 44  
     protected void setProperties(UIComponent component) {
 45  5
         super.setProperties(component);
 46  5
         setComponentProperty(component, JsfConstants.ALT_ATTR, getAlt());
 47  5
         setComponentProperty(component, JsfConstants.ONCHANGE_ATTR,
 48  
                 getOnchange());
 49  5
         setComponentProperty(component, JsfConstants.ONSELECT_ATTR,
 50  
                 getOnselect());
 51  5
         setComponentProperty(component, JsfConstants.IMMEDIATE_ATTR, immediate);
 52  5
         setComponentProperty(component, JsfConstants.IMAGE_ATTR, image);
 53  5
         setActionProperty(component, getAction());
 54  5
         setActionListenerProperty(component, actionListener);
 55  4
     }
 56  
 
 57  
     public void release() {
 58  1
         super.release();
 59  1
         immediate = null;
 60  1
         actionListener = null;
 61  1
         image = null;
 62  1
     }
 63  
 
 64  
     public void setActionListener(String actionListener) {
 65  3
         this.actionListener = actionListener;
 66  3
     }
 67  
 
 68  
     public void setImage(String image) {
 69  2
         this.image = image;
 70  2
     }
 71  
 
 72  
     public void setImmediate(String immediate) {
 73  2
         this.immediate = immediate;
 74  2
     }
 75  
 
 76  
     public String getActionListener() {
 77  1
         return actionListener;
 78  
     }
 79  
 
 80  
     public String getImage() {
 81  1
         return image;
 82  
     }
 83  
 
 84  
     public String getImmediate() {
 85  1
         return immediate;
 86  
     }
 87  
 
 88  
 }