Class AbstractUIEditor
- java.lang.Object
-
- de.hybris.platform.cockpit.model.editor.impl.AbstractUIEditor
-
- All Implemented Interfaces:
UIEditor
- Direct Known Subclasses:
AbstractConditionUIEditor
,AbstractFeatureUIEditor
,AbstractReferenceUIEditor
,AbstractTextBasedUIEditor
,CheckboxBooleanUIEditor
,DefaultBooleanUIEditor
,DefaultDummyUIEditor
,DefaultEnumUIEditor
,DefaultImageUIEditor
,DefaultSelectUIEditor
,DropdownBooleanUIEditor
,FileUploaderUIEditor
,GenericCollectionUIEditor
,LocaleUIEditor
,ObjectTranslatorUIEditor
,WysiwygUIEditor
public abstract class AbstractUIEditor extends java.lang.Object implements UIEditor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
AbstractUIEditor.CancelButtonContainer
protected static interface
AbstractUIEditor.CancelListener
protected class
AbstractUIEditor.ErrorDiv
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ATTRIBUTE_QUALIFIER_PARAM
static java.lang.String
CANCEL_BTN
static java.lang.String
EVENT_SOURCE
Deprecated.since 6.3protected boolean
inEditMode
protected java.lang.Object
initialEditValue
protected java.lang.String
initialInputString
static java.lang.String
PROPERTY_DESCRIPTOR_PARAM
static java.lang.String
SEARCH_MODE_PARAM
-
Fields inherited from interface de.hybris.platform.cockpit.model.editor.UIEditor
INITIAL_EDIT_STRING
-
-
Constructor Summary
Constructors Constructor Description AbstractUIEditor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static CreateContext
applyReferenceRelatedAttributes(ReferenceUIEditor referenceEditor, PropertyDescriptor propertyDescriptor, java.util.Map<java.lang.String,? extends java.lang.Object> parameters, TypedObject currentObject, java.lang.Object currentValue, java.lang.String isoCode, UICockpitArea cockpitArea, UISession session)
Deprecated.since 6.3static void
createEditor(TypedObject item, PropertyDescriptor propDescr, org.zkoss.zk.ui.HtmlBasedComponent parent, ObjectValueContainer valueContainer, boolean autoPersist)
Deprecated.since 6.3static void
createEditor(TypedObject item, PropertyDescriptor propDescr, org.zkoss.zk.ui.HtmlBasedComponent parent, ObjectValueContainer valueContainer, boolean autoPersist, java.lang.String editorCode)
Deprecated.since 6.3static void
createEditor(TypedObject item, PropertyDescriptor propDescr, org.zkoss.zk.ui.HtmlBasedComponent parent, ObjectValueContainer valueContainer, boolean autoPersist, java.lang.String editorCode, java.util.Map<java.lang.String,? extends java.lang.Object> params)
Deprecated.since 6.3static void
createEditor(TypedObject item, PropertyDescriptor propDescr, org.zkoss.zk.ui.HtmlBasedComponent parent, ObjectValueContainer valueContainer, boolean autoPersist, java.lang.String editorCode, java.util.Map<java.lang.String,? extends java.lang.Object> params, boolean focus)
Deprecated.since 6.3static <T> java.util.List<? extends T>
filterValues(PropertyDescriptor propDescr, java.util.List<? extends T> values)
Deprecated.since 6.3protected void
fireValueChanged(EditorListener listener)
static SearchType
getRootSearchType(PropertyDescriptor propDescr, UISession session)
Deprecated.since 6.3static UIEditor
getUIEditor(PropertyDescriptor propDescr, java.lang.String editorCode)
Deprecated.since 6.3java.lang.Object
getValue()
Returns the value held by this editor.boolean
isEditable()
Returns whether this editor is editable or notstatic boolean
isEditable(PropertyDescriptor propDescr, boolean creationMode)
Deprecated.since 6.3, useUIAccessRightService
's isWritable methods instead.boolean
isOptional()
protected boolean
isSearchMode(java.util.Map<java.lang.String,? extends java.lang.Object> parameters)
protected void
parseInitialInputString(java.util.Map<java.lang.String,? extends java.lang.Object> parameters)
static java.util.Set<ObjectType>
parseTemplateCodes(java.lang.String input, TypeService typeService)
Deprecated.static void
persistValues(TypedObject item, ObjectValueContainer valueContainer)
Deprecated.since 6.3static void
persistValues(TypedObject item, ObjectValueContainer valueContainer, java.util.Map<java.lang.String,? extends java.lang.Object> params)
Deprecated.since 6.3void
setEditable(boolean editable)
Defines whether this editor shall be editable.void
setFocus(org.zkoss.zk.ui.HtmlBasedComponent rootEditorComponent, boolean selectAll)
Sets the focus on the given input component which can be the rootEditorComponent or a child of itvoid
setOptional(boolean optional)
void
setValue(java.lang.Object value)
Sets the value of this editor tovalue
.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.hybris.platform.cockpit.model.editor.UIEditor
createViewComponent, getEditorType, isInline
-
-
-
-
Field Detail
-
EVENT_SOURCE
@Deprecated public static final java.lang.String EVENT_SOURCE
Deprecated.since 6.3- See Also:
- Constant Field Values
-
CANCEL_BTN
public static final java.lang.String CANCEL_BTN
- See Also:
- Constant Field Values
-
ATTRIBUTE_QUALIFIER_PARAM
public static final java.lang.String ATTRIBUTE_QUALIFIER_PARAM
- See Also:
- Constant Field Values
-
PROPERTY_DESCRIPTOR_PARAM
public static final java.lang.String PROPERTY_DESCRIPTOR_PARAM
- See Also:
- Constant Field Values
-
SEARCH_MODE_PARAM
public static final java.lang.String SEARCH_MODE_PARAM
- See Also:
- Constant Field Values
-
initialEditValue
protected java.lang.Object initialEditValue
-
inEditMode
protected boolean inEditMode
-
initialInputString
protected java.lang.String initialInputString
-
-
Method Detail
-
createEditor
@Deprecated public static void createEditor(TypedObject item, PropertyDescriptor propDescr, org.zkoss.zk.ui.HtmlBasedComponent parent, ObjectValueContainer valueContainer, boolean autoPersist) throws java.lang.IllegalArgumentException
Deprecated.since 6.3- Throws:
java.lang.IllegalArgumentException
-
createEditor
@Deprecated public static void createEditor(TypedObject item, PropertyDescriptor propDescr, org.zkoss.zk.ui.HtmlBasedComponent parent, ObjectValueContainer valueContainer, boolean autoPersist, java.lang.String editorCode) throws java.lang.IllegalArgumentException
Deprecated.since 6.3- Throws:
java.lang.IllegalArgumentException
-
createEditor
@Deprecated public static void createEditor(TypedObject item, PropertyDescriptor propDescr, org.zkoss.zk.ui.HtmlBasedComponent parent, ObjectValueContainer valueContainer, boolean autoPersist, java.lang.String editorCode, java.util.Map<java.lang.String,? extends java.lang.Object> params) throws java.lang.IllegalArgumentException
Deprecated.since 6.3- Throws:
java.lang.IllegalArgumentException
-
createEditor
@Deprecated public static void createEditor(TypedObject item, PropertyDescriptor propDescr, org.zkoss.zk.ui.HtmlBasedComponent parent, ObjectValueContainer valueContainer, boolean autoPersist, java.lang.String editorCode, java.util.Map<java.lang.String,? extends java.lang.Object> params, boolean focus) throws java.lang.IllegalArgumentException
Deprecated.since 6.3- Throws:
java.lang.IllegalArgumentException
-
applyReferenceRelatedAttributes
@Deprecated public static CreateContext applyReferenceRelatedAttributes(ReferenceUIEditor referenceEditor, PropertyDescriptor propertyDescriptor, java.util.Map<java.lang.String,? extends java.lang.Object> parameters, TypedObject currentObject, java.lang.Object currentValue, java.lang.String isoCode, UICockpitArea cockpitArea, UISession session)
Deprecated.since 6.3
-
filterValues
@Deprecated public static <T> java.util.List<? extends T> filterValues(PropertyDescriptor propDescr, java.util.List<? extends T> values)
Deprecated.since 6.3
-
getRootSearchType
@Deprecated public static SearchType getRootSearchType(PropertyDescriptor propDescr, UISession session)
Deprecated.since 6.3
-
getUIEditor
@Deprecated public static UIEditor getUIEditor(PropertyDescriptor propDescr, java.lang.String editorCode) throws java.lang.IllegalArgumentException
Deprecated.since 6.3Convenience method for creating and retrieving aUIEditor
. Note: If no editor variant is found with the codeeditorCode
, the default editor for the specified property is returned. This method was moved toEditorHelper.getUIEditor(PropertyDescriptor, String)
- Parameters:
propDescr
- the property descriptor for which a corresponding editor is to be retrievededitorCode
- the editor variant to be used- Returns:
- a new
UIEditor
instance for the specified property and - if available - for the specified editor variant - Throws:
java.lang.IllegalArgumentException
- if the property descriptor is invalid
-
isEditable
@Deprecated public static boolean isEditable(PropertyDescriptor propDescr, boolean creationMode)
Deprecated.since 6.3, useUIAccessRightService
's isWritable methods instead.Returns whether the specified property is editable or not.- Parameters:
propDescr
- the property descriptor- Returns:
true
if the property is editable,false
otherwise
-
parseTemplateCodes
@Deprecated public static final java.util.Set<ObjectType> parseTemplateCodes(java.lang.String input, TypeService typeService)
Deprecated.
-
persistValues
@Deprecated public static void persistValues(TypedObject item, ObjectValueContainer valueContainer) throws ValueHandlerException
Deprecated.since 6.3- Throws:
ValueHandlerException
-
persistValues
@Deprecated public static void persistValues(TypedObject item, ObjectValueContainer valueContainer, java.util.Map<java.lang.String,? extends java.lang.Object> params) throws ValueHandlerException
Deprecated.since 6.3Saves current values that are gathered withinvalueContainer
object- Parameters:
item
- current typed object itemvalueContainer
- current value containerparams
- creation parameters- Throws:
ValueHandlerException
-
fireValueChanged
protected void fireValueChanged(EditorListener listener)
-
getValue
public java.lang.Object getValue()
Description copied from interface:UIEditor
Returns the value held by this editor.
-
isEditable
public boolean isEditable()
Description copied from interface:UIEditor
Returns whether this editor is editable or not- Specified by:
isEditable
in interfaceUIEditor
- Returns:
- true, if editable
-
isOptional
public boolean isOptional()
- Specified by:
isOptional
in interfaceUIEditor
-
parseInitialInputString
protected void parseInitialInputString(java.util.Map<java.lang.String,? extends java.lang.Object> parameters)
-
setEditable
public void setEditable(boolean editable)
Description copied from interface:UIEditor
Defines whether this editor shall be editable. Has to be set before creating the view component.- Specified by:
setEditable
in interfaceUIEditor
- Parameters:
editable
- whether this editor is editable or not
-
setFocus
public void setFocus(org.zkoss.zk.ui.HtmlBasedComponent rootEditorComponent, boolean selectAll)
Description copied from interface:UIEditor
Sets the focus on the given input component which can be the rootEditorComponent or a child of it
-
setOptional
public void setOptional(boolean optional)
- Specified by:
setOptional
in interfaceUIEditor
-
setValue
public void setValue(java.lang.Object value)
Description copied from interface:UIEditor
Sets the value of this editor tovalue
. Note: Does not have anything to do with value persistence, it is only for setting the value to be displayed. However, depending on the view component implementation and the specifiedEditorListener
the underlying view component might generate an event which causes theEditorListener.valueChanged(Object)
method to be called.
-
isSearchMode
protected boolean isSearchMode(java.util.Map<java.lang.String,? extends java.lang.Object> parameters)
-
-