Package org.opencms.acacia.client
Class CmsNativeComplexWidgetRenderer
java.lang.Object
org.opencms.acacia.client.CmsNativeComplexWidgetRenderer
- All Implemented Interfaces:
I_CmsEntityRenderer
CmsRenderer which delegates the rendering of an entity to native Javascript.
This renderer will interpret its configuration string as a JSON object (which we will call 'config').
To render an entity, it will take the name of a function from config.render and then call the function
with the entity to render, the parent element, a VIE wrapper, and the configuration object as parameters.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDefault constructor.CmsNativeComplexWidgetRenderer
(String configuration) Creates a new configured instance. -
Method Summary
Modifier and TypeMethodDescriptionReturns a copy of this renderer which has been configured with the given configuration string.protected com.google.gwt.core.client.JavaScriptObject
createNativeInstance
(String initCall) Creates the native renderer instance.getName()
Gets the name of the renderer (should be unique for each renderer class).protected com.google.gwt.core.client.JavaScriptObject
Gets the native renderer instance.void
renderAttributeValue
(org.opencms.acacia.shared.CmsEntity parentEntity, CmsAttributeHandler attributeHandler, int attributeIndex, com.google.gwt.user.client.ui.Panel context) Renders a single attribute value.void
renderForm
(org.opencms.acacia.shared.CmsEntity entity, com.google.gwt.user.client.ui.Panel context, I_CmsAttributeHandler parentHandler, int attributeIndex) Renders the given entity into a form.CmsTabbedPanel<com.google.gwt.user.client.ui.FlowPanel>
renderForm
(org.opencms.acacia.shared.CmsEntity entity, List<org.opencms.acacia.shared.CmsTabInfo> tabInfos, com.google.gwt.user.client.ui.Panel context, I_CmsAttributeHandler parentHandler, int attributeIndex) Renders the given entity into a form with tabs.void
renderInline
(org.opencms.acacia.shared.CmsEntity parentEntity, String attributeName, I_CmsInlineFormParent formParent, I_CmsInlineHtmlUpdateHandler updateHandler, I_CmsAttributeHandler parentHandler, int attributeIndex, int minOccurrence, int maxOccurrence) Injects editing widgets into the given DOM context to enable editing of the given entity attribute.void
renderInline
(org.opencms.acacia.shared.CmsEntity entity, I_CmsInlineFormParent formParent, I_CmsInlineHtmlUpdateHandler updateHandler, I_CmsAttributeHandler parentHandler, int attributeIndex) Injects editing widgets into the given DOM context to enable editing of the given entity.protected void
renderNative
(com.google.gwt.core.client.JavaScriptObject nativeRenderer, String renderFunction, com.google.gwt.dom.client.Element element, org.opencms.acacia.shared.CmsEntity entity, com.google.gwt.core.client.JavaScriptObject config) Calls the native render function.
-
Field Details
-
ENTITY_CLASS
The entity CSS class. -
LABEL_CLASS
The attribute label CSS class. -
WIDGET_HOLDER_CLASS
The widget holder CSS class.
-
-
Constructor Details
-
CmsNativeComplexWidgetRenderer
public CmsNativeComplexWidgetRenderer()Default constructor. -
CmsNativeComplexWidgetRenderer
Creates a new configured instance.- Parameters:
configuration
- the configuration string
-
-
Method Details
-
configure
Description copied from interface:I_CmsEntityRenderer
Returns a copy of this renderer which has been configured with the given configuration string.- Specified by:
configure
in interfaceI_CmsEntityRenderer
- Parameters:
configuration
- the configuration string- Returns:
- the configured copy of the renderer
- See Also:
-
getName
Description copied from interface:I_CmsEntityRenderer
Gets the name of the renderer (should be unique for each renderer class).- Specified by:
getName
in interfaceI_CmsEntityRenderer
- Returns:
- the renderer name
- See Also:
-
createNativeInstance
Creates the native renderer instance.- Parameters:
initCall
- the name of the native function which creates the native renderer instance- Returns:
- the native renderer instance
-
getNativeInstance
Gets the native renderer instance.- Returns:
- the native renderer instance
-