Class LocalizedEditor
- java.lang.Object
-
- com.hybris.cockpitng.editors.impl.AbstractCockpitEditorRenderer<java.lang.Object>
-
- com.hybris.cockpitng.editor.localized.AbstractLocalizedEditor
-
- com.hybris.cockpitng.editor.localized.LocalizedEditor
-
- All Implemented Interfaces:
CockpitEditorRenderer<java.lang.Object>,WidgetInstanceManagerAware
public class LocalizedEditor extends AbstractLocalizedEditor
Editor supports localized vales providing dedicated field for each localization.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.zkoss.zul.LabeldefaultLocaleLabelprotected org.zkoss.zul.DivdynamicContentstatic java.lang.StringEDITOR_PARAM_ATTRIBUTE_DESCRIPTIONprotected booleanexpandedprotected java.lang.StringexpandedPropertyKeyprotected org.zkoss.zul.DivfixedContentstatic java.lang.StringIDprotected org.zkoss.zul.DivwrapperContainerstatic java.lang.StringY_ICONstatic java.lang.StringYW_DYNAMIC_CONTENTstatic java.lang.StringYW_LOCEDITOR_DISABLED-
Fields inherited from class com.hybris.cockpitng.editor.localized.AbstractLocalizedEditor
LOCALIZED_EDITOR_LOCALE, SCLASS_CELL_LABEL, SCLASS_MANDATORY_ATTRIBUTE_LABEL, YW_LOCEDITOR_CAPTION
-
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 LocalizedEditor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddOnClickActionToLocalizationButton(org.zkoss.zul.Span localizationButton, java.util.Map<java.util.Locale,Editor> editors, java.util.Map<java.util.Locale,java.lang.Object> value, EditorContext editorContext, EditorListener editorListener)protected voidaddValidationChangeListener(org.zkoss.zk.ui.Component parent, EditorContext editorContext)protected voidapplyRowsValidation(EditorContext editorContext)protected voidapplyValidationCss(org.zkoss.zul.Div wrapperCaption)protected EditorListener<java.lang.Object>decorateEditorListener(java.util.Locale locale, java.util.Map<java.util.Locale,java.lang.Object> values, EditorListener editorListener)protected voidexpand(java.util.Map<java.util.Locale,Editor> editors, java.util.Map<java.util.Locale,java.lang.Object> value, EditorContext editorContext, EditorListener editorListener)protected voidexpandImmediately(java.util.Map<java.util.Locale,Editor> editors, java.util.Map<java.util.Locale,java.lang.Object> value, EditorContext editorContext, EditorListener editorListener)AttributeDescriptionIconRenderergetAttributeDescriptionIconRenderer()protected java.lang.StringgetEditorParamAttributeDescription(EditorContext editorContext)protected java.util.Map<java.util.Locale,java.lang.Object>getNullSafeLocales(java.lang.Object initialValue)protected java.util.Set<java.util.Locale>getReadableLocales(EditorContext editorContext)ValidationRenderergetValidationRenderer()protected java.util.Set<java.util.Locale>getWriteableLocales(EditorContext editorContext)protected java.util.Map<java.util.Locale,java.lang.Object>initializeLocales(EditorContext editorContext)protected booleanisExpanded()voidrender(org.zkoss.zk.ui.Component parent, EditorContext editorContext, EditorListener editorListener)Creates a new editor component and attaches it to the specifiedComponentcomponent.protected voidrenderLabels(org.zkoss.zul.Div content, org.zkoss.zul.Div row, org.zkoss.zul.Label label, java.util.Locale locale)protected EditorrenderLocale(org.zkoss.zul.Div content, java.util.Locale locale, java.util.Map<java.util.Locale,java.lang.Object> value, EditorContext editorContext, EditorListener editorListener)voidsetAttributeDescriptionIconRenderer(AttributeDescriptionIconRenderer attributeDescriptionIconRenderer)voidsetValidationRenderer(ValidationRenderer validationRenderer)-
Methods inherited from class com.hybris.cockpitng.editor.localized.AbstractLocalizedEditor
createEditorLabel, getActiveLocales, getCockpitLocaleService, getCockpitUserService, getComponentDefinitionService, getEditorRegistry, getLabelService, getWidgetInstanceManager, prepareSubEditor, prepareSubEditor, setCockpitLocaleService, setCockpitUserService, setComponentDefinitionService, setEditorRegistry, setLabelService, setWidgetInstanceManager
-
Methods inherited from class com.hybris.cockpitng.editors.impl.AbstractCockpitEditorRenderer
extractEmbeddedEditor, extractEmbeddedType, findAncestorEditor, findEmbeddedEditors, getInitialEditString, getL10nDecorator
-
-
-
-
Field Detail
-
ID
public static final java.lang.String ID
- See Also:
- Constant Field Values
-
EDITOR_PARAM_ATTRIBUTE_DESCRIPTION
public static final java.lang.String EDITOR_PARAM_ATTRIBUTE_DESCRIPTION
- See Also:
- Constant Field Values
-
YW_DYNAMIC_CONTENT
public static final java.lang.String YW_DYNAMIC_CONTENT
- See Also:
- Constant Field Values
-
Y_ICON
public static final java.lang.String Y_ICON
- See Also:
- Constant Field Values
-
YW_LOCEDITOR_DISABLED
public static final java.lang.String YW_LOCEDITOR_DISABLED
- See Also:
- Constant Field Values
-
expanded
protected boolean expanded
-
expandedPropertyKey
protected java.lang.String expandedPropertyKey
-
dynamicContent
protected org.zkoss.zul.Div dynamicContent
-
wrapperContainer
protected org.zkoss.zul.Div wrapperContainer
-
defaultLocaleLabel
protected org.zkoss.zul.Label defaultLocaleLabel
-
fixedContent
protected org.zkoss.zul.Div fixedContent
-
-
Method Detail
-
render
public void render(org.zkoss.zk.ui.Component parent, EditorContext editorContext, EditorListener editorListener)Description copied from interface:CockpitEditorRendererCreates a new editor component and attaches it to the specifiedComponentcomponent.- Parameters:
parent- parent component the editor should be attached toeditorContext- the context for the editor creationeditorListener- the listener to notify the rest of the world about value changes and other events
-
renderLocale
protected Editor renderLocale(org.zkoss.zul.Div content, java.util.Locale locale, java.util.Map<java.util.Locale,java.lang.Object> value, EditorContext editorContext, EditorListener editorListener)
-
initializeLocales
protected java.util.Map<java.util.Locale,java.lang.Object> initializeLocales(EditorContext editorContext)
-
getNullSafeLocales
protected java.util.Map<java.util.Locale,java.lang.Object> getNullSafeLocales(java.lang.Object initialValue)
-
addOnClickActionToLocalizationButton
protected void addOnClickActionToLocalizationButton(org.zkoss.zul.Span localizationButton, java.util.Map<java.util.Locale,Editor> editors, java.util.Map<java.util.Locale,java.lang.Object> value, EditorContext editorContext, EditorListener editorListener)
-
addValidationChangeListener
protected void addValidationChangeListener(org.zkoss.zk.ui.Component parent, EditorContext editorContext)
-
expand
protected void expand(java.util.Map<java.util.Locale,Editor> editors, java.util.Map<java.util.Locale,java.lang.Object> value, EditorContext editorContext, EditorListener editorListener)
-
expandImmediately
protected void expandImmediately(java.util.Map<java.util.Locale,Editor> editors, java.util.Map<java.util.Locale,java.lang.Object> value, EditorContext editorContext, EditorListener editorListener)
-
getReadableLocales
protected java.util.Set<java.util.Locale> getReadableLocales(EditorContext editorContext)
-
getWriteableLocales
protected java.util.Set<java.util.Locale> getWriteableLocales(EditorContext editorContext)
-
applyRowsValidation
protected void applyRowsValidation(EditorContext editorContext)
-
applyValidationCss
protected void applyValidationCss(org.zkoss.zul.Div wrapperCaption)
-
decorateEditorListener
protected EditorListener<java.lang.Object> decorateEditorListener(java.util.Locale locale, java.util.Map<java.util.Locale,java.lang.Object> values, EditorListener editorListener)
-
renderLabels
protected void renderLabels(org.zkoss.zul.Div content, org.zkoss.zul.Div row, org.zkoss.zul.Label label, java.util.Locale locale)
-
getEditorParamAttributeDescription
protected java.lang.String getEditorParamAttributeDescription(EditorContext editorContext)
-
getValidationRenderer
public ValidationRenderer getValidationRenderer()
-
setValidationRenderer
public void setValidationRenderer(ValidationRenderer validationRenderer)
-
getAttributeDescriptionIconRenderer
public AttributeDescriptionIconRenderer getAttributeDescriptionIconRenderer()
-
setAttributeDescriptionIconRenderer
public void setAttributeDescriptionIconRenderer(AttributeDescriptionIconRenderer attributeDescriptionIconRenderer)
-
isExpanded
protected boolean isExpanded()
-
-