类 CustomNumberEditor

  • 所有已实现的接口:
    PropertyEditor

    public class CustomNumberEditor
    extends PropertyEditorSupport
    Property editor for any Number subclass such as Short, Integer, Long, BigInteger, Float, Double, BigDecimal. Can use a given NumberFormat for (locale-specific) parsing and rendering, or alternatively the default decode / valueOf / toString methods.

    This is not meant to be used as system PropertyEditor but rather as locale-specific number editor within custom controller code, parsing user-entered number strings into Number properties of beans and rendering them in the UI form.

    In web MVC code, this editor will typically be registered with binder.registerCustomEditor calls.

    从以下版本开始:
    06.06.2003
    作者:
    Juergen Hoeller
    另请参阅:
    Number, NumberFormat, DataBinder.registerCustomEditor(java.lang.Class<?>, java.beans.PropertyEditor)