Home » Backoffice Cockpits modifications

Backoffice Cockpits modifications

The backoffice (or next generation cockpit) replaces the cockpit framework, in future versions all existing cockpits (hmc, cs, wcms…) will be replaced by a new one using the backoffice cockpit. The key feature of the backoffice framework is the concept of widget, each widget is an independent component that can be reused and connected to other widgets. An application orchestrator allows you to build new backoffice from the backoffice itself.

Create a new Backoffice application

To create a new backoffice run the ant target ant extgen and select the template ybackoffice, follow the instructions and select a name, a package and ask the template to create a sample widget.
A backoffice extension has :

backoffice configuration inside its extensioninfo.xml

<meta key =”backoffice-module” value = “true”/>

  • backoffice folder, inside this folder you will find
  • classes
  • src
  • testsrc
  • resources
  • cng, customize backoffice css
  • widgets, widget components configuration
    – , each widget has a folder with its own name
    – images, folder for widget’s images
    – labels, folder for widget’s localization
    – definition.xml, your widget definition
    – .css
    – .zul
    – cockpit-config.xml, default configuration for your widget
    – editors or actions, folder for new editors and actions (editors to edit
    – item types that are not supported by the backoffice and actions to
    – perfom business)
    – images
    – labels, your widget localization
    – definition.xml, your widget definition
    – .css

The backoffice has one shared configuration file where users have different business roles, they would see different perspectives and have different rights. The admin can see all perspective and reorganize them from the orchestrator.

To configure a new perspective you need to edit file :

Here cloudnirbackoffice is the name of my custom extension built from the ybackoffice template During backoffice development activate the following property :
backoffice.cockpitng.hotDeployment.enabled=true to be able to reload the backoffice application without restarting your server.

Run ant build and click on redeploy from the backoffice admin perspective.

To create a new backoffice perspective you need to :

  1. create a new BackofficeRole group
  2. create a new UserGroup member of the new BackofficeRole group and the employeegroup group
  3. create users member of the new group
  4. update your backoffice configuration, add a new perspective by configuring the principal attribute of contexts to your new backoffice role.