Class CmsDefaultWidgetService
- java.lang.Object
-
- org.opencms.acacia.client.CmsWidgetService
-
- org.opencms.ade.contenteditor.client.CmsDefaultWidgetService
-
- All Implemented Interfaces:
I_CmsWidgetService
public class CmsDefaultWidgetService extends CmsWidgetService
Default OpenCms widget service implementation.
-
-
Constructor Summary
Constructors Constructor Description CmsDefaultWidgetService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChangedOrderPath(java.lang.String attributePath)
Adds the given path to the list of paths where child attributes have change their order.java.lang.String
getDefaultAttributeValue(java.lang.String attributeName, java.lang.String simpleValuePath)
Returns the default attribute value.java.util.Collection<java.lang.String>
getSkipPaths()
Returns the paths to be skipped during locale synchronization.java.util.Map<java.lang.String,java.lang.String>
getSyncValues()
Returns the locale synchronization values.void
setSkipPaths(java.util.Collection<java.lang.String> skipPaths)
Sets the paths to be skipped during locale synchronization.void
setSyncValues(java.util.Map<java.lang.String,java.lang.String> syncValues)
Sets the locale synchronization values.boolean
shouldRemoveLastValueAfterUnfocus(I_CmsEditWidget widget)
Returns true if the value which this widget is being used for should be disabled if it is unfocused and the last remaining attribute value for a given attribute.-
Methods inherited from class org.opencms.acacia.client.CmsWidgetService
addConfigurations, addRenderer, addRenderer, addWidgetFactory, getAttributeFormWidget, getAttributeHelp, getAttributeInlineWidget, getAttributeLabel, getRendererForAttribute, getRendererForAttribute, getRendererForType, init, isDisplayCompact, isDisplaySingleLine, isVisible, registerComplexWidgetAttribute, setDefaultRenderer, setWidgetFactories
-
-
-
-
Constructor Detail
-
CmsDefaultWidgetService
public CmsDefaultWidgetService()
-
-
Method Detail
-
addChangedOrderPath
public void addChangedOrderPath(java.lang.String attributePath)
Description copied from interface:I_CmsWidgetService
Adds the given path to the list of paths where child attributes have change their order.- Specified by:
addChangedOrderPath
in interfaceI_CmsWidgetService
- Overrides:
addChangedOrderPath
in classCmsWidgetService
- Parameters:
attributePath
- the attribute path- See Also:
CmsWidgetService.addChangedOrderPath(java.lang.String)
-
getDefaultAttributeValue
public java.lang.String getDefaultAttributeValue(java.lang.String attributeName, java.lang.String simpleValuePath)
Description copied from interface:I_CmsWidgetService
Returns the default attribute value.- Specified by:
getDefaultAttributeValue
in interfaceI_CmsWidgetService
- Overrides:
getDefaultAttributeValue
in classCmsWidgetService
- Parameters:
attributeName
- the attribute namesimpleValuePath
- the value path- Returns:
- the default value
- See Also:
CmsWidgetService.getDefaultAttributeValue(java.lang.String, java.lang.String)
-
getSkipPaths
public java.util.Collection<java.lang.String> getSkipPaths()
Returns the paths to be skipped during locale synchronization.- Returns:
- the paths to be skipped during locale synchronization
-
getSyncValues
public java.util.Map<java.lang.String,java.lang.String> getSyncValues()
Returns the locale synchronization values.- Returns:
- the locale synchronization values
-
setSkipPaths
public void setSkipPaths(java.util.Collection<java.lang.String> skipPaths)
Sets the paths to be skipped during locale synchronization.- Parameters:
skipPaths
- the paths to be skipped during locale synchronization to set
-
setSyncValues
public void setSyncValues(java.util.Map<java.lang.String,java.lang.String> syncValues)
Sets the locale synchronization values.- Parameters:
syncValues
- the locale synchronization values to set
-
shouldRemoveLastValueAfterUnfocus
public boolean shouldRemoveLastValueAfterUnfocus(I_CmsEditWidget widget)
Description copied from interface:I_CmsWidgetService
Returns true if the value which this widget is being used for should be disabled if it is unfocused and the last remaining attribute value for a given attribute.The main use case is disabling empty text input fields.
- Specified by:
shouldRemoveLastValueAfterUnfocus
in interfaceI_CmsWidgetService
- Overrides:
shouldRemoveLastValueAfterUnfocus
in classCmsWidgetService
- Parameters:
widget
- the widget to check- Returns:
- true if the value should be disabled
- See Also:
CmsWidgetService.shouldRemoveLastValueAfterUnfocus(org.opencms.acacia.client.widgets.I_CmsEditWidget)
-
-