Class WidgetRegistry
java.lang.Object
org.opencms.ade.contenteditor.widgetregistry.client.WidgetRegistry
The widget registry.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRenderer(I_CmsEntityRenderer renderer) Adds a renderer which should be used by the Acacia editor.static WidgetRegistryReturns the widget registry instance.Returns the registered renderers.Returns the registered widget factories.voidregisterExternalWidgets(List<org.opencms.ade.contenteditor.shared.CmsExternalWidgetConfiguration> externalWidgetConfigurations, com.google.gwt.user.client.Command callback) Registers external widgets.voidregisterWidgetFactory(String widgetName, I_CmsWidgetFactory widgetFactory) Registers a widget.protected voidLogs an error.protected voidshowInitCallError(Set<String> initCalls) Logs an error for missing init calls.protected booleantryInitCall(String initCall) Tries to initializes a widget with the given initialization call.
-
Field Details
-
REGISTER_WIDGET_FACTORY_FUNCTION
The register widget function name.- See Also:
-
-
Method Details
-
getInstance
Returns the widget registry instance.- Returns:
- the widget registry instance
-
addRenderer
Adds a renderer which should be used by the Acacia editor.- Parameters:
renderer- the renderer to add
-
getRenderers
Returns the registered renderers.- Returns:
- the renderers
-
getWidgetFactories
Returns the registered widget factories.- Returns:
- the registered widget factories
-
registerExternalWidgets
public void registerExternalWidgets(List<org.opencms.ade.contenteditor.shared.CmsExternalWidgetConfiguration> externalWidgetConfigurations, com.google.gwt.user.client.Command callback) Registers external widgets.- Parameters:
externalWidgetConfigurations- the external widget configurationscallback- the callback to execute when done
-
registerWidgetFactory
Registers a widget.- Parameters:
widgetName- the widget namewidgetFactory- the widget
-
showError
Logs an error.- Parameters:
error- the error to log
-
showInitCallError
Logs an error for missing init calls.- Parameters:
initCalls- the set of missing init calls
-
tryInitCall
Tries to initializes a widget with the given initialization call. Returns false if the init method was not available within the window context yet.- Parameters:
initCall- the initialization function name- Returns:
trueif the initialization function was available and has been executed
-