Coverage Report - org.kuali.rice.kns.web.taglib.html.KNSImageTag
 
Classes in this File Line Coverage Branch Coverage Complexity
KNSImageTag
0%
0/9
0%
0/10
6
 
 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.kns.web.taglib.html;
 17  
 
 18  
 import org.apache.commons.lang.StringUtils;
 19  
 import org.apache.struts.action.ActionForm;
 20  
 import org.apache.struts.taglib.html.ImageTag;
 21  
 import org.kuali.rice.kns.util.WebUtils;
 22  
 import org.kuali.rice.kns.web.struts.form.pojo.PojoForm;
 23  
 
 24  
 import javax.servlet.jsp.JspException;
 25  
 
 26  
 /**
 27  
  * This is a description of what this class does - wliang don't forget to fill this in. 
 28  
  * 
 29  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 30  
  *
 31  
  */
 32  0
 public class KNSImageTag extends ImageTag {
 33  
 
 34  
         /**
 35  
          * This overridden method ...
 36  
          * 
 37  
          * @see org.apache.struts.taglib.html.SubmitTag#doEndTag()
 38  
          */
 39  
         @Override
 40  
         public int doEndTag() throws JspException {
 41  0
                 int returnVal = super.doEndTag();
 42  0
         if (!getDisabled() && !getReadonly()) {
 43  0
                 String name = prepareName();
 44  0
                 if (StringUtils.isNotBlank(name)) {
 45  0
                         ActionForm form = WebUtils.getKualiForm(pageContext);
 46  0
                     if(form!=null && form instanceof PojoForm) {
 47  0
                             ((PojoForm) form).registerEditableProperty(name);
 48  
                     }
 49  
                 }
 50  
         }
 51  0
                 return returnVal;
 52  
         }
 53  
 
 54  
 }