Extending frontend UI
This has been deprecated since version 7.1
To extend the frontend, you need to obtain the source code and compile the changes.
The OpenKM plugin extensions make it easy to extend the OpenKM end-user interface by encapsulating plugin code and making it reusable across OpenKM versions.
The OpenKM plugin extension architecture is based on:
- Extensions
- Events
- Handlers
- Communicators
Extensions are available as widget definitions that allow the developer to create extensible panels and widgets (for example, adding a new tab panel on the document tab).
Events are a collection of events that the OpenKM UI triggers each time any change occurs (for example, when a new keyword is added in the document tab, the triggered event is HasDocumentEvent.KEYWORD_ADDED)
Handlers are a collection of methods called internally by OpenKM. Handlers must be implemented in your extensions in order to handle OpenKM-triggered events. Each extension you make can have one or several handlers that are automatically registered by OpenKM during the loading process. OpenKM internally triggers events for each declared handler.
Communicators are a collection of methods available as the OpenKM Communicators API to transparently access some internal UI values. There are several Communicators; for example, with GeneralCommunicator you can access general actions like refreshing the UI (for example, GeneralCommunicator.refreshUI()). The OpenKM Communicators API has read and write methods to interact with internal OpenKM UI objects.
Creating OpenKM plugin extensions is easy, but you need some Java knowledge and must pay special attention to the Google Web Toolkit API that is used to build the OpenKM UI. http://code.google.com/webtoolkit/
Enable sample extensions
OpenKM comes with some frontend UI sample extensions not enabled by default. To enable them, go to Administration > Utilities > Database query and execute the SQL queries:
Extension | SQL statement |
---|---|
ToolBarButtonExample |
|
TabWorkspaceExample |
|
TabFolderExample |
|
TabFolderExample |
|
After registering a sample extension, you also need to enable it from Administration > Profiles.