Class AbstractCockpitEditorRenderer<T>

    • Field Detail

      • YW_EDITOR_AREA_LABEL_CONTAINER

        protected static final java.lang.String YW_EDITOR_AREA_LABEL_CONTAINER
        See Also:
        Constant Field Values
      • HEADER_LABEL_TOOLTIP

        public static final java.lang.String HEADER_LABEL_TOOLTIP
        See Also:
        Constant Field Values
      • ON_DELETE_EVENT

        protected static final java.lang.String ON_DELETE_EVENT
        See Also:
        Constant Field Values
    • Constructor Detail

      • AbstractCockpitEditorRenderer

        public AbstractCockpitEditorRenderer()
    • Method Detail

      • extractEmbeddedType

        protected java.lang.String extractEmbeddedType​(EditorContext<T> context)
        Utility method providing a way for editors with editorType like Range(java.lang.Integer) to retrieve the embedded type Integer.
        Parameters:
        context - to extract the editor type from
        Returns:
        The editor embedded editorType or null if no embedded type is referenced in editorType.
      • extractEmbeddedEditor

        protected java.lang.String extractEmbeddedEditor​(java.lang.String editor)
      • getL10nDecorator

        protected java.lang.String getL10nDecorator​(EditorContext<T> context,
                                                    java.lang.String parameterKey,
                                                    java.lang.String defaultFallbackL10nKey)
        Retrieves the value for this Editor's label in the order: As L10n value, provided raw value, default L10n value if nothing is specified. Might return null if both parameterKey and defaultFallbackL10nKey are invalid.
        Parameters:
        context - Contains various parameters
        parameterKey - A parameter name to which an L10n key is assigned.
        defaultFallbackL10nKey - An L10n key's value to display when no key is provided as a custom attribute.
        Returns:
        label value which must not be necessarily a L10n value.
      • findAncestorEditor

        protected Editor findAncestorEditor​(org.zkoss.zk.ui.Component component)
        Find first component in hierarchy which is an Editor
        Parameters:
        component - to lookup first nested editor
        Returns:
        first found instance of editor or null
      • findEmbeddedEditors

        protected java.util.List<Editor> findEmbeddedEditors​(org.zkoss.zk.ui.Component component)
        Finds embedded editors for given component. If the component is not instance of an Editor then method will seek embedded editors in ancestor editor findAncestorEditor(Component) of the component.
        Parameters:
        component - to look up embedded editors.
        Returns:
        list of embedded editors;