Class DefaultDateDisplayConverter

  • All Implemented Interfaces:
    IDisplayConverter

    public class DefaultDateDisplayConverter
    extends DisplayConverter
    Converts a java.util.Date object to a given format and vice versa
    • Constructor Detail

      • DefaultDateDisplayConverter

        public DefaultDateDisplayConverter()
        Convert Date to String using the default format from SimpleDateFormat
      • DefaultDateDisplayConverter

        public DefaultDateDisplayConverter​(TimeZone timeZone)
      • DefaultDateDisplayConverter

        public DefaultDateDisplayConverter​(String dateFormat)
        Parameters:
        dateFormat - as specified in SimpleDateFormat
      • DefaultDateDisplayConverter

        public DefaultDateDisplayConverter​(String dateFormat,
                                           TimeZone timeZone)
    • Method Detail

      • displayToCanonicalValue

        public Object displayToCanonicalValue​(Object displayValue)
        Description copied from interface: IDisplayConverter
        Convert from display value to value in the backing data structure.

        NOTE:
        The type the display value is converted to must match the type in the setter of the backing bean/row object

        Specified by:
        displayToCanonicalValue in interface IDisplayConverter
        Specified by:
        displayToCanonicalValue in class DisplayConverter
        Parameters:
        displayValue - The display value that should be converted to the data value that matches the backing data.
        Returns:
        The converted value to put to the backing data.