Try OpenEdge Now
skip to main content
Customization Guide
Customizing dashboard : Configuring dashboard layout
 

Configuring dashboard layout

You can define the additional layouts required for customization using dashboard-config.xml file from the OEBPS_HOME/conf folder. The XML schema file dashboard-config.xsd is located in the OEBPS_HOME/conf/resources/bpmportal folder. The dashboard-config.xml file has the following structure.
<Dashboard>
  <Layouts>
    <Layout id="31" type="column">
      <Name>FourColumns</Name>
      <Renderer>FourColumnsLayout.jsp</Renderer>
      <Description>This is a layout with four columns</Description>
      <Columns values="4" />
    </Layout>
    <Layout id="32" type="other">
      <Name>AnotherLayout</Name>
      <Renderer>AnotherLayout.jsp</Renderer>
      <Description>This is a test layout with no columns</Description>
    </Layout>
  </Layouts>
</Dashboard
The following table explains the tags and their purposes for defining custom layout in a dashboard.
Table 12. Policy and methods
Tag name
Description
Validation
Dashboard
Root tag for the XML
This tag should have one and only one <Layouts> tag.
Layouts
This tag can contain multiple Layout tags.
This tag can have zero or more Layout tags.
Layout
This is the child tag of Layouts tag and has attributes like id and type.
‘id’ attribute is mandatory, and it should be between the range of 30-99 (both inclusive).‘type’ attribute is mandatory, and the valid values for this tag are ‘column’ and ‘other’.Note: If ‘type’ attribute is set to ‘column’, then this will be treated as column layout dashboard and <Columns> tag will be mandatory. If the ‘type’ attribute is set to ‘other’, then this will be a non-column layout, and you will need to take care of placing the widgets in the layout renderer.
Name
This is the name of a layout, which appears in the Layout drop down list while creating / editing a dashboard.
The name can be maximum 60 characters in length.
Description
Description of the defined layout.
This is an optional field. The description can be maximum 255 characters in length.
Renderer
This is the name of the JSP file that is called when you select a layout.
This is a JSP file name. It should not contain ‘/’. The server searches for this filename in the <web-context>/bpmportal/layout/ext folder.
Columns
This tag is mandatory when the ‘type’ attribute of the ‘Layout’ tag is set to ‘column’. This tag has an attribute ‘values’. This represents the number of columns in the layout.
The ‘values’ attribute has a numeric value.
When you start the portal server, it reads the dashboard-config.xml file. However, when a user clicks ‘Edit Dashboard’ in Business Process Portal, it will refresh its memory contents.
The dashboard-config.xml file provides out-of-the-box configuration for four-column and five-column layouts. However, these layouts are commented in the XML file. You need to uncomment appropriate sections to enable these layouts. The default renderers for these layouts are FourColumnsLayout.jsp and FiveColumnsLayout.jsp respectively. The FourColumnsLayout.jsp file arranges the added widgets in four columns of equal widths. Similarly, the FiveColumnsLayout.jsp file arranges the added widgets in five columns of equal width.