Class DateParametersEditorHelper


  • public class DateParametersEditorHelper
    extends java.lang.Object
    Helper class which determine date format and lenient flag based on parameters specified in configuration
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getDateFormat​(java.util.Map<java.lang.String,​? extends java.lang.Object> parameters, org.zkoss.zul.Datebox dateBox)
      Determines the date format for the Datebox.
      protected static java.lang.String getDefaultDateFormat​(org.zkoss.zul.Datebox datebox)  
      static java.lang.String getLenientDefault()  
      static boolean getLenientFlag​(java.util.Map<java.lang.String,​? extends java.lang.Object> parameters)
      Determines the lenient flag to used for the Datebox.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DateParametersEditorHelper

        public DateParametersEditorHelper()
    • Method Detail

      • getDateFormat

        public static java.lang.String getDateFormat​(java.util.Map<java.lang.String,​? extends java.lang.Object> parameters,
                                                     org.zkoss.zul.Datebox dateBox)
        Determines the date format for the Datebox.

        The given date format can be either a custom date format e. g. dd/MM/yyyy (see SimpleDateFormat) or the following constants for getting a localized date format:

        • short
        • medium
        • long
        • full
        Parameters:
        parameters -
        Returns:
        date format for the Datebox or default date Format if format is invalid
      • getDefaultDateFormat

        protected static java.lang.String getDefaultDateFormat​(org.zkoss.zul.Datebox datebox)
      • getLenientFlag

        public static boolean getLenientFlag​(java.util.Map<java.lang.String,​? extends java.lang.Object> parameters)
        Determines the lenient flag to used for the Datebox.

        The flag can specify as parameter.

        If no parameter is specified the default value from the project.properties is used.

        Returns true if no default and no parameter is used.

        Parameters:
        parameters -
        Returns:
        the determined lenient flag
      • getLenientDefault

        public static java.lang.String getLenientDefault()