/**
 * Licensed under the MICE s.r.l.
 * End User License Agreement
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.micegroup.it/voila/license.html
 */
package it.mice.voila.runtime.displaytag.basedec;

/**
 * Display Column Decorator per la trasformazione dei campi importi con 2 cifre decimali.
 */
public class Currency2DecimalDecorator extends ValueDecorator {

    public Currency2DecimalDecorator() {
        super();
    }

    public String decorate(Object value) {
    	String decoratedValue = decorate(value, getValueFromResource(CURRENCY_2DECIMAL_KEY)); 
        //return decorate(value, "#,##0.00") + " " + getCurrencySymbol();
        return decoratedValue == null ? getCurrencySymbol() : decoratedValue + " " + getCurrencySymbol();
    }
}
