001 /* 002 * Copyright 2011 The Kuali Foundation Licensed under the Educational Community 003 * License, Version 1.0 (the "License"); you may not use this file except in 004 * compliance with the License. You may obtain a copy of the License at 005 * http://www.opensource.org/licenses/ecl1.php Unless required by applicable law 006 * or agreed to in writing, software distributed under the License is 007 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 008 * KIND, either express or implied. See the License for the specific language 009 * governing permissions and limitations under the License. 010 */ 011 package org.kuali.rice.krad.web.bind; 012 013 import org.kuali.rice.core.api.util.type.KualiDecimal; 014 import org.kuali.rice.core.api.util.type.KualiInteger; 015 016 /** 017 * This class is used to format 018 * <code>org.kuali.rice.core.api.util.type.KualiInteger</code> in the local 019 * currency. 020 * 021 * @author Kuali Rice Team (rice.collab@kuali.org) 022 */ 023 public class UifKualiIntegerCurrencyEditor extends UifCurrencyEditor { 024 025 /** 026 * This overridden method converts the display string to a 027 * <code>org.kuali.rice.core.api.util.type.KualiInteger</code> object using 028 * local currency format. 029 * 030 * @see UifCurrencyEditor#setAsText(java.lang.String) 031 */ 032 @Override 033 public void setAsText(String text) { 034 KualiDecimal value = (KualiDecimal) (super.convertToObject(text)); 035 this.setValue(new KualiInteger(value.longValue())); 036 } 037 038 }