IPluginClientDashboard


Interface IPluginClientDashboard

The result of the demo client dashboard plugin. Shows a simple custom dashboard with a custom fieldset.

The interface for client dashboard plugins. This type of plugin lets you add a custom dashboard page to the system. It is possible to install multiple dashboard plugins at the same time. For each Rolle, an administrator may choose either the default dashboard, or one of the installed plugin dashboards. Each user with that role will then see that dashboard. 

A client dashboard plugin consists of an XHTML page and a managed bean for that XHTML page, see {{jpath path="de.xima.fc.plugin.interfaces.backend.IPluginClientDashboardCustomGUIBean/}} for further info. If a plugin dashboard is set, the XHTML page is shown instead of the normal dashboard. Please note that you cannot change the layout frame (the menu bar to the left and the top bar), but only the main content of the dashboard page.

Interface IPluginGenericCustomGUI

This interface is implemented automatically by a client dashboard plugin and contains the following additional methods.

Method signatures

Iterable<Class> getUnmanagedBeans()

This must return a list of backing bean classes that control the user interface and are required by the getXhtmlView. A new instance of the bean will be created automatically when the view is opened. Make sure each bean has got a no-argument constructor or it cannot be instantiated.

Please note that the beans are unmanaged - functionality specific to managed bean is not available. This means, for example, that annotations such as PostConstruct

URL getXhtmlView()

This method must return the path to the XHTML page for the custom user interface. Usually the XHTML file is part of the JAR resources of the plugin. In this case, you should return an URL to a JAR file resource (jar:file:/...) like so:
@Override
public URL getXhtmlView() {
 return getClass().getResource("/path/to/view.xhtml");
}

Interface IPluginClientDashboardCustomGUIBean

The interface for the unmanaged bean used by the client dashboard. It provides some common functionality. You should have your own bean class extends the abstract class DemoClientDashboard, it implements most of the required methods and reduces the overhead in creating new beans.