Class DateUIDefinition

    • Constructor Detail

      • DateUIDefinition

        public DateUIDefinition()
    • Method Detail

      • getParentType

        public String getParentType()
        Overrides:
        getParentType in class UIDefinition
        Returns:
        the Smartclient type from which this type inherits.
      • getFormEditorType

        public String getFormEditorType()
        Overrides:
        getFormEditorType in class UIDefinition
        Returns:
        the form item type used for editing this reference in a form.
      • getFilterEditorProperties

        public String getFilterEditorProperties​(Field field)
        Description copied from class: UIDefinition
        Computes properties to initialize and set the field in a Smartclient grid filter. This can be the default value or the sets of values in the valuemap. Note: the result should be either empty, if not empty then it start with a comma and end without a comma, this to generate correct javascript.
        Overrides:
        getFilterEditorProperties in class UIDefinition
        Parameters:
        field - the field for which the information should be computed.
        Returns:
        a JSONObject string which is used to initialize the formitem.
      • getFieldProperties

        public String getFieldProperties​(Field field)
        Description copied from class: UIDefinition
        Computes properties to initialize and set the field in a Smartclient form. This can be the default value or the sets of values in the valuemap. NOTE: the field parameter may be null, implementors of subclasses should take this into account.
        Overrides:
        getFieldProperties in class UIDefinition
        Parameters:
        field - the field for which the information should be computed. NOTE: the caller is allowed to pass null for cases where the field properties are needed for a FormItem which is not backed by an Openbravo field.
        Returns:
        a JSONObject string which is used to initialize the formitem.
      • parse

        public Date parse​(String value)
        Parses an String to a Date using reference's classic format.
      • getTypeProperties

        public String getTypeProperties()
        Description copied from class: UIDefinition
        Computes the properties used to define the type, this includes all the Smartclient SimpleType properties.
        Overrides:
        getTypeProperties in class UIDefinition
        Returns:
        a javascript string which can be included in the javascript defining the SimpleType. The default implementation returns an empty string.
      • getClientFormatObject

        protected String getClientFormatObject()
      • getCellAlign

        public String getCellAlign()
        Description copied from class: UIDefinition
        Returns alignment in grid view. In case it returns null, default alignment for actual data type is used.
        Overrides:
        getCellAlign in class UIDefinition
        Returns:
        null for default alignment, "left", "center" or "right"