Class FixedInstantEditorLabelsRenderer

  • All Implemented Interfaces:
    CockpitEditorRenderer<java.lang.Object>

    public class FixedInstantEditorLabelsRenderer
    extends AbstractInstantEditorLabelRenderer
    A label renderer for Instant Editor with fixed labels depending on value to be rendered.

    Renderer assumes that there are parameters set in editor context that specifies expressions returning true or false named according to convention: expression_NAME. If some expression returns true then a value of setting label_NAME is returned as label (checking if it is a localized label key).

    • Constructor Detail

      • FixedInstantEditorLabelsRenderer

        public FixedInstantEditorLabelsRenderer()
    • Method Detail

      • render

        public void render​(org.zkoss.zk.ui.Component parent,
                           EditorContext<java.lang.Object> context,
                           EditorListener<java.lang.Object> 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
      • getMatchingLabelName

        protected java.util.Optional<java.lang.String> getMatchingLabelName​(EditorContext<java.lang.Object> editorContext,
                                                                            java.lang.Object value)
      • getLabel

        protected java.lang.String getLabel​(EditorContext<java.lang.Object> editorContext,
                                            java.lang.String labelName)
      • getFallbackLabel

        protected java.lang.String getFallbackLabel​(EditorContext<java.lang.Object> editorContext)
      • setExpressionResolverFactory

        public void setExpressionResolverFactory​(ExpressionResolverFactory expressionResolverFactory)