Interface UIEditor

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String INITIAL_EDIT_STRING  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.zkoss.zk.ui.HtmlBasedComponent createViewComponent​(java.lang.Object initialValue, java.util.Map<java.lang.String,​? extends java.lang.Object> parameters, EditorListener listener)
      Creates a new editor component and attaches it to the specified Page page.
      java.lang.String getEditorType()  
      java.lang.Object getValue()
      Returns the value held by this editor.
      boolean isEditable()
      Returns whether this editor is editable or not
      boolean isInline()
      Returns whether this editor is an inline editor or not.
      boolean isOptional()  
      void setEditable​(boolean editable)
      Defines whether this editor shall be editable.
      void setFocus​(org.zkoss.zk.ui.HtmlBasedComponent rootEditorComponent, boolean selectAll)
      Sets the focus on the given input component which can be the rootEditorComponent or a child of it
      void setOptional​(boolean optional)  
      void setValue​(java.lang.Object value)
      Sets the value of this editor to value.
    • Field Detail

    • Method Detail

      • createViewComponent

        org.zkoss.zk.ui.HtmlBasedComponent createViewComponent​(java.lang.Object initialValue,
                                                               java.util.Map<java.lang.String,​? extends java.lang.Object> parameters,
                                                               EditorListener listener)
        Creates a new editor component and attaches it to the specified Page page.
        Parameters:
        initialValue - editor's initial value
        parameters - parameters passed via configuration for particular editor
        listener - the EditorListener that will receive events when the editor's value is changed
        Returns:
        the editor component
      • isInline

        boolean isInline()
        Returns whether this editor is an inline editor or not.
        Returns:
        true, if inline
      • getEditorType

        java.lang.String getEditorType()
      • setValue

        void setValue​(java.lang.Object value)
        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.

        Parameters:
        value - the value to set
      • getValue

        java.lang.Object getValue()
        Returns the value held by this editor.
        Returns:
        this editor's value
      • setEditable

        void setEditable​(boolean editable)
        Defines whether this editor shall be editable. Has to be set before creating the view component.
        Parameters:
        editable - whether this editor is editable or not
      • isEditable

        boolean isEditable()
        Returns whether this editor is editable or not
        Returns:
        true, if editable
      • setFocus

        void setFocus​(org.zkoss.zk.ui.HtmlBasedComponent rootEditorComponent,
                      boolean selectAll)
        Sets the focus on the given input component which can be the rootEditorComponent or a child of it
        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.
      • isOptional

        boolean isOptional()
      • setOptional

        void setOptional​(boolean optional)