Coverage Report - org.kuali.rice.kns.web.spring.UifConfigurableWebBindingInitializer
 
Classes in this File Line Coverage Branch Coverage Complexity
UifConfigurableWebBindingInitializer
0%
0/8
N/A
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.kns.web.spring;
 17  
 
 18  
 import org.kuali.rice.core.util.type.AbstractKualiDecimal;
 19  
 import org.kuali.rice.core.util.type.KualiDecimal;
 20  
 import org.kuali.rice.core.util.type.KualiInteger;
 21  
 import org.kuali.rice.core.util.type.KualiPercent;
 22  
 import org.kuali.rice.core.web.format.BigDecimalFormatter;
 23  
 import org.kuali.rice.core.web.format.CurrencyFormatter;
 24  
 import org.kuali.rice.core.web.format.KualiIntegerCurrencyFormatter;
 25  
 import org.kuali.rice.core.web.format.PercentageFormatter;
 26  
 import org.springframework.web.bind.WebDataBinder;
 27  
 import org.springframework.web.bind.support.ConfigurableWebBindingInitializer;
 28  
 import org.springframework.web.context.request.WebRequest;
 29  
 
 30  
 /**
 31  
  * Registers standard PropertyEditors used in binding for all http requests. 
 32  
  * 
 33  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 34  
  */
 35  0
 public class UifConfigurableWebBindingInitializer extends ConfigurableWebBindingInitializer {
 36  
 
 37  
         @Override
 38  
     public void initBinder(WebDataBinder binder, WebRequest request) {
 39  0
         binder.registerCustomEditor(AbstractKualiDecimal.class, new UifKnsFormatterPropertyEditor(BigDecimalFormatter.class));
 40  0
         binder.registerCustomEditor(KualiDecimal.class, new UifKnsFormatterPropertyEditor(CurrencyFormatter.class)); 
 41  0
         binder.registerCustomEditor(KualiInteger.class, new UifKnsFormatterPropertyEditor(KualiIntegerCurrencyFormatter.class));
 42  0
         binder.registerCustomEditor(KualiPercent.class, new UifKnsFormatterPropertyEditor(PercentageFormatter.class));
 43  
         
 44  
         // TODO do we need this since we are switching to spring tags
 45  0
         binder.registerCustomEditor(boolean.class, new UifBooleanEditor());
 46  
         
 47  0
             super.initBinder(binder, request);
 48  0
     }
 49  
 
 50  
 }