Hitachi Vantara Pentaho Community Wiki
Child pages
  • Components
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Components Overview

One of the fundamental changes in the new dashboard framework is the use of  components. In the first phase these components get defined in a special syntax, which essentially describes a javascript object.

Properties 

The component definition starts with an identifier and a list of properties within the curly crackets after the equal sign. Except after the last property, all properties are followed by a comma.

This is a list of properties which are currently supported by the framework's components:

Property

Description

Default value (must be present)

Type

Required for

name

Name of the component

 

String

all

type

Type of the component

 

String

all

solution

Solution of the xaction

 

String

 

path

Path to the yaction within the solution 

 

String

 

action

Name of the xaction to be executed

 

String

 

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="f3e1dcc2-060a-4f1f-b142-6f4502680e3c"><ac:plain-text-body><![CDATA[

listeners

A change in on of this variables triggers a refresh of the component

[]

Array of Strings

 

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="3cb40ca2-e6dd-49c7-8695-1da32e7bef7a"><ac:plain-text-body><![CDATA[

parameters

Parameters to execute the xaction

[]

Array of String arrays

 

]]></ac:plain-text-body></ac:structured-macro>

parameter

The dashboard variable that gets set by this component

 

String

 

htmlObject

The id of the html tag that display this component (usually a <div>)

 

String

all

expression

Function to return a parametrized String

function(){};

 

text

executeAtStart

Should the component be executed when the dashboard is loaded? (true or false)

function(){};

boolean

all

preExecution

This Javascript function will be executed before the components executes

 

function

all

postExecution

This Javascript function will be executed after the components executes

 

function

all

These componets have been implemented so far:

#check

[#dateInput)

radio

select

selectMulti

text

textInput

xactioncheck


check

Creates a  list of labeled checkboxes from the result set of the defined Action Sequence

regionCheck =

{

&nbsp; name: "regionCheck",

&nbsp; type: "check",

&nbsp; solution: "dashboards",

&nbsp; path: "sample_dashboard_components",

&nbsp; action: "regions.xaction",

&nbsp; parameters:\[\],

&nbsp; parameter:"region",

&nbsp; htmlObject: "object_check",

&nbsp; executeAtStart: true,

&nbsp; preExecution:function(){},

&nbsp; postExecution:function(){}

}

dateInput

Creates a textbox with a connect date picker. You can customize the date picker component the widgets files under js/dashboards

ToDo: Pedro please fill in details

dateInput =

{

&nbsp; name: "dateInput",

&nbsp; type: "dateInput",

&nbsp; parameter:"dateStart",

&nbsp; htmlObject: "object_dateInput",

&nbsp; executeAtStart: true,

&nbsp; preExecution:function(){},

&nbsp; postExecution:function(){}

}

radio

Create a list of labeled radio buttons from the result set of the defined Action Sequence

regionRadio =

{

&nbsp; name: "regionRadio",

&nbsp; type: "radio",

&nbsp; solution: "dashboards",

&nbsp; path: "sample_dashboard_components",

&nbsp; action: "regions.xaction",

&nbsp; parameters:\[\],

&nbsp; parameter:"region",

&nbsp; htmlObject: "object_radio",

&nbsp; executeAtStart: true,

&nbsp; preExecution:function(){},

&nbsp; postExecution:function(){}

}

select

Create a single select drop down list from the result set of defined Action Sequence

regionSelector =

{

&nbsp; name: "regionSelector",

&nbsp; type: "select",

&nbsp; solution: "dashboards",

&nbsp; path: "sample_dashboard_components",

&nbsp; action: "regions.xaction",

&nbsp; parameters:\[\],

&nbsp; parameter:"region",

&nbsp; htmlObject: "object_select",

&nbsp; executeAtStart: true,

&nbsp; preExecution:function(){},

&nbsp;&nbsp;postExecution:function(){Dashboards.processChange(this.name);}

}

selectMulti

Create a multi select list from the result set of defined Action Sequence

regionSelectorMulti =

{

&nbsp; name: "regionSelectorMulti",

&nbsp; type: "selectMulti",

&nbsp; solution: "dashboards",

&nbsp; path: "sample_dashboard_components",

&nbsp; action: "regions.xaction",

&nbsp; parameters:\[\],

&nbsp; parameter:"region",

&nbsp; htmlObject: "object_multi",

&nbsp; size: "4",

&nbsp; executeAtStart: true,

&nbsp; preExecution:function(){},

&nbsp; postExecution:function(){}

}

text

Updates the text in a HTML String  using the expression

titleString =

{

&nbsp; name: "regionVarianceBarChart",

&nbsp; type: "text",

&nbsp;listeners:\["region","dateStart"\],

&nbsp; htmlObject: "text_object",

&nbsp; executeAtStart: true,

&nbsp; expression: function(){return "'Chosen region: ' + region + '; Start date: ' + dateStart"},

&nbsp; preExecution:function(){},

&nbsp; postExecution:function(){}

}

textInput

Creates a text imput field.

regionText =

{

&nbsp; name: "regionText",

&nbsp; type: "textInput",

&nbsp; parameter:"region",

&nbsp; htmlObject: "object_textInput",

&nbsp; executeAtStart: true,

&nbsp; preExecution:function(){},

&nbsp; postExecution:function(){}

}

xaction

Excecutes a Action Sequence and displays the result in the HTML tag.

regionVarianceBarChart =

{

&nbsp; name: "regionVarianceBarChart",

&nbsp; type: "xaction",

&nbsp; solution: "dashboards",

&nbsp; path: "sample_dashboard_components",

&nbsp; action: "RegionVarianceBarChart.xaction",

&nbsp; listeners:\["region"\],

&nbsp; parameters: \[\["REGION","region"\]\],

&nbsp; htmlObject: "object_2",

&nbsp; executeAtStart: false,

&nbsp; preExecution:function(){},

&nbsp; postExecution:function(){}

}
  • No labels