You are looking at documentation for an older release. Not what you want? See the current release documentation.
This section details how to add a Contextual menu enty which is an action that could be accessed via a right click.
For example, abutton will be displayed in Sites Explorer when right click on a content. Clicking on this button will display a message in the log.
To add that button, please follow these steps:
Create a Maven project having the following directory structure:
Create a new action class TestButtonActionComponent which should extend from UIAbstractManagerComponent. You should also create its corresponding listener TestButtonActionListener which extends from UIActionBarActionListener.
You can view the complete class here.
configuration.xml file, register the new action under UIExtensionManager target-component as a component-plugin
Some notes should be respected for the java class TestButtonActionComponent:
TestButton will be used to label the action.
TestButtonActionComponent is the class name of your action.
There is a matching rule between the action name (TestButton) and the listener class name (TestButtonActionListener): The listener class name = the action name + ActionListener.
Build your project using this command: mvn clean install
Copy the .jar file (target/action-example-1.0.jar) to the lib folder of eXo Platform.
Restart the server.
Log in to the platform and go to Sites Explorer.
Upload a document.
Right click on this document, theis added to the action list and the message log is displayed after clicking on it.