Class AbstractUIEditor

    • Field Detail

      • EVENT_SOURCE

        @Deprecated
        public static final java.lang.String EVENT_SOURCE
        Deprecated.
        since 6.3
        See Also:
        Constant Field Values
      • ATTRIBUTE_QUALIFIER_PARAM

        public static final java.lang.String ATTRIBUTE_QUALIFIER_PARAM
        See Also:
        Constant Field Values
      • PROPERTY_DESCRIPTOR_PARAM

        public static final java.lang.String PROPERTY_DESCRIPTOR_PARAM
        See Also:
        Constant Field Values
      • SEARCH_MODE_PARAM

        public static final java.lang.String SEARCH_MODE_PARAM
        See Also:
        Constant Field Values
      • initialEditValue

        protected java.lang.Object initialEditValue
      • inEditMode

        protected boolean inEditMode
      • initialInputString

        protected java.lang.String initialInputString
    • Constructor Detail

      • AbstractUIEditor

        public AbstractUIEditor()
    • Method Detail

      • createEditor

        @Deprecated
        public static void createEditor​(TypedObject item,
                                        PropertyDescriptor propDescr,
                                        org.zkoss.zk.ui.HtmlBasedComponent parent,
                                        ObjectValueContainer valueContainer,
                                        boolean autoPersist)
                                 throws java.lang.IllegalArgumentException
        Deprecated.
        since 6.3
        Throws:
        java.lang.IllegalArgumentException
      • createEditor

        @Deprecated
        public static void createEditor​(TypedObject item,
                                        PropertyDescriptor propDescr,
                                        org.zkoss.zk.ui.HtmlBasedComponent parent,
                                        ObjectValueContainer valueContainer,
                                        boolean autoPersist,
                                        java.lang.String editorCode)
                                 throws java.lang.IllegalArgumentException
        Deprecated.
        since 6.3
        Throws:
        java.lang.IllegalArgumentException
      • createEditor

        @Deprecated
        public static void createEditor​(TypedObject item,
                                        PropertyDescriptor propDescr,
                                        org.zkoss.zk.ui.HtmlBasedComponent parent,
                                        ObjectValueContainer valueContainer,
                                        boolean autoPersist,
                                        java.lang.String editorCode,
                                        java.util.Map<java.lang.String,​? extends java.lang.Object> params)
                                 throws java.lang.IllegalArgumentException
        Deprecated.
        since 6.3
        Throws:
        java.lang.IllegalArgumentException
      • createEditor

        @Deprecated
        public static void createEditor​(TypedObject item,
                                        PropertyDescriptor propDescr,
                                        org.zkoss.zk.ui.HtmlBasedComponent parent,
                                        ObjectValueContainer valueContainer,
                                        boolean autoPersist,
                                        java.lang.String editorCode,
                                        java.util.Map<java.lang.String,​? extends java.lang.Object> params,
                                        boolean focus)
                                 throws java.lang.IllegalArgumentException
        Deprecated.
        since 6.3
        Throws:
        java.lang.IllegalArgumentException
      • applyReferenceRelatedAttributes

        @Deprecated
        public static CreateContext applyReferenceRelatedAttributes​(ReferenceUIEditor referenceEditor,
                                                                    PropertyDescriptor propertyDescriptor,
                                                                    java.util.Map<java.lang.String,​? extends java.lang.Object> parameters,
                                                                    TypedObject currentObject,
                                                                    java.lang.Object currentValue,
                                                                    java.lang.String isoCode,
                                                                    UICockpitArea cockpitArea,
                                                                    UISession session)
        Deprecated.
        since 6.3
      • filterValues

        @Deprecated
        public static <T> java.util.List<? extends T> filterValues​(PropertyDescriptor propDescr,
                                                                   java.util.List<? extends T> values)
        Deprecated.
        since 6.3
      • getUIEditor

        @Deprecated
        public static UIEditor getUIEditor​(PropertyDescriptor propDescr,
                                           java.lang.String editorCode)
                                    throws java.lang.IllegalArgumentException
        Deprecated.
        since 6.3
        Convenience method for creating and retrieving a UIEditor.

        Note: If no editor variant is found with the code editorCode, the default editor for the specified property is returned. This method was moved to EditorHelper.getUIEditor(PropertyDescriptor, String)

        Parameters:
        propDescr - the property descriptor for which a corresponding editor is to be retrieved
        editorCode - the editor variant to be used
        Returns:
        a new UIEditor instance for the specified property and - if available - for the specified editor variant
        Throws:
        java.lang.IllegalArgumentException - if the property descriptor is invalid
      • isEditable

        @Deprecated
        public static boolean isEditable​(PropertyDescriptor propDescr,
                                         boolean creationMode)
        Deprecated.
        since 6.3, use UIAccessRightService's isWritable methods instead.
        Returns whether the specified property is editable or not.
        Parameters:
        propDescr - the property descriptor
        Returns:
        true if the property is editable, false otherwise
      • parseTemplateCodes

        @Deprecated
        public static final java.util.Set<ObjectType> parseTemplateCodes​(java.lang.String input,
                                                                         TypeService typeService)
        Deprecated.
      • persistValues

        @Deprecated
        public static void persistValues​(TypedObject item,
                                         ObjectValueContainer valueContainer,
                                         java.util.Map<java.lang.String,​? extends java.lang.Object> params)
                                  throws ValueHandlerException
        Deprecated.
        since 6.3
        Saves current values that are gathered within valueContainer object

        Parameters:
        item - current typed object item
        valueContainer - current value container
        params - creation parameters
        Throws:
        ValueHandlerException
      • fireValueChanged

        protected void fireValueChanged​(EditorListener listener)
      • getValue

        public java.lang.Object getValue()
        Description copied from interface: UIEditor
        Returns the value held by this editor.
        Specified by:
        getValue in interface UIEditor
        Returns:
        this editor's value
      • isEditable

        public boolean isEditable()
        Description copied from interface: UIEditor
        Returns whether this editor is editable or not
        Specified by:
        isEditable in interface UIEditor
        Returns:
        true, if editable
      • isOptional

        public boolean isOptional()
        Specified by:
        isOptional in interface UIEditor
      • parseInitialInputString

        protected void parseInitialInputString​(java.util.Map<java.lang.String,​? extends java.lang.Object> parameters)
      • setEditable

        public void setEditable​(boolean editable)
        Description copied from interface: UIEditor
        Defines whether this editor shall be editable. Has to be set before creating the view component.
        Specified by:
        setEditable in interface UIEditor
        Parameters:
        editable - whether this editor is editable or not
      • setFocus

        public void setFocus​(org.zkoss.zk.ui.HtmlBasedComponent rootEditorComponent,
                             boolean selectAll)
        Description copied from interface: UIEditor
        Sets the focus on the given input component which can be the rootEditorComponent or a child of it
        Specified by:
        setFocus in interface UIEditor
        Parameters:
        rootEditorComponent - the rootEditorComponent which is returned on method createViewComponent
        selectAll - if true, select the whole input field after focus. It is not guaranteed that the editor supports selection.
      • setOptional

        public void setOptional​(boolean optional)
        Specified by:
        setOptional in interface UIEditor
      • setValue

        public void setValue​(java.lang.Object value)
        Description copied from interface: UIEditor
        Sets the value of this editor to value.

        Note: Does not have anything to do with value persistence, it is only for setting the value to be displayed. However, depending on the view component implementation and the specified EditorListener the underlying view component might generate an event which causes the EditorListener.valueChanged(Object) method to be called.

        Specified by:
        setValue in interface UIEditor
        Parameters:
        value - the value to set
      • isSearchMode

        protected boolean isSearchMode​(java.util.Map<java.lang.String,​? extends java.lang.Object> parameters)