Skip to main content
Skip table of contents

Reporting List Widget

Definition

The Reporting List Widget is aimed at displaying Reporting search results as a list.

Configuration

Properties

Property

Type

Mandatory

Description

Values (default values in bold)

type

ReportingWidgetType

YES

The type of the widget in XML configuration

-

reportingId

String

YES

The id of a ReportingObjectConfiguration which this widget will target

-

associations

ReportingWidgetAssociationConfiguration

NO

Same as the associations described for ReportingWIdget

-

actions

Button actions

NO

Similar to any List type widget

-

allowExport

Boolean

NO

Allows to define if the export of the results data is allowed or not.

true,false

displayOnInit

Boolean

NO

If true, the chart will be displayed initially without requiring to click the "Apply" button of the criteria panel first.

true,false

triggerAssociationOnRowClick

Boolean

NO

If true, clicking a row will trigger an association by transfering the row as criteria. Only the criteria that has been declared in the association will be passed.

true,false

columns

Columns

YES

Similar to any List type widget

-

contract

ReportingContractConfiguration

YES

ReportingWidget

-

renderingRule

RuleDefinition (Normalization rule of REPORTING category)

NO

This rule will be applied for each document of the results and allows to transform the content. It MUST return a Map of String to Object.

Example:

XML
  <renderingRule>
   <script><![CDATA[
   // Request criteria can be accessed on VARS.criteria
   // OBJECT is still the Feature target
   // The "row" element is accessed on VALUE
   def dateCriteria = VARS.criteria["_id.date"];
 
   def thisRowFirstName = VALUE.firstName as String
    
   // A column "fullNameAndDate " can be configured on the widget
   VALUE.fullNameAndDate = "${thisRowFirstName} ${OBJECT.lastName} ${dateCriteria}";
    
   if (VALUE.lastMdAuthent != null) {
        // Nested object must be casted to List<Map<String, Object>>
        def firstMdAuthent = VALUE.lastMdAuthent as List<Map<String, Object>>;
        VALUE.firstMdAuthent = firstMdAuthent.get(0).get("md");
   }
    
   // The value must be returned
   return VALUE;
   ]]></script>
</renderingRule>

-

Display conditions

Actions of a Reporting List Widget can be conditional like in any Search/List type of widgets. However, unlike a traditional list where the condition is most likely dependent on the OBJECT context, one typically want to access the current document of the row holding the action. This context is available as REPORTING_DOCUMENT.

CODE
<displayCondition>
   <script><![CDATA[return ((REPORTING_DOCUMENT.identity as Map).firstName as String).equals("John")]]></script>
</displayCondition>

Read Next

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.