Class AbstractTextEditor<T>

    • Constructor Detail

      • AbstractTextEditor

        public AbstractTextEditor​(java.lang.Class<T> valueType)
    • Method Detail

      • render

        public void render​(org.zkoss.zk.ui.Component parent,
                           EditorContext<T> context,
                           EditorListener<T> listener)
        Description copied from interface: CockpitEditorRenderer
        Creates a new editor component and attaches it to the specified Component component.
        Parameters:
        parent - parent component the editor should be attached to
        context - the context for the editor creation
        listener - the listener to notify the rest of the world about value changes and other events
      • initAdditionalParameters

        protected void initAdditionalParameters​(org.zkoss.zul.Textbox editorView,
                                                EditorContext<T> context)
        Additional initialization of ui component according to specified context
        Parameters:
        editorView - ui component
        context - context
      • coerceFromString

        protected T coerceFromString​(org.zkoss.zul.impl.InputElement editorView,
                                     java.lang.String text)
                              throws org.zkoss.zk.ui.WrongValueException
        Description copied from class: AbstractTextBasedEditorRenderer
        Converts string value to a real value.
        Specified by:
        coerceFromString in class AbstractTextBasedEditorRenderer<T>
        Parameters:
        editorView - the underlying editor component
        text - the string vale
        Returns:
        the value
        Throws:
        org.zkoss.zk.ui.WrongValueException
      • convertToString

        protected java.lang.String convertToString​(org.zkoss.zul.impl.InputElement editorView,
                                                   T initialValue)
        Converts component value to String
        Parameters:
        editorView - ui component
        initialValue - vomponent value
        Returns:
        string value