Class A_CmsNativeComplexWidget

  • All Implemented Interfaces:
    I_CmsComplexWidget

    public abstract class A_CmsNativeComplexWidget
    extends java.lang.Object
    implements I_CmsComplexWidget
    This is an abstract class which you can inherit from to relatively easily implement complex widgets for rendering nested contents in Javascript.

    Subclasses of this class only need to implement the methods getScripts(), getStyleSheets(), getName(), and configure(). The name of the initialization function is generated by prepending the string "init_" to the widget name returned by getName().

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String INIT_FUNCTION_PREFIX
      The prefix which is prepended to the widget name to get the name of the initialization function.
      protected java.lang.String m_configuration
      The configuration string.
      protected java.util.Map<java.lang.String,​java.lang.String> m_configurationMap
      The configuration map created from the configuration string.
      protected JSONObject m_jsonConfig
      The configuration map in JSON format.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract java.lang.String getName()
      Gets the name of the complex widget.
      abstract java.util.List<java.lang.String> getScripts​(CmsObject cms)
      Gets the list of URLs of scripts which the widget reuires.
      abstract java.util.List<java.lang.String> getStyleSheets​(CmsObject cms)
      Gets the list of URLs of stylesheets which are required by the widget.
      CmsComplexWidgetData getWidgetData​(CmsObject cms)
      Gets the data needed for the editor to render the complex widget.
      void initConfiguration​(java.lang.String config)
      Initializes the configuration date from the given configuration string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait