Coverage Report - org.kuali.rice.krad.uif.field.LinkField
 
Classes in this File Line Coverage Branch Coverage Complexity
LinkField
0%
0/19
0%
0/2
1.091
 
 1  
 /**
 2  
  * Copyright 2005-2011 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
 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, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.kuali.rice.krad.uif.field;
 17  
 
 18  
 import org.apache.commons.lang.StringUtils;
 19  
 import org.kuali.rice.krad.uif.view.View;
 20  
 import org.kuali.rice.krad.uif.widget.LightBox;
 21  
 
 22  
 /**
 23  
  * Field that encloses a link element
 24  
  * 
 25  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 26  
  */
 27  
 public class LinkField extends FieldBase {
 28  
         private static final long serialVersionUID = -1908504471910271148L;
 29  
 
 30  
         private String linkLabel;
 31  
         private String target;
 32  
         private String hrefText;
 33  
         private LightBox lightBox;
 34  
 
 35  
         public LinkField() {
 36  0
       super();
 37  0
         }
 38  
 
 39  
         /**
 40  
          * The following initialization is performed:
 41  
      *
 42  
          * <ul>
 43  
          * <li>Set the linkLabel if blank to the Field label</li>
 44  
          * </ul>
 45  
          *
 46  
          * @see org.kuali.rice.krad.uif.component.ComponentBase#performInitialization(org.kuali.rice.krad.uif.view.View, java.lang.Object)
 47  
          */
 48  
         @Override
 49  
         public void performInitialization(View view, Object model) {
 50  0
                 super.performInitialization(view, model);
 51  
 
 52  0
                 if (StringUtils.isBlank(linkLabel)) {
 53  0
                         linkLabel = this.getLabel();
 54  
                 }
 55  0
         }
 56  
 
 57  
         public String getLinkLabel() {
 58  0
                 return this.linkLabel;
 59  
         }
 60  
 
 61  
         public void setLinkLabel(String linkLabel) {
 62  0
                 this.linkLabel = linkLabel;
 63  0
         }
 64  
 
 65  
         public String getTarget() {
 66  0
                 return this.target;
 67  
         }
 68  
 
 69  
         public void setTarget(String target) {
 70  0
                 this.target = target;
 71  0
         }
 72  
 
 73  
         public String getHrefText() {
 74  0
                 return this.hrefText;
 75  
         }
 76  
 
 77  
         public void setHrefText(String hrefText) {
 78  0
                 this.hrefText = hrefText;
 79  0
         }
 80  
 
 81  
         /**
 82  
          * @param lightBox the lightBox to set
 83  
          */
 84  
         public void setLightBox(LightBox lightBox) {
 85  0
                 this.lightBox = lightBox;
 86  0
         }
 87  
 
 88  
         /**
 89  
          * @return the lightBox
 90  
          */
 91  
         public LightBox getLightBox() {
 92  0
                 return lightBox;
 93  
         }
 94  
         
 95  
     /**
 96  
      * @see org.kuali.rice.krad.uif.component.ScriptEventSupport#getSupportsOnClick()
 97  
      */
 98  
     public boolean getSupportsOnClick() {
 99  0
         return true;
 100  
     }        
 101  
 
 102  
 }