Interface I_CmsWidgetService

All Known Implementing Classes:
CmsDefaultWidgetService, CmsWidgetService

public interface I_CmsWidgetService
Provides widget renderer for entity attributes.

  • Method Details

    • addChangedOrderPath

      void addChangedOrderPath(String attributePath)
      Adds the given path to the list of paths where child attributes have change their order.

      Parameters:
      attributePath - the attribute path
    • addConfigurations

      void addConfigurations(Map<String,org.opencms.acacia.shared.CmsAttributeConfiguration> configurations)
      Adds all configurations.

      Parameters:
      configurations - the configurations to add
    • addRenderer

      Adds a renderer.

      Parameters:
      renderer - the renderer to add
    • addWidgetFactory

      void addWidgetFactory(String widgetName, I_CmsWidgetFactory widgetFactory)
      Registers the given widget factory with the service.

      Parameters:
      widgetName - the widget name
      widgetFactory - the widget factory
    • getAttributeFormWidget

      Returns the attribute form editing widget.

      Parameters:
      attributeName - the attribute name
      Returns:
      the attribute widget
    • getAttributeHelp

      String getAttributeHelp(String attributeName)
      Returns the attribute help information.

      Parameters:
      attributeName - the attribute name
      Returns:
      the attribute help information
    • getAttributeInlineWidget

      I_CmsEditWidget getAttributeInlineWidget(String attributeName, com.google.gwt.dom.client.Element element)
      Returns the attribute inline editing widget wrapping the given DOM element.

      Parameters:
      attributeName - the attribute name
      element - the DOM element to wrap
      Returns:
      the attribute widget
    • getAttributeLabel

      Returns the label for the given attribute.

      Parameters:
      attributeName - the attribute name
      Returns:
      the attribute label
    • getDefaultAttributeValue

      String getDefaultAttributeValue(String attributeName, String simpleValuePath)
      Returns the default attribute value.

      Parameters:
      attributeName - the attribute name
      simpleValuePath - the value path
      Returns:
      the default value
    • getRendererForAttribute

      I_CmsEntityRenderer getRendererForAttribute(String attributeName, org.opencms.acacia.shared.CmsType attributeType)
      Returns the renderer for the given attribute.

      Parameters:
      attributeName - the name of the attribute
      attributeType - the type of the attribute
      Returns:
      the renderer
    • getRendererForType

      I_CmsEntityRenderer getRendererForType(org.opencms.acacia.shared.CmsType entityType)
      Returns the renderer for the given entity type.

      Parameters:
      entityType - the type
      Returns:
      the renderer
    • isDisplayCompact

      boolean isDisplayCompact(String attributeName)
      Returns the if the attribute widget should be displayed in compact view.

      Parameters:
      attributeName - the attribute name
      Returns:
      true if the attribute widget should be displayed in compact view
    • isDisplaySingleLine

      boolean isDisplaySingleLine(String attributeName)
      Returns if the attribute widget should be displayed in single line view.

      Parameters:
      attributeName - the attribute name
      Returns:
      true if the attribute widget should be displayed in single line view
    • isVisible

      boolean isVisible(String attributeName)
      Returns if the given attribute should be visible in the editor.

      Parameters:
      attributeName - the attribute name
      Returns:
      true if the given attribute should be visible in the editor
    • registerComplexWidgetAttribute

      void registerComplexWidgetAttribute(String attrName, String renderer, String configuration)
      Registers a complex widget attribute which should be handled by a special renderer.

      Parameters:
      attrName - the attribute name
      renderer - the renderer to register for the attribute
      configuration - the renderer configuration
    • setDefaultRenderer

      Sets the default renderer.

      Parameters:
      renderer - the default renderer
    • setWidgetFactories

      Sets the widget factories.

      Parameters:
      widgetFactories - the widget factories
    • shouldRemoveLastValueAfterUnfocus

      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.

      Parameters:
      widget - the widget to check
      Returns:
      true if the value should be disabled