Class EditorHelper
- java.lang.Object
-
- de.hybris.platform.cockpit.model.editor.EditorHelper
-
public class EditorHelper extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
EditorHelper.LanguageAwareEditorListener
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ALLOWED_VALUES_LIST
static java.lang.String
EVENT_SOURCE
protected static java.lang.String
PARAM_DISABLE_DRAG_AND_DROP
-
Constructor Summary
Constructors Constructor Description EditorHelper()
-
Method Summary
All Methods Static 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)
protected static boolean
checkLanguageVisibility(TypedObject item, java.lang.String languageIso)
static void
createEditor(TypedObject item, PropertyDescriptor propDescr, org.zkoss.zk.ui.HtmlBasedComponent parent, ObjectValueContainer valueContainer, boolean autoPersist)
Convenience method for creating and rendering aUIEditor
.static void
createEditor(TypedObject item, PropertyDescriptor propDescr, org.zkoss.zk.ui.HtmlBasedComponent parent, ObjectValueContainer valueContainer, boolean autoPersist, EditorListener editorListener, java.lang.String editorCode)
Convenience method for creating and rendering aUIEditor
variant specified byeditorCode
.static void
createEditor(TypedObject item, PropertyDescriptor propDescr, org.zkoss.zk.ui.HtmlBasedComponent parent, ObjectValueContainer valueContainer, boolean autoPersist, java.lang.String editorCode)
Convenience method for creating and rendering aUIEditor
variant specified byeditorCode
.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)
Convenience method for creating and rendering aUIEditor
variant specified byeditorCode
.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)
Convenience method for creating and rendering aUIEditor
variant specified byeditorCode
.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, EditorListener editorListener)
Convenience method for creating and rendering aUIEditor
variant specified byeditorCode
.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, EditorListener editorListener, boolean focus)
Convenience method for creating and rendering aUIEditor
variant specified byeditorCode
.static void
createEditor(TypedObject item, PropertyDescriptor propDescr, org.zkoss.zk.ui.HtmlBasedComponent parent, ObjectValueContainer valueContainer, EditorListener editorListener, boolean autoPersist)
Convenience method for creating and rendering aUIEditor
.static <T> java.util.List<? extends T>
filterValues(PropertyDescriptor propDescr, java.util.List<? extends T> values)
Deprecated.since 6.3static java.util.List<java.lang.Object>
getAvailableValues(java.util.Map<java.lang.String,? extends java.lang.Object> params, PropertyDescriptor propertyDescriptor)
Gets available values for a ListUIEditor using configuredAvailableValuesProvider
spring bean.static TypedObject
getCatalogVersionIfPresent(TypedObject item)
static SearchType
getRootSearchType(PropertyDescriptor propDescr, UISession session)
protected static UIAccessRightService
getUIAccessRightService()
static UIEditor
getUIEditor(PropertyDescriptor propDescr, java.lang.String editorCode)
Convenience method for creating and retrieving aUIEditor
.static void
initializeSections(EditorConfiguration cfg, ObjectType type, TypedObject object, TypeService typeService)
static boolean
isDragAndDropDisabled(java.util.Map<java.lang.String,? extends java.lang.Object> parameters)
Check whether "Drag & Drop" action for item's qualifier paremeter is disabled.static boolean
isEditable(PropertyDescriptor propDescr, boolean creationMode)
Deprecated.since 6.3, useUIAccessRightService
's isWritable methods instead.static java.util.Set<ObjectType>
parseTemplateCodes(java.lang.String input, TypeService typeService)
static void
persistValues(TypedObject item, ObjectValueContainer valueContainer)
static void
persistValues(TypedObject item, ObjectValueContainer valueContainer, java.util.Map<java.lang.String,? extends java.lang.Object> params)
static ObjectTemplate
processVariantTypeCheck(ObjectTemplate type, TypedObject object, PropertyDescriptor propertyDescriptor, TypeService typeService)
static java.util.List<java.lang.String>
removeHiddenLanguages(TypedObject item, java.util.Collection<java.lang.String> languages)
static void
renderLocalizedEditor(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)
static void
renderLocalizedEditor(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, EditorListener editorListener)
static void
renderSingleEditor(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, java.lang.String isoCode, boolean focus)
static void
renderSingleEditor(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, java.lang.String isoCode, boolean focus, EditorListener editorListener)
static void
setAvailableValuesInListEditor(ListUIEditor editor, PropertyDescriptor propertyDescriptor, java.util.Map<java.lang.String,? extends java.lang.Object> params)
Helper method to set available values inListUIEditor
editor.static void
tryOpenContextAreaEditor(UICockpitPerspective perspective, ObjectTemplate type, java.util.Collection value, TypedObject currentObject, PropertyDescriptor propertyDescriptor, java.util.Map<java.lang.String,? extends java.lang.Object> parameters)
-
-
-
Field Detail
-
EVENT_SOURCE
public static final java.lang.String EVENT_SOURCE
- See Also:
- Constant Field Values
-
ALLOWED_VALUES_LIST
public static final java.lang.String ALLOWED_VALUES_LIST
- See Also:
- Constant Field Values
-
PARAM_DISABLE_DRAG_AND_DROP
protected static final java.lang.String PARAM_DISABLE_DRAG_AND_DROP
- See Also:
- Constant Field Values
-
-
Method Detail
-
applyReferenceRelatedAttributes
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)
-
createEditor
public static void createEditor(TypedObject item, PropertyDescriptor propDescr, org.zkoss.zk.ui.HtmlBasedComponent parent, ObjectValueContainer valueContainer, boolean autoPersist) throws java.lang.IllegalArgumentException
Convenience method for creating and rendering aUIEditor
. Handles editor events and loads/stores data from/to the specifiedObjectValueContainer
valueContainer
. IfautoPersist
istrue
values are stored in the value container and instantly persisted. Creates the default editor for the property type specified. Internally callscreateEditor(propDescr, parent, valueContainer, null)
.- Parameters:
item
- the item instance for which an editor is to be createdpropDescr
- the property descriptor for which a corresponding editor is to be createdparent
- the parent component to which the editor is to be addedvalueContainer
- theObjectValueContainer
used for loading/storing valuesautoPersist
- whether values should be automatically persisted or not- Throws:
java.lang.IllegalArgumentException
- if the property descriptor, parent component or value container is invalid- See Also:
createEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean, String)
,createEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean, String, Map)
,getUIEditor(PropertyDescriptor, String)
-
createEditor
public static void createEditor(TypedObject item, PropertyDescriptor propDescr, org.zkoss.zk.ui.HtmlBasedComponent parent, ObjectValueContainer valueContainer, boolean autoPersist, EditorListener editorListener, java.lang.String editorCode) throws java.lang.IllegalArgumentException
Convenience method for creating and rendering aUIEditor
variant specified byeditorCode
. Handles editor events and loads/stores data from/to the specifiedObjectValueContainer
valueContainer
. IfautoPersist
istrue
values are stored in the value container and instantly persisted. In order to create the default editor for the specified property usecreateEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean)
instead.- Parameters:
item
- the item instance for which an editor is to be createdpropDescr
- the property descriptor for which a corresponding editor is to be createdparent
- the parent component to which the editor is to be addedvalueContainer
- theObjectValueContainer
used for loading/storing valuesautoPersist
- whether values should be automatically persisted or noteditorListener
- current editor listener instanceEditorListener
editorCode
- the editor variant to be created ornull
for the default one- Throws:
java.lang.IllegalArgumentException
- if the property descriptor, parent component or value container is invalid- See Also:
createEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, EditorListener, boolean)
,createEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean, String, Map, EditorListener)
,createEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean, String, Map, EditorListener, boolean)
,getUIEditor(PropertyDescriptor, String)
-
createEditor
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
Convenience method for creating and rendering aUIEditor
variant specified byeditorCode
. Handles editor events and loads/stores data from/to the specifiedObjectValueContainer
valueContainer
. IfautoPersist
istrue
values are stored in the value container and instantly persisted. In order to create the default editor for the specified property usecreateEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean)
instead.- Parameters:
item
- the item instance for which an editor is to be createdpropDescr
- the property descriptor for which a corresponding editor is to be createdparent
- the parent component to which the editor is to be addedvalueContainer
- theObjectValueContainer
used for loading/storing valuesautoPersist
- whether values should be automatically persisted or noteditorCode
- the editor variant to be created ornull
for the default one- Throws:
java.lang.IllegalArgumentException
- if the property descriptor, parent component or value container is invalid- See Also:
createEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean)
,createEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean, String, Map)
,getUIEditor(PropertyDescriptor, String)
-
createEditor
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
Convenience method for creating and rendering aUIEditor
variant specified byeditorCode
. Handles editor events and loads/stores data from/to the specifiedObjectValueContainer
valueContainer
. IfautoPersist
istrue
values are stored in the value container and instantly persisted. In order to create the default editor for the specified property usecreateEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean)
instead.- Parameters:
item
- the item instance for which an editor is to be createdpropDescr
- the property descriptor for which a corresponding editor is to be createdparent
- the parent component to which the editor is to be addedvalueContainer
- theObjectValueContainer
used for loading/storing valuesautoPersist
- whether values should be automatically persisted or noteditorCode
- the editor variant to be created ornull
for the default oneparams
- creation parameters- Throws:
java.lang.IllegalArgumentException
- if the property descriptor, parent component or value container is invalid- See Also:
createEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean, String)
,createEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean)
,createEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean, String, Map, boolean)
,getUIEditor(PropertyDescriptor, String)
-
createEditor
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
Convenience method for creating and rendering aUIEditor
variant specified byeditorCode
. Handles editor events and loads/stores data from/to the specifiedObjectValueContainer
valueContainer
. IfautoPersist
istrue
values are stored in the value container and instantly persisted. In order to create the default editor for the specified property usecreateEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean)
instead.- Parameters:
item
- the item instance for which an editor is to be createdpropDescr
- the property descriptor for which a corresponding editor is to be createdparent
- the parent component to which the editor is to be addedvalueContainer
- theObjectValueContainer
used for loading/storing valuesautoPersist
- whether values should be automatically persisted or noteditorCode
- the editor variant to be created ornull
for the default oneparams
- creation parametersfocus
- whether the created editor should be given initial focus or not- Throws:
java.lang.IllegalArgumentException
- if the property descriptor, parent component or value container is invalid- See Also:
createEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean, String)
,createEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean)
,getUIEditor(PropertyDescriptor, String)
-
createEditor
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, EditorListener editorListener) throws java.lang.IllegalArgumentException
Convenience method for creating and rendering aUIEditor
variant specified byeditorCode
. Handles editor events and loads/stores data from/to the specifiedObjectValueContainer
valueContainer
. IfautoPersist
istrue
values are stored in the value container and instantly persisted. In order to create the default editor for the specified property usecreateEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean)
instead.- Parameters:
item
- the item instance for which an editor is to be createdpropDescr
- the property descriptor for which a corresponding editor is to be createdparent
- the parent component to which the editor is to be addedvalueContainer
- theObjectValueContainer
used for loading/storing valuesautoPersist
- whether values should be automatically persisted or noteditorCode
- the editor variant to be created ornull
for the default oneparams
- creation parameterseditorListener
- current editor listener instanceEditorListener
- Throws:
java.lang.IllegalArgumentException
- if the property descriptor, parent component or value container is invalid- See Also:
createEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, EditorListener, boolean)
,createEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean, EditorListener, String)
,createEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean, String, Map, EditorListener, boolean)
,getUIEditor(PropertyDescriptor, String)
-
createEditor
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, EditorListener editorListener, boolean focus) throws java.lang.IllegalArgumentException
Convenience method for creating and rendering aUIEditor
variant specified byeditorCode
. Handles editor events and loads/stores data from/to the specifiedObjectValueContainer
valueContainer
. IfautoPersist
istrue
values are stored in the value container and instantly persisted. In order to create the default editor for the specified property usecreateEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean)
instead.- Parameters:
item
- the item instance for which an editor is to be createdpropDescr
- the property descriptor for which a corresponding editor is to be createdparent
- the parent component to which the editor is to be addedvalueContainer
- theObjectValueContainer
used for loading/storing valuesautoPersist
- whether values should be automatically persisted or noteditorCode
- the editor variant to be created ornull
for the default oneparams
- creation parameterseditorListener
- current editor listener instanceEditorListener
focus
- whether the created editor should be given initial focus or not- Throws:
java.lang.IllegalArgumentException
- if the property descriptor, parent component or value container is invalid- See Also:
createEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, EditorListener, boolean)
,createEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean, EditorListener, String)
,createEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean, String, Map, EditorListener)
,getUIEditor(PropertyDescriptor, String)
-
createEditor
public static void createEditor(TypedObject item, PropertyDescriptor propDescr, org.zkoss.zk.ui.HtmlBasedComponent parent, ObjectValueContainer valueContainer, EditorListener editorListener, boolean autoPersist) throws java.lang.IllegalArgumentException
Convenience method for creating and rendering aUIEditor
. Handles editor events and loads/stores data from/to the specifiedObjectValueContainer
valueContainer
. IfautoPersist
istrue
values are stored in the value container and instantly persisted. Creates the default editor for the property type specified. Internally callscreateEditor(propDescr, parent, valueContainer, null)
.- Parameters:
item
- the item instance for which an editor is to be createdpropDescr
- the property descriptor for which a corresponding editor is to be createdparent
- the parent component to which the editor is to be addedvalueContainer
- theObjectValueContainer
used for loading/storing valueseditorListener
- current editor listener instanceEditorListener
autoPersist
- whether values should be automatically persisted or not- Throws:
java.lang.IllegalArgumentException
- if the property descriptor, parent component or value container is invalid- See Also:
createEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean, EditorListener, String)
,createEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean, String, Map, EditorListener)
,createEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean, String, Map, EditorListener, boolean)
,getUIEditor(PropertyDescriptor, String)
-
filterValues
@Deprecated public static <T> java.util.List<? extends T> filterValues(PropertyDescriptor propDescr, java.util.List<? extends T> values)
Deprecated.since 6.3
-
getRootSearchType
public static SearchType getRootSearchType(PropertyDescriptor propDescr, UISession session)
-
getUIAccessRightService
protected static UIAccessRightService getUIAccessRightService()
-
getUIEditor
public static UIEditor getUIEditor(PropertyDescriptor propDescr, java.lang.String editorCode) throws java.lang.IllegalArgumentException
Convenience 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.- 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- See Also:
createEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean)
,createEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean, String)
,createEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean, String, Map)
,createEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean, String, Map, boolean)
,createEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, EditorListener, boolean)
,createEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean, EditorListener, String)
,createEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean, String, Map, EditorListener)
,createEditor(TypedObject, PropertyDescriptor, HtmlBasedComponent, ObjectValueContainer, boolean, String, Map, EditorListener, boolean)
-
initializeSections
public static void initializeSections(EditorConfiguration cfg, ObjectType type, TypedObject object, TypeService typeService)
-
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
-
persistValues
public static void persistValues(TypedObject item, ObjectValueContainer valueContainer) throws ValueHandlerException
- Throws:
ValueHandlerException
-
persistValues
public static void persistValues(TypedObject item, ObjectValueContainer valueContainer, java.util.Map<java.lang.String,? extends java.lang.Object> params) throws ValueHandlerException
- Throws:
ValueHandlerException
-
processVariantTypeCheck
public static ObjectTemplate processVariantTypeCheck(ObjectTemplate type, TypedObject object, PropertyDescriptor propertyDescriptor, TypeService typeService)
-
tryOpenContextAreaEditor
public static void tryOpenContextAreaEditor(UICockpitPerspective perspective, ObjectTemplate type, java.util.Collection value, TypedObject currentObject, PropertyDescriptor propertyDescriptor, java.util.Map<java.lang.String,? extends java.lang.Object> parameters)
-
parseTemplateCodes
public static final java.util.Set<ObjectType> parseTemplateCodes(java.lang.String input, TypeService typeService)
-
renderLocalizedEditor
public static void renderLocalizedEditor(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)
-
checkLanguageVisibility
protected static boolean checkLanguageVisibility(TypedObject item, java.lang.String languageIso)
-
renderLocalizedEditor
public static void renderLocalizedEditor(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, EditorListener editorListener)
-
renderSingleEditor
public static void renderSingleEditor(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, java.lang.String isoCode, boolean focus)
-
renderSingleEditor
public static void renderSingleEditor(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, java.lang.String isoCode, boolean focus, EditorListener editorListener)
-
getAvailableValues
public static java.util.List<java.lang.Object> getAvailableValues(java.util.Map<java.lang.String,? extends java.lang.Object> params, PropertyDescriptor propertyDescriptor)
Gets available values for a ListUIEditor using configuredAvailableValuesProvider
spring bean. Spring bean's name is passed as a value of the ALLOWED_VALUES_LIST configuration parameter -ALLOWED_VALUES_LIST
-
setAvailableValuesInListEditor
public static void setAvailableValuesInListEditor(ListUIEditor editor, PropertyDescriptor propertyDescriptor, java.util.Map<java.lang.String,? extends java.lang.Object> params)
Helper method to set available values inListUIEditor
editor. First it tries to use configuredAvailableValuesProvider
spring bean to get a list of available values. If no bean is configured, it usesTypeService.getAvailableValues(PropertyDescriptor)
method.- Parameters:
editor
- target editor.propertyDescriptor
- The property descriptor of the property to be set with one of the "available values".params
- keeps the set of parameters configured for the editor.
-
getCatalogVersionIfPresent
public static TypedObject getCatalogVersionIfPresent(TypedObject item)
-
removeHiddenLanguages
public static java.util.List<java.lang.String> removeHiddenLanguages(TypedObject item, java.util.Collection<java.lang.String> languages)
-
isDragAndDropDisabled
public static boolean isDragAndDropDisabled(java.util.Map<java.lang.String,? extends java.lang.Object> parameters)
Check whether "Drag & Drop" action for item's qualifier paremeter is disabled.- Parameters:
parameters
- - all item's qualifier parameters- Returns:
-
-