Extending frontend UI
Esta página aún no está disponible en tu idioma.
The OpenKM plugin extensions makes it easy to extend the OpenKM end user interface by encapsulating plugin code and making it reusable between OpenKM versions.
The OpenKM plugin extension architecture is based on:
- Extensions
- Events
- Handlers
- Communicators
Extensions are available widget definitions that allows the developer to make extensible panels and widgets ( for example adding new tab panel on tab document )
Events are a collection of events that OpenKM UI triggers each time any changes occur ( for example when a new keyword is added in the tab document the triggered event HasDocumentEvent.KEYWORD_ADDED)
Handlers are a collection of methods called internally by OpenKM. Handlers must be implemented into your extensions in order to collect OpenKM triggered events. Each extension you make can have one or several handlers, that are automatically registered by OpenKM on the loading process. OpenKM internally triggers events to each declared handler.
Comunicators are a collection of methods available as OpenKM Comunitators API to access transparently some internal UI values. There are several Communicators, for example with GeneralComunicator you can access some general actions like refreshing UI as GeneralComunicator.refreshUI(). OpenKM Communicators API has read and write methods to interact with internal OpenKM UI objects.
Enable sample extensions
Section titled “Enable sample extensions”OpenKM comes with some frontend UI sample extensions not enabled by default. To enable them go to Administration > Utilies > Database query and execute the SQL queries:
| Extension | SQL sentence |
|---|---|
| ToolBarButtonExample | <br>INSERT INTO OKM_EXTENSION (EXT_UUID,EXT_NAME) VALUES('9f84b330-d096-11df-bd3b-0800200c9a66','Toolbar button example');<br> |
| TabWorkspaceExample | <br>INSERT INTO OKM_EXTENSION (EXT_UUID,EXT_NAME) VALUES('44f94470-d097-11df-bd3b-0800200c9a66','Tab workspace example');<br> |
| TabFolderExample | <br>INSERT INTO OKM_EXTENSION (EXT_UUID,EXT_NAME) VALUES('d95e01a0-d097-11df-bd3b-0800200c9a66','Tab folder example');<br> |
| TabFolderExample | <br>INSERT INTO OKM_EXTENSION (EXT_UUID,EXT_NAME) VALUES('d9dab640-d098-11df-bd3b-0800200c9a66','Hello world example');<br> |