Class FixedInstantEditorLabelsRenderer
- java.lang.Object
-
- com.hybris.cockpitng.editors.impl.AbstractCockpitEditorRenderer<java.lang.Object>
-
- com.hybris.cockpitng.editor.decorated.AbstractEditorRendererWrapper
-
- com.hybris.cockpitng.editor.instant.AbstractInstantEditorLabelRenderer
-
- com.hybris.cockpitng.editor.instant.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
trueorfalsenamed according to convention:expression_NAME. If some expression returns true then a value of settinglabel_NAMEis returned as label (checking if it is a localized label key).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classFixedInstantEditorLabelsRenderer.FixedLabelProvider
-
Field Summary
-
Fields inherited from class com.hybris.cockpitng.editor.instant.AbstractInstantEditorLabelRenderer
LABEL_KEY_NO_VALUE, PARAM_LABEL_NO_VALUE_KEY, PARAM_LABEL_NO_VALUE_STYLE, SCLASS_ACCESS_DENIED, SCLASS_NO_VALUE
-
Fields inherited from class com.hybris.cockpitng.editor.decorated.AbstractEditorRendererWrapper
DECORATED_EDITORS_EMBEDDED_CONTENT, DECORATED_EDITORS_PATTERN
-
Fields inherited from class com.hybris.cockpitng.editors.impl.AbstractCockpitEditorRenderer
HEADER_LABEL_TOOLTIP, ON_ADD_EVENT, ON_DELETE_EVENT, YW_EDITOR_AREA_LABEL_CONTAINER
-
Fields inherited from interface com.hybris.cockpitng.editors.CockpitEditorRenderer
INITIAL_EDIT_STRING
-
-
Constructor Summary
Constructors Constructor Description FixedInstantEditorLabelsRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected InstantEditorLabelProvidercreateLabelProvider(EditorContext<java.lang.Object> context)protected ExpressionResolverFactorygetExpressionResolverFactory()protected java.lang.StringgetFallbackLabel(EditorContext<java.lang.Object> editorContext)protected java.lang.StringgetLabel(EditorContext<java.lang.Object> editorContext, java.lang.String labelName)protected java.lang.StringgetLabel(WidgetInstanceManager wim, java.lang.String label)protected java.util.Optional<java.lang.String>getMatchingLabelName(EditorContext<java.lang.Object> editorContext, java.lang.Object value)voidrender(org.zkoss.zk.ui.Component parent, EditorContext<java.lang.Object> context, EditorListener<java.lang.Object> listener)Creates a new editor component and attaches it to the specifiedComponentcomponent.voidsetExpressionResolverFactory(ExpressionResolverFactory expressionResolverFactory)-
Methods inherited from class com.hybris.cockpitng.editor.instant.AbstractInstantEditorLabelRenderer
createValueLabel, getLabelService, getPermissionFacade, setLabelService, setPermissionFacade, updateValueLabel
-
Methods inherited from class com.hybris.cockpitng.editor.decorated.AbstractEditorRendererWrapper
createEditor, extractDecoratedEditorContent, extractDefinitions, getEditorTypeFromContext, prepareNestedContext
-
Methods inherited from class com.hybris.cockpitng.editors.impl.AbstractCockpitEditorRenderer
extractEmbeddedEditor, extractEmbeddedType, findAncestorEditor, findEmbeddedEditors, getInitialEditString, getL10nDecorator
-
-
-
-
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:CockpitEditorRendererCreates a new editor component and attaches it to the specifiedComponentcomponent.- Parameters:
parent- parent component the editor should be attached tocontext- the context for the editor creationlistener- the listener to notify the rest of the world about value changes and other events
-
createLabelProvider
protected InstantEditorLabelProvider createLabelProvider(EditorContext<java.lang.Object> context)
-
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)
-
getLabel
protected java.lang.String getLabel(WidgetInstanceManager wim, java.lang.String label)
-
getFallbackLabel
protected java.lang.String getFallbackLabel(EditorContext<java.lang.Object> editorContext)
-
getExpressionResolverFactory
protected ExpressionResolverFactory getExpressionResolverFactory()
-
setExpressionResolverFactory
public void setExpressionResolverFactory(ExpressionResolverFactory expressionResolverFactory)
-
-