Coverage Report - org.kuali.rice.krad.uif.field.LinkField
 
Classes in this File Line Coverage Branch Coverage Complexity
LinkField
0%
0/18
0%
0/2
1.1
 
 1  
 /*
 2  
  * Copyright 2007 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 1.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/ecl1.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.container.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  
          * <p>
 41  
          * The following initialization is performed:
 42  
          * <ul>
 43  
          * <li>Set the linkLabel if blank to the Field label</li>
 44  
          * </ul>
 45  
          * </p>
 46  
          * 
 47  
          * @see org.kuali.rice.krad.uif.core.ComponentBase#performInitialization(org.kuali.rice.krad.uif.container.View)
 48  
          */
 49  
         @Override
 50  
         public void performInitialization(View view) {
 51  0
                 super.performInitialization(view);
 52  
 
 53  0
                 if (StringUtils.isBlank(linkLabel)) {
 54  0
                         linkLabel = this.getLabel();
 55  
                 }
 56  0
         }
 57  
 
 58  
         public String getLinkLabel() {
 59  0
                 return this.linkLabel;
 60  
         }
 61  
 
 62  
         public void setLinkLabel(String linkLabel) {
 63  0
                 this.linkLabel = linkLabel;
 64  0
         }
 65  
 
 66  
         public String getTarget() {
 67  0
                 return this.target;
 68  
         }
 69  
 
 70  
         public void setTarget(String target) {
 71  0
                 this.target = target;
 72  0
         }
 73  
 
 74  
         public String getHrefText() {
 75  0
                 return this.hrefText;
 76  
         }
 77  
 
 78  
         public void setHrefText(String hrefText) {
 79  0
                 this.hrefText = hrefText;
 80  0
         }
 81  
 
 82  
         /**
 83  
          * @param lightBox the lightBox to set
 84  
          */
 85  
         public void setLightBox(LightBox lightBox) {
 86  0
                 this.lightBox = lightBox;
 87  0
         }
 88  
 
 89  
         /**
 90  
          * @return the lightBox
 91  
          */
 92  
         public LightBox getLightBox() {
 93  0
                 return lightBox;
 94  
         }
 95  
 
 96  
 }