Class FormatedNumberConverter

java.lang.Object
org.zkoss.bind.converter.FormatedNumberConverter
All Implemented Interfaces:
Serializable, Converter

public class FormatedNumberConverter extends Object implements Converter, Serializable
Converter to convert String to Number.
Since:
6.0.0
Author:
henrichen
See Also:
  • Constructor Details

    • FormatedNumberConverter

      public FormatedNumberConverter()
  • Method Details

    • coerceToUi

      public Object coerceToUi(Object val, org.zkoss.zk.ui.Component comp, BindContext ctx)
      Convert Number to String.
      Specified by:
      coerceToUi in interface Converter
      Parameters:
      val - number to be converted
      comp - associated component
      ctx - bind context for associate Binding and extra parameter (e.g. format)
      Returns:
      the converted String
    • coerceToBean

      public Object coerceToBean(Object val, org.zkoss.zk.ui.Component comp, BindContext ctx)
      Convert String to Number.
      Specified by:
      coerceToBean in interface Converter
      Parameters:
      val - number in string form
      comp - associated component
      ctx - bind context for associate Binding and extra parameter (e.g. format)
      Returns:
      the converted Number