Coverage Report - org.kuali.rice.krad.web.taglib.html.KNSELSubmitTag
 
Classes in this File Line Coverage Branch Coverage Complexity
KNSELSubmitTag
0%
0/9
0%
0/10
6
 
 1  
 /*
 2  
  * Copyright 2007-2008 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.web.taglib.html;
 17  
 
 18  
 import javax.servlet.jsp.JspException;
 19  
 
 20  
 import org.apache.commons.lang.StringUtils;
 21  
 import org.apache.struts.action.ActionForm;
 22  
 import org.apache.strutsel.taglib.html.ELSubmitTag;
 23  
 import org.kuali.rice.krad.util.WebUtils;
 24  
 import org.kuali.rice.krad.web.struts.pojo.PojoForm;
 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 KNSELSubmitTag extends ELSubmitTag {
 33  
         /**
 34  
          * @see org.apache.struts.taglib.html.SubmitTag#doEndTag()
 35  
          */
 36  
         @Override
 37  
         public int doEndTag() throws JspException {
 38  0
                 int returnVal = super.doEndTag();
 39  0
                 if (!getDisabled() && !getReadonly()) {
 40  0
                     String name = prepareName();
 41  0
                     if (StringUtils.isNotBlank(name)) {
 42  0
                         ActionForm form = WebUtils.getKualiForm(pageContext);
 43  0
                     if(form!=null && form instanceof PojoForm) {
 44  0
                             ((PojoForm) form).registerEditableProperty(name);
 45  
                     }
 46  
                     }
 47  
             }
 48  0
                 return returnVal;
 49  
         }
 50  
 }