4.4.2.3. Register new actions with UIExtensionManager

Edit the configuration.xml file as below:




<configuration xmlns="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd http://www.exoplatform.org/xml/ns/kernel_1_2.xsd">

  <external-component-plugins>
    <target-component>org.exoplatform.webui.ext.UIExtensionManager</target-component>
    <component-plugin>
      <name>add.action</name>
      <set-method>registerUIExtensionPlugin</set-method>
      <type>org.exoplatform.webui.ext.UIExtensionPlugin</type>
      <init-params>
        <object-param>
          <name>ViewSource</name>
          <object type="org.exoplatform.webui.ext.UIExtension">
            <field name="type"><string>org.exoplatform.wiki.webui.control.MoreExtensionContainer</string></field>
            <field name="rank"><int>1000</int></field>
            <field name="name"><string>ViewSource</string></field>
            <field name="component"><string>com.acme.ViewSourceActionComponent</string></field>
          </object>
        </object-param>
      </init-params>
    </component-plugin>
  </external-component-plugins>

</configuration>

Besides the MoreExtensionContainer type, action extension may be one of these following types:

Type Description
org.exoplatform.wiki.webui.control.UIPageToolBar Actions will be placed on the Wiki page toolbar at the view mode.
org.exoplatform.wiki.webui.control.AddExtensionContainer Actions will be placed on the Add Page drop-down list on the Wiki page toolbar at the view mode.
org.exoplatform.wiki.webui.control.MoreExtensionContainer Actions will be placed on the More drop-down list on the Wiki page toolbar at the view mode.
org.exoplatform.wiki.webui.control.UISubmitToolBar Actions will be placed on the Wiki page toolbar at the edit mode.
org.exoplatform.wiki.webui.control.UIEditorTabs Actions will be placed the on Wiki editor tabs.
org.exoplatform.wiki.webui.control.BrowseExtensionContainer Actions will be placed on the Browse drop-down list at the view mode.
org.exoplatform.wiki.webui.popup.UIWikiSettingContainer Actions will be placed on the Wiki setting tabs.
Copyright ©2012. All rights reserved. eXo Platform SAS