src/main/java/org/efaps/ui/wicket/models/field/factories/RateUIFactory.java
@Override
    protected String getReadOnlyValue(final AbstractUIField _abstractUIField)
        throws EFapsException
    {
        String strValue = "";
        final Object valueTmp = _abstractUIField.getValue()
                        .getReadOnlyValue(_abstractUIField.getParent().getMode());
        if (valueTmp instanceof Number) {
            final DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Context.getThreadContext()
                            .getLocale());
            strValue = formatter.format(valueTmp);
        } else if (valueTmp instanceof RateUI.Value) {
            final DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Context.getThreadContext()
                            .getLocale());
            if (_abstractUIField.getValue().getAttribute() != null) {
                formatter.setMaximumFractionDigits(_abstractUIField.getValue().getAttribute().getScale());
            }
            strValue = formatter.format(((RateUI.Value) valueTmp).getRate());
        }
        return strValue;
    }
@Override
    protected String getReadOnlyValue(final AbstractUIField _abstractUIField)
        throws EFapsException
    {
        String strValue = "";
        final Object valueTmp = _abstractUIField.getValue()
                        .getReadOnlyValue(_abstractUIField.getParent().getMode());
        if (valueTmp instanceof Number) {
            final DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Context.getThreadContext()
                            .getLocale());
            strValue = formatter.format(valueTmp);
        } else if (valueTmp instanceof RateUI.Value) {
            final DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Context.getThreadContext()
                            .getLocale());
            if (_abstractUIField.getValue().getAttribute() != null) {
                formatter.setMaximumFractionDigits(_abstractUIField.getValue().getAttribute().getScale());
            }
            strValue = formatter.format(((RateUI.Value) valueTmp).getRate());
        }
        return strValue;
    }
@ Override protected String getReadOnlyValue ( final AbstractUIField _abstractUIField ) throws EFapsException { String strValue = "" ; final Object valueTmp = _abstractUIField . getValue ( ) . getReadOnlyValue ( _abstractUIField . getParent ( ) . getMode ( ) ) ; if ( valueTmp instanceof Number ) { final DecimalFormat formatter = ( DecimalFormat ) NumberFormat . getInstance ( Context . getThreadContext ( ) . getLocale ( ) ) ; strValue = formatter . format ( valueTmp ) ; } else if ( valueTmp instanceof RateUI . Value ) { final DecimalFormat formatter = ( DecimalFormat ) NumberFormat . getInstance ( Context . getThreadContext ( ) . getLocale ( ) ) ; if ( _abstractUIField . getValue ( ) . getAttribute ( ) != null ) { formatter . setMaximumFractionDigits ( _abstractUIField . getValue ( ) . getAttribute ( ) . getScale ( ) ) ; } strValue = formatter . format ( ( ( RateUI . Value ) valueTmp ) . getRate ( ) ) ; } return strValue ; }
{@inheritDoc}
{