Coverage Report - org.seasar.teeda.core.taglib.html.CommandLinkTag
 
Classes in this File Line Coverage Branch Coverage Complexity
CommandLinkTag
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.HtmlCommandLink;
 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  5
 public class CommandLinkTag extends UIComponentTagBase {
 29  
 
 30  
     private String immediate;
 31  
 
 32  
     private String actionListener;
 33  
 
 34  
     public String getComponentType() {
 35  1
         return HtmlCommandLink.COMPONENT_TYPE;
 36  
     }
 37  
 
 38  
     public String getRendererType() {
 39  5
         return "javax.faces.Link";
 40  
     }
 41  
 
 42  
     protected void setProperties(UIComponent component) {
 43  2
         super.setProperties(component);
 44  2
         setActionProperty(component, getAction());
 45  2
         setActionListenerProperty(component, getActionListener());
 46  2
         setComponentProperty(component, JsfConstants.IMMEDIATE_ATTR,
 47  
                 getImmediate());
 48  2
         setComponentProperty(component, JsfConstants.CHARSET_ATTR, getCharset());
 49  2
         setComponentProperty(component, JsfConstants.COORDS_ATTR, getCoords());
 50  2
         setComponentProperty(component, JsfConstants.HREFLANG_ATTR,
 51  
                 getHreflang());
 52  2
         setComponentProperty(component, JsfConstants.REL_ATTR, getRel());
 53  2
         setComponentProperty(component, JsfConstants.REV_ATTR, getRev());
 54  2
         setComponentProperty(component, JsfConstants.SHAPE_ATTR, getShape());
 55  2
         setComponentProperty(component, JsfConstants.TARGET_ATTR, getTarget());
 56  2
         setComponentProperty(component, JsfConstants.TYPE_ATTR, getType());
 57  2
     }
 58  
 
 59  
     public void release() {
 60  1
         super.release();
 61  1
         immediate = null;
 62  1
         actionListener = null;
 63  1
     }
 64  
 
 65  
     public void setActionListener(String actionListener) {
 66  2
         this.actionListener = actionListener;
 67  2
     }
 68  
 
 69  
     public void setImmediate(String immediate) {
 70  2
         this.immediate = immediate;
 71  2
     }
 72  
 
 73  
     public String getActionListener() {
 74  3
         return actionListener;
 75  
     }
 76  
 
 77  
     public String getImmediate() {
 78  3
         return immediate;
 79  
     }
 80  
 
 81  
 }