Class CustomNumberEditor

java.lang.Object
java.beans.PropertyEditorSupport
org.springframework.beans.propertyeditors.CustomNumberEditor
All Implemented Interfaces:
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.

Since:
06.06.2003
Author:
Juergen Hoeller
See Also: