General Attributes

Those attributes are valid for all widgets and can be set in two locations of the page customization tree:

Attributes:

Examples for Visibility Configuration

Example 1: The chart should not be displayed.

return [visible: 'false']

Code example 29: Visibility switched off (set in Admin Tool script)

Example 2: The chart should only be displayed if the selected view is service_customerand the engineer has the consultant role.

view = viewService.getById(view_id) // view_id is passed in context

if (!view.getName().equals("service_customer"))

{

return {"visible": false}

}

 

def role = roleService.getById('consultant');

def engineer = engineerService.getById(engineer_id);

if(!getRolesForEngineer(engineer).contains(role))

{

return {"visible": false}

}

Code example 30: Visibility depending on engineer role (set within Admin Tool script)

Localization of String Values of Attributes