The BASE web client includes an extensions mechanism that makes it possible to dynamically add functions to the GUI without having to edit the JSP code. It is, for example, possible to add menu items in the menu and toolbar buttons in selected toolbars.
Go to the Chapter 23, Extensions.
→ menu to display a list of possible extension points and all installed extensions. From this page, if you are logged in with enough permissions, it is also possible to configure the extensions system, enable/disable extensions, etc. Read more about this inExtensions can come in two forms, either as an XML file in the BASE Extensions XML format or as a JAR file. A JAR file is needed when the extension needs to execute custom-made code or use custom resources such as icons, css stylesheets, or JSP files.
More reading
The code examples in this chapter can be downloaded from The BASE plug-ins site.
An extensions point is a place in the BASE web client interface
where it is possible to extend the GUI with custom extensions. An
extension point has an ID which must be unique among all existing
extension points. Extension points registered by the BASE web client all
starts with net.sf.basedb.clients.web
. The
extension point also defines an
Action
An extensions is a custom addition to the BASE web client
interface. This can mean a new menu item in the menu or a
new button in a toolbar. An extension must provide an
ActionFactory
An Action
getTitle()
,
getIcon()
and getOnClick()
.
An ActionFactory
A Renderer
A RendererFactory
An ErrorHandlerFactory
LoggingErrorHandlerFactory
A ClientContext
In the BASE web client the context is always a
JspContext
ClientContext
object is provided as a
parameter it is always safe to cast it to a JspContext
object.
The context can also be used by an extension to request that a specific javascript or stylesheet file should be included in the HTML code.