Building Composite, Role-Based Dashboards with WebSphere Dashboard
FrameworkPhilip Monson Sam Alexander
Lea Medhurst Christine Miner
In-depth look at WebSphere Dashboard Framework builders
Leverage key features, such as Annotations and Alerts
August 2007
© Copyright International Business Machines Corporation 2007. All
rights reserved. Note to U.S. Government Users Restricted Rights --
Use, duplication or disclosure restricted by GSA ADP Schedule
Contract with IBM Corp.
First Edition (August 2007)
This edition applies to WebSphere Dashboard Framework Version
6.0.
Note: Before using this information and the product it supports,
read the information in “Notices” on page vii.
Contents
Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. vii Trademarks . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . viii
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. ix The team that wrote this paper . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Become a published author . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .x
Comments welcome. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.x
Chapter 1. Introduction to IBM WebSphere Dashboard Framework . . .
. . . . . . . . . . . . 1 1.1 What is WebSphere Dashboard
Framework. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . 2 1.2 Features of WebSphere Dashboard Framework . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . 4 1.3 How
WebSphere Dashboard Framework fits into the IBM WebSphere Portlet
Factory
architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3.1 IBM WebSphere Portlet Factory . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . 6 1.3.2 WebSphere
Dashboard Framework . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 7 1.3.3 Lotus ActiveInsight . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . 8
1.4 The benefit to the business . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.4.1
Why a dashboard . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . 9 1.4.2 IBM
Dashboard Accelerator . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 10 1.4.3 Why WebSphere
Dashboard Framework . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . 10
1.5 The example application . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.5.1
Technology used. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . 13
1.6 Audience and goals of this IBM Redpaper . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . 14 1.6.1 Skills
required . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . 14
Chapter 2. Overview of portlet creation . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . 15 2.1 Installing
WebSphere Dashboard Framework . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 16
2.1.1 Planning the installation . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.1.2
Installing WebSphere Dashboard Framework with Eclipse . . . . . . .
. . . . . . . . . . 16 2.1.3 Notes about installing into Rational
Products . . . . . . . . . . . . . . . . . . . . . . . . . . . .
19
2.2 WebSphere Dashboard Frameworks concepts . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 20 2.2.1 Accessing Help . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 20 2.2.2 WebSphere Portlet Factory
concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . 21
2.3 Creating a WebSphere Dashboard Framework project . . . . . . .
. . . . . . . . . . . . . . . . . 22 2.3.1 Step one: Setting the
project name. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . 23 2.3.2 Step two: Selecting the feature set . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
24 2.3.3 Step three: Java settings . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . 26 2.3.4 Step
four: Deployment configuration. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 27 2.3.5 Step five: Completion . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . 30
2.4 Developing your first portlet using the framework . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . 31 2.4.1 Step one: Add
a model to the project . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 31 2.4.2 Step two: Exploring your model and
the tooling . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.4.3 Project Explorer View . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . 33 2.4.4 Step
three: Adding the Excel data source to the builder . . . . . . . .
. . . . . . . . . . . . 35 2.4.5 Step four: Displaying data. . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . 38 2.4.6 Step five: Running the model . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
2.4.7 Step six: Enhancing the model . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . 43 2.4.8 Step seven:
Adding the status indicator . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 45 2.4.9 Changing WebSphere Portlet Factory
properties . . . . . . . . . . . . . . . . . . . . . . . . .
47
© Copyright IBM Corp. 2007. All rights reserved. iii
2.4.10 Troubleshooting . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . 47 2.5
Deploying to other environments . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . 48
2.5.1 Deploying the simple application. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . 48 2.5.2 Deploying
more complex applications. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 48
2.6 Moving forward with best practices . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . 49 2.6.1
WebSphere Portlet Factory best practices . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 49 2.6.2 WebSphere Dashboard
Framework best practices . . . . . . . . . . . . . . . . . . . . .
. . 50
Chapter 3. Retrieving data . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 3.1
Retrieving data from relational databases. . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . 54
3.1.1 Creating and configuring the database . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . 54 3.1.2 Configuring the
JDBC provider and data source. . . . . . . . . . . . . . . . . . .
. . . . . . . 54 3.1.3 SQL DataSource builder . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
59 3.1.4 SQL Call builder . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
3.2 OfficeSalesKPIS service definition . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . 63 3.2.1
getKPIByOffice service operation . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . 64
3.3 Retrieving data from Lotus Domino. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . 64 3.3.1 Domino
database for customer orders . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 65 3.3.2 Configuring your Domino server
and Domino database . . . . . . . . . . . . . . . . . . . . 65
3.3.3 Domino Data Access builder. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . 66
3.4 getSearchString method . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 3.4.1
getOrdersByCustomerID action list. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 68 3.4.2 OrdersService
service definition . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 69 3.4.3 getOrdersByCustomerId service
operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. 70
3.5 Retrieving data from Excel . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 3.5.1
Excel Import . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . 73
3.6 Provider model best practices. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . 74 3.6.1
Testing provider models . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . 74 3.6.2 Caching. . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 76 3.6.3 Data manipulation .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 77
Chapter 4. Displaying data . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 4.1
Displaying data . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 4.2
Best practices for displaying data . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . 82 4.3 Why
WebSphere Dashboard Framework enhances WebSphere Portlet Factory. .
. . . 83
4.3.1 Alert Customizer . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 4.3.2
Alert Data . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . 83 4.3.3
Annotations . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . 83 4.3.4 Bullet
Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . 83 4.3.5 Contextual
Information . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 85 4.3.6 Hierarchy Drilldown. . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . 87 4.3.7 ID Gatherer . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . 90 4.3.8 Map . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . 91 4.3.9 ODS Export . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . 97 4.3.10 Query Filter . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
98 4.3.11 Query Filter Form . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 4.3.12
Query Filter Observer . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . 98 4.3.13 Record List
and Detail. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 98 4.3.14 Snapshot Report . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . 101 4.3.15 Status Indicator . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . 103 4.3.16 Status Indicator Legend . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
4.3.17 Status Page . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . 107 4.3.18
Summary and Drilldown . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 111
iv Building Composite, Role-Based Dashboards with WebSphere
Dashboard Framework
4.3.19 Summary Row . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . 114 4.3.20 Table
Customizer . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 116
4.4 Customizing the look and feel . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . 116 4.4.1
Creating a custom edit or configure page . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 116 4.4.2 Customizing a threshold
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . 118 4.4.3 Adding a Chart Customizer . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
121 4.4.4 Table Customizer . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Chapter 5. Filtering . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 5.1
Create a Query Filter. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . 134
5.1.1 Query Filter Form . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . 134 5.1.2 Query
Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . 135
5.2 Enabling portlets to respond to filters . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . 142 5.2.1 Query
Filter Observer . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 142
5.3 Profiling: Creating a role-driven filter . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Chapter 6. Alerts . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 6.1
Overview of alert capabilities . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . 148 6.2
Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
6.2.1 Step one: Selecting a persistence manager . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 149 6.2.2 Step two: Adding
alert features to your project . . . . . . . . . . . . . . . . . .
. . . . . . . . 151 6.2.3 Step three: Setting up the database . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
6.2.4 Step four: Setting up a data source . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . 154 6.2.5 Step five:
Configuring your projects to use database persistence . . . . . . .
. . . . 154 6.2.6 Step six: Creating an Alerts Scheduler project .
. . . . . . . . . . . . . . . . . . . . . . . . . 154 6.2.7 Step
seven: Configuring e-mail and SMS . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 155
6.3 Configuring data for alerts . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 6.3.1
Alert data. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . 157 6.3.2 Alert
Customizer . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . 158
6.4 Creating an alert definition with the Manage Alerts portlet . .
. . . . . . . . . . . . . . . . . . . 162 6.4.1 Script-based alerts
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 163 6.4.2 Java-based alerts . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . 170 6.4.3 Model-based alerts . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. 174
Chapter 7. Annotations. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . 179 7.1
Overview of annotations . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . 180 7.2
Configuring Annotations persistence . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . 181
7.2.1 XML persistence . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . 181 7.2.2
Relational database persistence. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 181
7.3 Annotating charts and tables. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . 183 7.3.1
Annotations user interface . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . 183 7.3.2 Commenting
charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 187 7.3.3 Viewing and responding
to chart comments . . . . . . . . . . . . . . . . . . . . . . . . .
. . . 188 7.3.4 Commenting tables and table rows. . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . 190 7.3.5 Viewing
and responding to table and table row comments. . . . . . . . . . .
. . . . . . 191
7.4 Enabling annotations. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 7.4.1
Enabling Annotations in high-level dashboard builders . . . . . . .
. . . . . . . . . . . . 193 7.4.2 Using the Annotations builder in
a model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
195
Contents v
7.5 Configuring alerting for annotations . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . 198 7.6 Archiving
annotations . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . 204
Appendix A. Additional material . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . 205 Locating the
Web material . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . 205 Installing the
example application . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 205
Downloading . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
Create database and define data source . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . 206 Deploy the Lotus
Notes database. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 207 Creating the projects in WebSphere
Dashboard Framework . . . . . . . . . . . . . . . . . . . . 208
Import WebSphere Portlet Factory archive . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . 209 Configure project for
Domino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 210 Redeploy project . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . 210 Populate the database . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . 211 Configure e-mail alerts . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
211 Set up pages and portlet . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
System requirements for downloading the Web material . . . . . . .
. . . . . . . . . . . . . . . . 212 How to use the example
application . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . 212
vi Building Composite, Role-Based Dashboards with WebSphere
Dashboard Framework
Notices
This information was developed for products and services offered in
the U.S.A.
IBM may not offer the products, services, or features discussed in
this document in other countries. Consult your local IBM
representative for information on the products and services
currently available in your area. Any reference to an IBM product,
program, or service is not intended to state or imply that only
that IBM product, program, or service may be used. Any functionally
equivalent product, program, or service that does not infringe any
IBM intellectual property right may be used instead. However, it is
the user's responsibility to evaluate and verify the operation of
any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering
subject matter described in this document. The furnishing of this
document does not give you any license to these patents. You can
send license inquiries, in writing, to: IBM Director of Licensing,
IBM Corporation, North Castle Drive, Armonk, NY 10504-1785
U.S.A.
The following paragraph does not apply to the United Kingdom or any
other country where such provisions are inconsistent with local
law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS
PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
PURPOSE. Some states do not allow disclaimer of express or implied
warranties in certain transactions, therefore, this statement may
not apply to you.
This information could include technical inaccuracies or
typographical errors. Changes are periodically made to the
information herein; these changes will be incorporated in new
editions of the publication. IBM may make improvements and/or
changes in the product(s) and/or the program(s) described in this
publication at any time without notice.
Any references in this information to non-IBM Web sites are
provided for convenience only and do not in any manner serve as an
endorsement of those Web sites. The materials at those Web sites
are not part of the materials for this IBM product and use of those
Web sites is at your own risk.
IBM may use or distribute any of the information you supply in any
way it believes appropriate without incurring any obligation to
you.
Information concerning non-IBM products was obtained from the
suppliers of those products, their published announcements or other
publicly available sources. IBM has not tested those products and
cannot confirm the accuracy of performance, compatibility or any
other claims related to non-IBM products. Questions on the
capabilities of non-IBM products should be addressed to the
suppliers of those products.
This information contains examples of data and reports used in
daily business operations. To illustrate them as completely as
possible, the examples include the names of individuals, companies,
brands, and products. All of these names are fictitious and any
similarity to the names and addresses used by an actual business
enterprise is entirely coincidental.
COPYRIGHT LICENSE:
This information contains sample application programs in source
language, which illustrate programming techniques on various
operating platforms. You may copy, modify, and distribute these
sample programs in any form without payment to IBM, for the
purposes of developing, using, marketing or distributing
application programs conforming to the application programming
interface for the operating platform for which the sample programs
are written. These examples have not been thoroughly tested under
all conditions. IBM, therefore, cannot guarantee or imply
reliability, serviceability, or function of these programs.
© Copyright IBM Corp. 2007. All rights reserved. vii
Trademarks
The following terms are trademarks of the International Business
Machines Corporation in the United States, other countries, or
both:
Redbooks (logo) ® ActiveInsight™ Cloudscape™ Domino® DB2®
IBM® Lotus Notes® Lotus® Notes® Rational®
Redbooks® Sametime® WebSphere® Workplace™ Workplace Forms™
The following terms are trademarks of other companies:
SAP, and SAP logos are trademarks or registered trademarks of SAP
AG in Germany and in several other countries.
Oracle, JD Edwards, PeopleSoft, Siebel, and TopLink are registered
trademarks of Oracle Corporation and/or its affiliates.
Snapshot, and the Network Appliance logo are trademarks or
registered trademarks of Network Appliance, Inc. in the U.S. and
other countries.
Java, JavaServer, JavaServer Pages, JDBC, JRE, JSP, J2EE, and all
Java-based trademarks are trademarks of Sun Microsystems, Inc. in
the United States, other countries, or both.
Excel, Microsoft, SQL Server, Windows, and the Windows logo are
trademarks of Microsoft Corporation in the United States, other
countries, or both.
Other company, product, or service names may be trademarks or
service marks of others.
viii Building Composite, Role-Based Dashboards with WebSphere
Dashboard Framework
Preface
WebSphere® Dashboard Framework is a tool for rapidly building
dashboard applications on top of a service-oriented architecture,
including WebSphere Portal environments. Developers can quickly and
easily leverage their company’s core assets and data by
automatically assembling them into custom, high-value dashboards.
Portlets created with WebSphere Dashboard Framework are dynamic,
robust Java™ 2 Enterprise Edition (J2EE™) applications that react
automatically to change. Business users can modify them in real
time to meet changing business requirements without requiring any
coding, duplicating, or versioning of assets. By eliminating the
need to code all of these implementations and their variations,
WebSphere Dashboard Framework simplifies the development,
deployment, and change management processes.
This IBM® Redpaper provides an overview of the options and
techniques for developing applications using the WebSphere
Dashboard Framework. We provide an overview of the technology and
give you a step-by-step introduction into developing your first
WebSphere Dashboard Framework. We then look deeper into the product
with the use of an example application based on a fictitious
company.
Throughout the IBM Redpaper, we also point out tips and tricks as
well as some best practices to help you achieve the best outcome
for your organization in the quickest possible time.
The team that wrote this paper
This paper was produced by a team of specialists from around the
world working at the International Technical Support Organization,
Cambridge Center.
Philip Monson is a Project Leader at the ITSO Lotus® Center in
Cambridge, MA. Phil has been with Lotus/IBM for 17 years, joining
the company when the early versions of Notes were rolled out for
internal use. He has served in management, technical, and
consulting roles in the IT, Sales, and Development
organizations.
Sam Alexander is a developer for the WebSphere Portlet Factory
development team at IBM, specializing in Portlet Factory’s back-end
integration builders. He holds a Master’s degree in Computer
Science from Boston University’s Metropolitan College and a
Bachelor’s degree in Business Management from the University of
North Carolina at Wilmington.
Lea Medhurst is a member of the Lotus Technical Pre-Sales team in
Australia. He has been working for IBM for two years, joining IBM
after an extensive period at an IBM Business Partner. Lea has been
responsible for implementing, administering, and developing
applications within the Lotus and WebSphere Brands. Lea originally
started developing using Lotus Notes® and has since moved on to
J2EE and in particular WebSphere Portal and its associated
development tools. Lea has been working with WebSphere Portal since
V4.0 and is a co-author of Portalizing Domino Applications,
SG24-6466.
Christine Miner is a Senior Consultant at Ascendant Technology with
over eight years experience in application design and development,
specializing in WebSphere Portal and WebSphere Portlet Factory.
Christine has experience across the full life cycle of a
project,
© Copyright IBM Corp. 2007. All rights reserved. ix
including architecture, design, development, implementation, and
testing. Recently, Christine became an IBM Certified Application
Developer for IBM WebSphere Portlet Factory V6.0. The Web site for
Ascendant Technology is:
http://www.atech.com
Thanks to the following people for their contributions to this
project:
Rebecca Buisan, Product Line Manager, IBM Software Group
Jason Cornell, Domain Engineer, IBM Software Group
Michael C. Frank, WDF Development Manager, IBM Software Group
Luciano Silva, Chief Programmer - WDF, IBM Software Group
Dong Fei Wu, Software Engineer, IBM Software Group
Fan He, Software Engineer, IBM Software Group
Zhao-hui Nie, Software Engineer, IBM Software Group
Rui Shen, Software Engineer, IBM Software Group
Qing Guo, Software Engineer, IBM Software Group
Liang Liang, Software Engineer, IBM Software Group
Become a published author
Join us for a two- to six-week residency program! Help write a book
dealing with specific products or solutions, while getting hands-on
experience with leading-edge technologies. You will have the
opportunity to team with IBM technical professionals, Business
Partners, and Clients.
Your efforts will help increase product acceptance and client
satisfaction. As a bonus, you will develop a network of contacts in
IBM development labs and increase your productivity and
marketability.
Find out more about the residency program, browse the residency
index, and apply online at:
ibm.com/redbooks/residencies.html
Your comments are important to us!
We want our papers to be as helpful as possible. Send us your
comments about this paper or other IBM Redbooks® publications in
one of the following ways:
Use the online Contact us review IBM Redbooks publications form
found at:
ibm.com/redbooks
[email protected]
Preface xi
Chapter 1. Introduction to IBM WebSphere Dashboard Framework
This chapter provides an overview of WebSphere Dashboard Framework.
This chapter introduces you to the features and concepts of the
WebSphere Dashboard Framework and discusses the value to the
business of implementing the framework. This chapter describes the
following topics specifically:
What is WebSphere Dashboard Framework
Features of WebSphere Dashboard Framework
How WebSphere Dashboard Framework fits into the IBM WebSphere
Portal family
The benefits of WebSphere Dashboard Framework to the business
The example application developed for this IBM Redpaper
Audience and goals of this IBM Redpaper
1
1.1 What is WebSphere Dashboard Framework
IBM WebSphere Dashboard Framework is a powerful and flexible tool
for rapidly building role-based dashboards on top of a
service-oriented architecture (SOA). WebSphere Dashboard Framework
augments the capabilities of IBM WebSphere Portlet Factory, adding
dashboard-specific features, such as a robust alerting module, high
fidelity charting, flexible filtering technology, and a set of
dashboard-specific design components called builders.
WebSphere Dashboard Framework provides the tooling that allows for
the creation of dashboard applications with very little programming
effort. These dashboards can be built and customized very quickly
to suit the exacting needs of the business in a fraction of the
effort usually required with traditional development techniques
while still providing the features and richness to allow the
creation of powerful user interfaces. Figure 1-1 on page 3 is an
example of an application built with WebSphere Dashboard
Framework.
2 Building Composite, Role-Based Dashboards with WebSphere
Dashboard Framework
Figure 1-1 An example WebSphere dashboard application
These dashboards can be deployed to a number of application server
environments whether they are a Java Specification Request 168
(JSR168) portal server, such as WebSphere Portal Server, or a Java
2 Enterprise Edition (J2EE) compliant server, such as WebSphere
Application Server.
Chapter 1. Introduction to IBM WebSphere Dashboard Framework
3
1.2 Features of WebSphere Dashboard Framework
WebSphere Dashboard Framework provides the following
features.
Dashboard builders The product provides a series of reusable
software automation components known as builders. These builders
simplify the creation of applications by allowing the developer to
specify parameters into a wizard-like interface. The builders
automate the most common dashboard design patterns and use cases.
When many builders are used together, complex applications can be
created. The builders can then be reused or profiled to create many
applications in an extremely short amount of time.
An example of a builder is the Web Chart builder that allows the
display of several different types of charts upon specification of
inputs into the builders. This builder can then be reused many
times to create variation or new charts by simply changing the
input parameters into the builder.
Business user configuration and personalization Along with the
builders that are provided with IBM WebSphere Portlet Factory, it
is easy to extend applications to allow business users to change
the configuration of applications that are produced. This allows
the developer to build great flexibility into the application and
provide better value to the user by allowing the user to configure
the application to the user’s exact requirements. This feature is
possible with the base WebSphere Portlet Factory; however, the
WebSphere Dashboard Framework expands this capability by providing
additional high-level builders, such as the Table Customizer
builder discussed in section 4.3.20, “Table Customizer” on page
116.
For example, using the charting example in Figure 1-1 on page 3,
this feature makes it possible to provide the user with the ability
to specify whether the user wants to see the data presented in a
pie graph or a line graph.
High fidelity charting WebSphere Dashboard Framework enables the
creation of dynamic, configurable charts. The product includes
support for a wide range of chart types (for example, Pie,
Dial/Gauge, Bar, and Line) and file formats (for example, SWF, PNG,
JPG, and BMP).
Alerting Alerts are a feature of WebSphere Dashboard Framework that
allows for the configuration of real-time events based on specified
inputs. This allows business users to take actions quickly based on
an event that might be happening within the business. An example of
alerting can be a sales manager who has responsibility for numerous
salespeople who are dispersed around a geography. If one region
within that geography is falling short of its sales target, a
threshold might be crossed that triggers an alert that notifies the
sales manager so that the sales manager can take immediate action.
Instead of hunting through numerous reports, the sales manager is
able to take immediate action and correct the issue in real time,
leading to a better business outcome.
The first piece of functionality that makes up this feature is the
Alerts engine. The engine generates alerts that are based on
configuration thresholds that have been set. The second component
is the administration portlet that allows the administrator to
define and control the alerts. The third component is the My Alerts
portlet, which is one of the methods for alerting the user. This
portlet is configurable based on role and other user
preferences.
4 Building Composite, Role-Based Dashboards with WebSphere
Dashboard Framework
Alerts can also be escalated, for example, if a manager has
received an alert, but the alert has not been addressed for a
predefined amount of time because the manager is out on vacation.
The alert can be escalated to additional people.
Filtering Filtering allows the user to see only the data the user
wants dependent on a value used to filter that data. An example
might be a sales manager who covers many different regions and sees
sales data for all of the sales manager’s regions in the sales
manager’s dashboard. With WebSphere Dashboard Framework, it is
possible to provide the sales manager with a filter that allows the
sales manager to select the southern region data and only see data
that is pertinent to that region. Filtering works cooperatively
with the Dynamic Profiling technology built into WebSphere
Dashboard Framework.
Annotations The new Annotations feature in WebSphere Dashboard
Framework allows users to create, view, and respond to comments on
charts, tables, or table rows. When creating a comment, a user can
specify privacy settings, add one or more attachments, and
dynamically generate alerts notifying selected users of the
comment. All of this can be accomplished by business users within a
very intuitive portlet interface. Also, included within the
Annotations framework is a portlet that allows administrators to
archive or delete comments.
1.3 How WebSphere Dashboard Framework fits into the IBM WebSphere
Portlet Factory architecture
WebSphere Dashboard Framework is one of a family of products that
all accelerate the value of WebSphere Portal. All of these products
dramatically decrease the time to market of creating an application
while still adhering to strong architectural standards, such as a
service-orientated architecture.
IBM Dashboard Accelerator provides flexible tools and a framework
for assembling dynamic dashboards and scorecards, linking strategic
objectives to real-time performance information. With no additional
charge to access a new dashboard key performance indicator (KPI)
catalog, clients can easily download portlets and assemble them
into dashboard applications. For example, a company looking to
quickly deploy a sales dashboard finds relevant portlets, such as
Top Opportunities, Customer List, and Customer Satisfaction already
developed.
Each product uses the preceding product as a foundation for
providing greater functionality as shown in Figure 1-2 on page
6.
Chapter 1. Introduction to IBM WebSphere Dashboard Framework
5
Figure 1-2 How it all fits together
1.3.1 IBM WebSphere Portlet Factory
IBM WebSphere Portlet Factory supercharges WebSphere Portal with
rapid application development (RAD) tools and technology that
accelerate portal deployments by simplifying the creation,
customization, maintenance, and deployment process for portlets.
WebSphere Portlet Factory’s ease-of-use and advanced development
features dramatically streamline the entire portlet development
process, enabling developers to deliver adaptive, robust portlets
in a fraction of the time and at a fraction of the cost it requires
today. WebSphere Portlet Factory is the base product on which the
other products are built. Using WebSphere Portlet Factory, it is
possible to:
Quickly create applications that integrate with existing company
assets, such as IBM Lotus Domino®, SAP®, PeopleSoft®, Siebel®, and
databases to build SOA compliant applications that are
reusable.
Create portlets that are either native WebSphere or JSR168 as well
as standalone Web applications and Web services, without requiring
coding.
Improve the time to market for applications by not only speeding up
the development process but also using the unique profiling
abilities that allow many variations to an application without
duplication.
Several of the new features in Version 6.0.1 of the product
are:
A service-oriented architecture (SOA) entry point that helps make
it easy to deliver SOA-based portal applications
New builders to easily integrate IBM Workplace™ Forms, Portal
Content Repository, and Directory Searching
New enhancements that help developer productivity and success,
including support for refactoring and simplified deployments
Collaboration Enterprise AppsAnalytics
WebSphere Portal Server Shared Services
Collaboration Messaging BPEL/ Workflow
Lotus ActiveInsight Scorecards and Dashboards Dashboard KPI
Catalog
Data Warehouse MS Exchange
Comprehensive Web 2.0 support, including AJAX and REST
See Figure 1-3 for an example of the WebSphere Portlet Factory
tooling. The example below shows generated Java code produced by a
builder within a model.
Figure 1-3 Example WebSphere Portlet Factory application in the
development tool
1.3.2 WebSphere Dashboard Framework
WebSphere Dashboard Framework is built upon WebSphere Portlet
Factory and is the focus of this paper. It has all of the features
outlined in section 1.2, “Features of WebSphere Dashboard
Framework” on page 4 as well as these new features introduced in
the latest version:
Microsoft® Excel® enhanced integration: Enhancements allow for
integration of complex Excel spreadsheets for direct display as
dashboard graphs and tables.
Maps and legends: Easily create geographic maps of data by country,
state, and so forth and add or customize legends to maps, graphs,
and tables.
Open Document Spreadsheet (ODS) export: Support provided to export
directly from dashboard portlets in ODS.
Annotations: New collaborative capability supports making a comment
on the portlet or a row in the table for review by others.
Generated Java CodeAutomated Code Builder
Model
Chapter 1. Introduction to IBM WebSphere Dashboard Framework
7
Figure 1-4 shows an example of a WebSphere Dashboard Framework
application. The example shown is the Banking Dashboard KPI, which
is available for download from:
http://www.lotus.com/dashboardcatalog
1.3.3 Lotus ActiveInsight
IBM Lotus ActiveInsight™, which includes WebSphere Dashboard
Framework, creates a performance management solution that delivers
real-time key performance metrics dynamically to users through
role-based, actionable, intuitive dashboards and scorecards. It
helps improve performance by reaching performance data wherever it
resides and empowering users to collaborate and initiate actions to
address issues at the point they arise.
Lotus ActiveInsight builds upon the features of WebSphere Dashboard
Framework. It provides a prepackaged jump-start dashboard
deployment that includes packages for sales and executives. The
pre-built solution can then be modified to suit the exact needs of
the organization. ActiveInsight has all of the features of
WebSphere Dashboard Framework and also:
Delivers ready to use composite, role-based views of real-time
performance information without the need for development
Provides built-in collaborative services to help rapidly resolve
actual or projected plan exceptions
Reaches performance data wherever it resides while leveraging
existing technology investments by offering powerful integration
tools and a world-class SOA environment
With these features, ActiveInsight allows an organization to
achieve its organizational goals by quickly identifying any problem
areas within the organization.
8 Building Composite, Role-Based Dashboards with WebSphere
Dashboard Framework
Figure 1-5 An example of ActiveInsight
1.4 The benefit to the business
The ability for an organization to have a clear view of key
performance indicators is recognized as a vital contributor to the
performance of any organization. Today, many organizations struggle
with an overwhelming amount of data from various information
systems. Dashboards have been around for a long time. When they
were first introduced, dashboards provided users with information
culled from numerous disparate systems and presented it in one
location. Although useful, the data was static and often became
outdated quickly.
1.4.1 Why a dashboard
Businesses are realizing that many dashboards still have
limitations, such as static data and an inability to react to and
update information in a timely manner. It can be difficult for
businesses to find and consolidate information from disparate
sources within their organizations and to enable dashboards to
provide value beyond the executive level.
For dashboards to have a positive impact on a business, companies
must make them active so the dashboard can empower the business to
measure things that its users can actually affect. In other words,
dashboards need to allow users to view the information that they
need in order to make effective business decisions and to take
appropriate action.
Through active dashboards, businesses can implement an action plan
and assign ownership for each key performance indicator in case
that key performance indicator falls out of its
Chapter 1. Introduction to IBM WebSphere Dashboard Framework
9
target range. An active dashboard also facilitates collaboration,
for example, by enabling users to initiate chat sessions, view
participants’ online or offline status, and send e-mail.
1.4.2 IBM Dashboard Accelerator
The IBM Dashboard Accelerator solution addresses the business
challenges head-on that we listed in section 1.4.1, “Why a
dashboard” on page 9.
With the announcement of IBM Accelerators for WebSphere Portal (see
Figure 1-6), IBM offers integrated packages that easily snap onto
the Portal to help deliver business value and faster time-to-value
by addressing specific project needs.
This includes IBM Dashboard Accelerator and its real-time, active,
performance dashboards. The IBM Dashboard Accelerator includes the
following components:
Lotus ActiveInsight
Software that helps organizations to define and communicate goals,
view real-time metrics, and take action through composite,
role-based dashboards and scorecards. ActiveInsight includes both a
pre-built scorecard application, as well as WebSphere Dashboard
Framework RAD tooling.
IBM WebSphere Dashboard Framework
Flexible tools and a framework for building dynamic dashboards and
scorecards that link strategic objectives to real-time performance
information.
Dashboard KPI Catalog
Available as a branch of the WebSphere Portal catalog, this
component contains portlets that represent industry vertical or
horizontal best practice KPIs. With access to this catalog, clients
can easily download portlets and then quickly assemble them into
meaningful dashboard applications. This catalog is available for no
charge to Lotus ActiveInsight and WebSphere Dashboard Framework
clients. See:
http://www.lotus.com/dashboardcatalog
Figure 1-6 IBM Dashboard Accelerator
1.4.3 Why WebSphere Dashboard Framework
WebSphere Dashboard Framework benefits an organization by
addressing all of the key points discussed in 1.4.1, “Why a
dashboard” on page 9.
Collaboration
Dashboards
Self-service
Facilitate improved decision-making with consolidated, timely data
With WebSphere Dashboard Framework, in conjunction with IBM
WebSphere Portlet Factory, you can easily consolidate data and
processes from multiple back-end systems into unified dashboard
solutions with a consistent and intuitive interface. Dashboards
built with WebSphere Dashboard Framework can access data from both
historical and operational data sources, including spreadsheets,
data warehouses, enterprise applications (SAP, PeopleSoft, Siebel,
and IBM Lotus Domino), and Web services. By having access to
information in a timely and dynamic manner, business users can make
better informed decisions that can result in improvements in
overall business performance.
Speed up problem resolution by enabling action from the dashboard
Unlike traditional dashboards, which are often nothing more than
relatively static electronic reports, dashboards powered by
WebSphere Dashboard Framework facilitate problem resolution by
enabling action right from the dashboard. If the dashboard
illuminates a potential problem or opportunity, business users can
quickly react without having to pick up the phone or jump to one or
more different systems. Supported actions include the ability to
collaborate, kick off workflows, update data within back-end
systems, and dynamically create new alerts, all from within the
dashboard interface.
Help improve employee productivity through tailored information and
alerts With WebSphere Dashboard Framework and WebSphere Portlet
Factory technology, your company can dynamically generate highly
tailored, role-based dashboards that display the proper
functionality, alerts, and data to meet users’ specific needs and
requirements. As a result, you can avoid the high maintenance costs
and scalability challenges that people typically face when creating
customized dashboards by using traditional techniques.
Leverage existing infrastructures with standards-based tooling
WebSphere Dashboard Framework was built from the ground up to
support the creation of dashboards that are based on a
service-oriented architecture (SOA) and adhere to open standards,
including J2EE, XML, and JSR168. In addition, because WebSphere
Dashboard Framework provides native support for the market-leading
WebSphere Portal, you can quickly deploy dashboards that leverage
the powerful services inherent in the portal, including built-in
collaboration, workflow, single sign-on, portlet communication, and
user group management.
Increase dashboard flexibility by enabling user configuration
WebSphere Dashboard Framework provides the ability to very easily
create robust, browser-based configuration wizards that enable
nontechnical users to dynamically personalize and configure their
dashboard portlets without having to involve your IT department.
Users can change any aspect of the portlet that was exposed by IT
when setting up the basic configuration, which can include the
thresholds, the data fields to display, and the format of the data
(for example, the type of chart). This capability to extend portlet
configuration to business users helps to increase the flexibility
of your dashboards while reducing IT maintenance costs.
Chapter 1. Introduction to IBM WebSphere Dashboard Framework
11
1.5 The example application
Throughout this IBM Redpaper, we provide an application that gives
you concrete examples that you can reference at any time. See
Figure 1-7 on page 13. You can find instructions for how to
download and install the example application in Appendix A,
“Additional material” on page 205. Chapter 2, “Overview of portlet
creation” on page 15 walks you step-by-step through creating your
first WebSphere Dashboard Framework application; however, the
remaining chapters in the book discuss the features of WebSphere
Dashboard Framework in greater depth. The example application in
this IBM Redpaper is provided as a reference for these later
chapters.
The example application used throughout this IBM Redpaper is based
on a fictitious sales organization. The company is a worldwide
global sales organization operating in the American, Asian, and
European regions. The company has a sales manager for each of the
regions as well as a global sales manager. The organization has
several business challenges:
Information contained within different systems
They have data stored in Domino and DB2® as well as information in
Microsoft Excel, which makes it difficult to pull the data together
into a coherent set of business data.
No single view of key sales data
The sales team often has to refer to different reports from various
systems, which occasionally leads to reports being missed in key
review meetings.
No role-based reporting
Everyone within sales sees all of the data for all of the regions,
which makes it difficult for the regional managers to focus on
their data only.
Data is difficult to interpret
All data is presented in reports that are native to the systems in
use. This means that there is no graphical representation of the
data, which leads to mistakes interpreting the data.
No effective way to collaborate on the sales data
The team is spread out in many time zones and does not have a way
to effectively communicate about the sales data within the context
that they view it.
No real-time notification of important issues
Certain systems produce reports monthly, so the sales force is only
alerted to issues once a month. The sales force needs earlier
notification in order to act earlier in the sales cycle on these
issues.
The organization chose WebSphere Dashboard Framework to address
these issues. Throughout Chapters 3 to 7, we explain the key
builders that the developers used to create the example
application, as shown in Figure 1-7 on page 13, and explain the
concepts that were used to solve these business issues.
The example application is available for you to install with all of
the source code that we used. It might be beneficial to install the
application and refer to it as you read the chapters.
12 Building Composite, Role-Based Dashboards with WebSphere
Dashboard Framework
Figure 1-7 The example application
1.5.1 Technology used
We, the authors of this IBM Redpaper, used the following
technologies to create the example application:
WebSphere Dashboard Framework 6.0 Eclipse Software Developers Kit
(SDK) 3.2 WebSphere Portal Server 6.0.1 IBM DB2 V9.1 Lotus Domino
8.0 Beta 2 Microsoft Excel 2002 Service Pack 3
Chapter 1. Introduction to IBM WebSphere Dashboard Framework
13
1.6 Audience and goals of this IBM Redpaper
This IBM Redpaper aims to provide relevant information to a wide
variety of users. In the first few chapters, we provide information
that is beneficial to an audience that might consider implementing
WebSphere Dashboard Framework in their organization. Executives,
Line of Business managers, and users can gain a high-level
understanding of the features and functionality provided by the
framework.
In the later chapters, we provide an in-depth look into specific
areas of the technology. These chapters are targeted toward the
implementers of the technology. You will discover the technology is
an easy to use modeling framework that lends itself toward script
developers or people who want to develop applications but do not
wish to learn an in-depth programming language. It is also an aim
of this IBM Redpaper to appeal to programmers and help them
understand the simplicity and power of the product.
After reading this IBM Redpaper, we hope you:
Understand the features and functionality of WebSphere Dashboard
Framework
Understand the value of a dashboard and the use of a
framework
Are able to use and understand the various dashboard builders
Get an understanding of best practices for building dashboards with
WebSphere Dashboard Framework
1.6.1 Skills required
WebSphere Dashboard Framework is a rapid development environment
that is a code generator. The code generated is J2EE compliant, but
you do not necessarily need to know J2EE, because WebSphere
Dashboard Framework generates the code. The primary skills you need
to get the most from this IBM Redpaper are:
An understanding of application development methodologies
Familiarity with WebSphere Portal administration
It is beneficial but not mandatory to understand:
J2EE development
XML
Chapter 2. Overview of portlet creation
This chapter provides information to help you create applications
with WebSphere Dashboard Framework. We outline how to get the
product installed and then how to create your first portlet with
WebSphere Dashboard Framework. We also discuss the various
development options and provide guidance about the most productive
ways to work with WebSphere Dashboard Framework. This chapter is an
introduction to WebSphere Dashboard Framework and is intended for
the developer, who is not familiar with the product or
Eclipse.
This chapter contains the following sections:
Installing WebSphere Dashboard Framework
Developing your first portlet using the framework
Deploying to other environments
2.1 Installing WebSphere Dashboard Framework
This section describes the procedure to install WebSphere Dashboard
Framework and its available options.
2.1.1 Planning the installation
There are three options when you install the tooling. The option
that you choose depends on your circumstances. The options
are:
Install into Rational® Application Developer
This is an excellent option if you want to continue using the
features that Rational Application Developer offers with WebSphere
Dashboard Framework. You can install into either Version 6 or 7 of
Rational Application Developer. You can also use Rational Software
Architect and Rational Web Developer.
Install into Eclipse
Because the tooling for WebSphere Dashboard Framework is a set of
Eclipse plug-ins and features, you can install into an existing
installation of Eclipse. The supported versions for WebSphere
Dashboard Framework 6.0 are Eclipse 3.1 and 3.2 (SDK versions
only).
Install with Eclipse
Provided with WebSphere Dashboard Framework is Version 3.2 of
Eclipse SDK, which allows you to install it along with WebSphere
Dashboard Framework.
For the purpose of this IBM Redpaper, we chose to install WebSphere
Dashboard Framework along with Eclipse as part of the installation.
The rest of this section explains how we performed that
installation.
2.1.2 Installing WebSphere Dashboard Framework with Eclipse
The installation process is straightforward:
1. To begin, select install.bat from your installation source.
After the installation splash window displays, select your desired
language and click OK. Then the Introduction window appears as
shown in Figure 2-1 on page 17.
16 Building Composite, Role-Based Dashboards with WebSphere
Dashboard Framework
Figure 2-1 WebSphere Dashboard Framework Introduction page
2. Accept the license agreement and click Next. The following
window lets you specify the location where you want to install the
WebSphere Dashboard Framework as shown in Figure 2-2.
Figure 2-2 Selecting the file location for the installation
3. Next, select whether you want to use an existing Eclipse
installation, existing Rational Application Developer, or install
Eclipse along with WebSphere Dashboard Framework. In this example,
we install along with Eclipse as shown in Figure 2-3 on page 18.
Click Next.
Chapter 2. Overview of portlet creation 17
Figure 2-3 Selecting the items to install
4. If you install with Eclipse, the next window asks you to specify
where you want to install Eclipse. After that, a summary window
appears. Review that window and select Install. After just a few
minutes, you get a confirmation window where you can select
Done.
To launch WebSphere Dashboard Framework, start your Eclipse
installation. On a Windows® machine, you start eclipse.exe from
wherever you installed Eclipse. After Eclipse is running, click
Window → Open Perspective → Other and select the WebSphere Portlet
Factory perspective as shown in Figure 2-4 on page 19.
18 Building Composite, Role-Based Dashboards with WebSphere
Dashboard Framework
Figure 2-4 Selecting the WebSphere Portlet Factory
perspective
After the WebSphere Portlet Factory perspective opens, you are
ready to work with WebSphere Dashboard Framework.
2.1.3 Notes about installing into Rational Products
Another method is to install WebSphere Dashboard Framework with
Eclipse and then add the WebSphere Dashboard Framework directory as
an extension point in Rational Application Developer. To do this in
Rational Application Developer, go to Help → Software Updates →
Manage Configurations. When you are in the Product Configuration
window, click Add an
Important: Occasionally, the WebSphere Dashboard Framework
installer does not recognize the installation location of Rational
Application Developer. This situation is described in TechNote
1257267 at:
http://www-1.ibm.com/support/docview.wss?rs=3062&context=SS3LP9&context=SSRUWN&
q1=rational&uid=swg21257267&loc=en_US&cs=utf-8&lang=en
The solution is to instead indicate that you want to install
WebSphere Dashboard Framework into an existing Eclipse installation
and then point it to the Eclipse instance that Rational Application
Developer uses (for example, C:\Program Files\IBM\SDP70).
Chapter 2. Overview of portlet creation 19
Figure 2-5 Selecting WebSphere Dashboard Framework as an extension
point in Rational Application Developer 7
2.2 WebSphere Dashboard Frameworks concepts
In this section, we briefly look at the key concepts behind
WebSphere Dashboard Framework. WebSphere Dashboard Framework is an
extension of WebSphere Portlet Factory; all of the same concepts
apply.
2.2.1 Accessing Help
The product Help documentation is an excellent place to start.
WebSphere Dashboard Framework takes advantage of the Eclipse Help
system that is built in the Integrated Development Environment
(IDE). To get to the Help from Eclipse, go to Help → Help Contents
to see a list of books in the left navigator bar.
20 Building Composite, Role-Based Dashboards with WebSphere
Dashboard Framework
There are two particular books that are relevant to this
product:
WebSphere Portlet Factory
This book describes all of the key concepts of the products as well
as the base builders in the product, such as Domino Data Access
builder and the AJAX builders. In the WebSphere Portlet Factory
Help book, there is a section Reference → Builder Call Help, which
is especially useful for accessing Help regarding the inputs for
well over 100 builders.
WebSphere Dashboard Framework
This book discusses the specific features of WebSphere Dashboard
Framework. There are excellent samples and tutorials listed in the
Help and the Dashboard builder catalog is especially useful.
Another way to use the Help function is when you are within a
builder, press F1 to bring up the Help for that builder in context
on the right. This is an excellent way to learn exactly which
inputs are required for the builder with which you are currently
working.
2.2.2 WebSphere Portlet Factory concepts
Portlets created with the WebSphere Portlet Factory follow a
standard Java 2 Enterprise Edition (J2EE) model-view-controller
design. In order to simplify the task of writing custom portlet
Java and JavaServer™ Pages™ (JSP™) code, WebSphere Portlet Factory
introduces the developer to a few key objects to use to create a
portlet application:
Builders
A builder is the core building block that automates design and
development tasks performed by developers. Simply put, a builder is
a collection of Java classes and XML documents that represents a
specific pattern or high-level component of a Web application. A
builder provides a wizard-like user interface (UI) for gathering
configuration information from the developer, as well as the code
for rendering the pattern or context-aware elements within the Web
application. A simple builder might add a button to a JSP page,
while another builder might render a Domino view. Builders can
analyze the application and perform tasks in the context of what
previous builders have created. For example, a page navigation
control builder can reference a set of JSP pages and create a set
of navigational controls relevant to the context of those pages. If
a page changes, then the navigational controls update automatically
in a ripple effect that can cascade through the entire
application.
Models
A model is a sequenced collection of builders that generates the
application components representing the behavior, structure, data,
and presentation of the portlet application. Internally, a model is
simply an XML file containing a series of calls to builders. Each
model can be turned into a portlet or can be run as a standalone
J2EE application.
Profiles
A profile contains a set of inputs that varies the way a portlet
behaves. Profile settings can be edited after a portlet is deployed
by clicking the configuration icon for the portlet. A profile feeds
values into builders based on user identity or other contextual
information (such as the day of the week). Using profiles, you can
automatically generate different variations of a generic portlet
(from the same model) for different users or situations. Configured
profiles are extremely easy to implement with WebSphere Portlet
Factory.
Regeneration
When a model is regenerated, each builder in the model executes in
sequence and creates pieces of your portlet, such as JSP pages or
Java methods. During regeneration,
Chapter 2. Overview of portlet creation 21
profiles can feed different inputs to builders based on the user or
situation, automatically creating custom portlets dynamically or
“on the fly.” There is a negligible performance impact associated
with regeneration. Less than one percent of the total processing
resources in a typical “regen-enabled” execution environment are
spent performing regeneration, because generated objects are cached
at optimal levels of granularity, as are sessions. Figure 2-6 is a
representation of WebSphere Dashboard Framework concepts.
Figure 2-6 Dashboard Framework concepts
2.3 Creating a WebSphere Dashboard Framework project
The first step in any WebSphere Dashboard Framework application is
to create the project within your chosen IDE. Here again, you have
a couple of choices about how you want to set up the testing of the
applications created in your IDE. There are a couple of choices
depending on your environment:
Deploy for testing to a local WebSphere Portal server
If you have an instance of WebSphere Portal on your local machine,
you have the option to deploy and test straight to that
instance.
Deploy for testing to a remote WebSphere Portal server
If you do not have the resources to run a WebSphere Portal server
locally, you can configure your IDE to use the remote WebSphere
Portal by mapping a drive to that server.
Builder
Profile
Model
22 Building Composite, Role-Based Dashboards with WebSphere
Dashboard Framework
The following steps create your first WebSphere Dashboard Framework
project using a local WebSphere Portal server as the unit test
server. At this point, we keep it simple, but when you become more
advanced, you configure your environment for features, such as
alerts and annotations. Refer either to the Help or following
chapters if you want to set up these features now.
2.3.1 Step one: Setting the project name
First, ensure that you are in the WebSphere Portlet Factory
perspective by checking the title bar of your IDE. The title bar
shows something similar to WebSphere Portlet Factory - Eclipse SDK.
If you are not in that perspective, click Windows → Open
Perspective → Other and then select WebSphere Portlet
Factory.
Next, select File → New → WebSphere Portlet Factory Project. This
launches the project creation wizard. Give your project a name. In
the case shown in Figure 2-7 on page 24, we call our project
Sales.
Tip: We, the authors of this IBM Redpaper, found it much more
productive to test to a local WebSphere Portal environment rather
than a remote server.
Tip: You can also just right-click in the Project Explorer view and
select New from there or Shift+Alt+N on a Windows machine.
Chapter 2. Overview of portlet creation 23
Figure 2-7 Entering a name for your project
2.3.2 Step two: Selecting the feature set
After you select Next, the dialog appears for you to select the
feature sets that you want to have in your project. By default, all
of the basic WebSphere Portlet Factory builders, which include all
of the builders that you require to do tasks, such as SQL calls,
are there for you to use.
The dialog allows you to add additional functionality to your
project, including:
Charting
WebSphere Dashboard Framework includes a license of the GreenPoint
Web Charting engine for producing high fidelity charting. This
includes charts such as pie and bar types. You can also select this
option under the WebSphere Dashboard Framework category.
Dojo Ajax
These builders automate the task of creating Dojo Ajax components.
Dojo Ajax is an open source project that is a framework for
creating intuitive and attractive user interfaces. See:
http://www.dojotoolkit.org/
– Dojo Drag and Drop Source and Target builder
24 Building Composite, Role-Based Dashboards with WebSphere
Dashboard Framework
Integration Extensions
These integration extensions allow integration into a great number
of data sources that you might have within your organization. You
can then leverage that data to build components. These builders
include:
– Content Model Extension
– Workplace Forms™ Extension
National Language Extension
These builders allow you to create applications that can support
multiple languages and locales.
Tutorials and Samples
WebSphere Portlet Factory includes a number of sample applications.
This is a great way to learn the functionality that is included
within the product. Selecting this feature installs the samples and
tutorials as outlined and documented in the product Help.
WebSphere Dashboard Framework
These features make up the core of the WebSphere Dashboard
Framework and include:
– Alerts Module contains builders for alerts. See “Features of
WebSphere Dashboard Framework” on page 4.
– Alerts Module Example shows you how to incorporate the alerting
module.
– Alerts Scheduler consists of builders to enable the alerting
scheduler.
– Dashboard Framework includes builders that form the basis of the
framework. See Chapter 4, “Displaying data” on page 79.
– GreenPoint Web Charts contain builders to create high fidelity
charting.
– Sample Applications are available, which are documented in the
Help files.
– Tutorial solutions are documented in the Help files.
Note: While the Dojo builders are really part of the base WebSphere
Portlet Factory product and beyond the scope of this IBM Redpaper,
these builders are really useful in creating a fantastic user
interface and we encourage you to explore this great
functionality.
Note: The best practice is to only select the Feature Sets that you
require for your application. This helps reduce the size of the Web
archive (WAR) file that needs to be deployed and generally makes
building and deploying your project much faster.
Chapter 2. Overview of portlet creation 25
In the example application that we build in the next section, we
import an Excel spreadsheet and develop a graph from that data. As
shown in Figure 2-8, the feature sets required are the Excel
Integration Extension, GreenPoint Web Chart, and the Dashboard
Framework.
Figure 2-8 Selecting the Feature Sets for the project
2.3.3 Step three: Java settings
In this dialog in Figure 2-9 on page 27, you can set any additional
Java settings, such as adding any additional JAR files or
classpaths that you need. Generally, we find there is nothing to
change in this dialog when working with WebSphere Dashboard
Framework, which is the case in this example, so simply click
Next.
26 Building Composite, Role-Based Dashboards with WebSphere
Dashboard Framework
Figure 2-9 Dialog for Java Settings
2.3.4 Step four: Deployment configuration
There are two parts to this step of the wizard. This step allows
you to set up your test environment for this project.
Application server deployment configuration It is possible to
create applications using WebSphere Dashboard Framework purely to
run on a J2EE server without WebSphere Portal. If you just wanted
to deploy to a J2EE server, this section allows that configuration.
If you develop applications for a WebSphere Portal environment, it
is also a lot quicker during the initial building of an application
to test on the application server rather than deploy to a full
WebSphere Portal server after each iteration of your development.
After you have the component built and then require the features of
WebSphere Portal Server, such as inter-portlet communication, you
can then test your work on the WebSphere Portal server.
To configure the Application Server, click Add. After the New
Deployment Configuration window displays, give your configuration a
name and description and specify the server type as shown in Figure
2-10 on page 29. For all examples in this IBM Redpaper, we use
WebSphere Portal Version 6.0.1 and Version 6.0.17 for the WebSphere
Application Server on which the Portal runs.
Chapter 2. Overview of portlet creation 27
After we selected WebSphere Application Server 6.x, the wizard
presents us with a list of configuration inputs:
– Installed Applications Dir
This is the full path to the directory where applications are
installed on the application server. For WebSphere Application
Server, this is the directory, including the cell name, underneath
the profile where your applications are deployed. In our case,
which was a standard portal installation, it is:
C:\IBM\WebSphere\profiles\wp_profile\installedApps\IBM-L
– Server Host
This is the host name where your application server is installed.
In our case, it is localhost.
– Server Port
This is the port on which your application server is listening. In
our case, this is the default port of 10038.
– Auto Deploy
Because WebSphere Dashboard Framework is an extremely rapid
application development environment, it is extremely useful to have
the tool automatically deploy your application so that you can see
how your changes affect your component immediately. By checking
automatic deployment, the tool deploys your changes as soon as you
save your component.
– WebSphere Application Server for deployment
With Auto Deploy enabled, this is the WebSphere Application Server
where the changes are deployed. In our case, it is
WebSphere_Portal.
– Admin User
This is the administrator user for your WebSphere Application
Server.
– Admin Password
This is the administrator password for your WebSphere Application
Server.
After you complete all the inputs and select Test Server
Connection, ensure that you get the “Test connection succeeded”
message. Figure 2-10 on page 29 shows the inputs that we
used.
Tip: If you have a locally installed WebSphere Portal server, it is
useful to select WebSphere_Portal instead of server1; therefore,
you do not have to start server1 as well as WebSphere Portal on
your local machine.
28 Building Composite, Role-Based Dashboards with WebSphere
Dashboard Framework
Figure 2-10 Inputs for the application server configuration
WebSphere Portal server deployment configuration Configuring the
WebSphere Portal server is very similar to the application server.
After you click Add, the wizard presents you with the New
Deployment Configuration window.
The configuration inputs for portal are:
Portlet API
This allows you to create portlets to either the native WebSphere
Portal API or the standards-based Java Specification Request (JSR)
168 API. Unless you have a really good reason to use native API, we
recommend that you use the Java Standard.
WP Root
This is the path on the file system to the root of your WebSphere
Portal server. If you are planning to use a remote portal server,
you need to map a drive to the file system on the remote
server.
Auto Deploy
This automatically deploys the changes, which you make to your
component, to the WebSphere Portal server. Enabling Auto Deploy can
really boost developer productivity.
JRE™ Home
When WebSphere Dashboard Framework deploys the required components
to the WebSphere Portal server, it uses tools, such as XML Access,
that you do not see. To do
Important: If you plan to use alerting, you must use the WebSphere
Portal API for the scheduler project, because it contains features
that are required by alerts that the JSR standard does not
currently have. See Chapter 6, “Alerts” on page 147 for more
details.
Chapter 2. Overview of portlet creation 29
this successfully, the tooling requires a Java Runtime Environment
(JRE). This input needs to point to the bin directory of the JRE
that you want to use.
Admin URL
This is the full URL to the configuration interface of your
WebSphere Portal server. Use the default value as a guide and
change the server name as needed.
Admin User
This is the administrative user for the WebSphere Portal
server.
Admin Password
This is the password for the administrative user for the WebSphere
Portal server.
After you complete the inputs, click Test Server Connection to
ensure that you get the “Test connection succeeded” message.
Figure 2-11 displays the inputs that we used in our configuration
where the WebSphere Portal server was local to the tooling.
Figure 2-11 Inputs for the WebSphere Portal server
configurations
2.3.5 Step five: Completion
After you click Finish, the tooling creates your project. Along the
way, it asks for a few inputs.
Important: To get the most out of the tooling, it is important that
the server configuration functions correctly. If you have issues,
spending time here to get the issues sorted saves a lot of time and
frustration as you move forward with the tool.
30 Building Composite, Role-Based Dashboards with WebSphere
Dashboard Framework
First, the tooling asks if you want to add the jars to your
project. The features that you selected influence how many jars
need to be added to your project. Just select Yes when presented
with the dialog to automatically have the jars added.
Next, the tooling asks if you want to deploy the project now if you
selected to automatically deploy. This deploys the necessary
artifacts to the WebSphere Application server and the WebSphere
Portal server to save time later. To deploy now, just select
Yes.
After the questions are complete, the readme files display. You can
read these readme files and then close them. Now, you are ready to
create applications with WebSphere Dashboard Framework.
2.4 Developing your first portlet using the framework
After you create a project, the next step is to develop a
component. This section guides you through developing your first
component with WebSphere Dashboard Framework and helps you become
familiar with the tooling.
This application is fairly simple with effective results as
displayed in Figure 2-12. We take a common business tool, a
Microsoft Excel spreadsheet, and add value to the data contained
within the spreadsheet by adding a graph and status indicators to
the data. We describe more complex components later in this IBM
Redpaper.
Figure 2-12 Finished application
2.4.1 Step one: Add a model to the project
The first thing is to create a model, which is a container for
holding all of our builders for this component. To add a new model,
first ensure that you are in the WebSphere Portlet Factory
perspective, then select File → New → WebSphere Portlet Factory
Model, which starts the model creation wizard. Ensure that your
project is highlighted. In our case, it is the Sales project, and
click Next.
Chapter 2. Overview of portlet creation 31
The next step in the model creation wizard gives you the option of
starting with preconfigured models to use as starting points. In
our case, we start from scratch. So, we highlight the Empty model
as shown in Figure 2-13 and click Next.
Figure 2-13 Selecting the Empty model
Next, give your model a name. In our case, we call our model
SalesActuals and click Next to create the model.
2.4.2 Step two: Exploring your model and the tooling
If you are in the WebSphere Portlet Factory perspective within your
IDE, you have an interface similar to Figure 2-14 on page 33.
Tip: The name that you give your model must be a valid Java class
identifier:
All names must begin with a letter of the alphabet, an underscore,
or a dollar sign ($).
After the initial letter, the name can contain letters and numbers
but no spaces or special characters.
The name can be any length, but long names are discouraged.
Names are case sensitive.
You cannot use a Java keyword.
The tooling warns you if you choose a name that breaks these
rules.
32 Building Composite, Role-Based Dashboards with WebSphere
Dashboard Framework
There are four areas to the user interface:
Project Explorer View Model Editor View Outline View Other
Views
Figure 2-14 Major areas of the user interface
2.4.3 Project Explorer View
Just like any other perspective, this view is used to navigate
around the artifacts that together make up the project. There are
many artifacts with which you become familiar, such as properties
files and configuration files, but they are out of the scope of
this section of the IBM Redpaper.
After you create a model (in 2.4.4, “Step three: Adding the Excel
data source to the builder” on page 35), this is the view where you
can find and open that model. The default location for your model
is <ProjectName>/WebContent/WEB-INF/models, so in our case,
the location is Sales/WebContent/WEB-INF/models.
Starting with Version 6.0 of WebSphere Dashboard Framework, there
is a simple shortcut that you can use to locate models. You can
locate models in <ProjectName>/models, which makes using the
tooling even simpler. You can edit your model in either place,
because they are exact copies of each other.
Model Editor View
Chapter 2. Overview of portlet creation 33
Model Editor View This is the view where you add the inputs to your
builders and see the results of the generation process. At the
bottom of the view, you notice four tabs:
WebApp Tree
This is where you can view the application and the code that is
generated. This interface is informational only and cannot be
edited.
Model XML
Here you can inspect all of the XML artifacts produced by the
model. This interface is informational only and cannot be
edited.
Builder Call Editor
This is the main interface to the builders that make up the model.
Here, you can have multiple builders open and enter the inputs into
each of those builders.
WebApp Diagram
This is a graphical representation of the page flow of the model.
This display can be useful for understanding how the pages relate
to each other. This illustration is informational and cannot be
edited, but you can double-click on an object to go to the builder
that represents that object.
Outline View The outline view shows the list of builders that you
have in this model. This is also the area in which you add builders
to the model. Across the top of the view, there are five icons. The
two icons on the right are standard minimize and maximize icons.
The other three icons are:
Generate the Current Model button
This icon allows you at any time to regenerate the code that your
model represents. This is useful when the inputs in one builder
rely on the output of other builders.
Add a builder button
Clicking this icon allows you to add builders to your model.
Drop-down menu builder button
This icon provides a list of useful tools for working with your
model, such as insert, sorting, and filtering.
Figure 2-15 on page 35 shows the location of these icons.
34 Building Composite, Role-Based Dashboards with WebSphere
Dashboard Framework
Figure 2-15 Location of the builder buttons
2.4.4 Step three: Adding the Excel data source to the builder
The first step is to import the Excel spreadsheet that you want to
use into the project.
In the Project Explorer View, highlight the
Sales\WebContent\WEB-INF directory. Right-click and select Import →
Import as shown in Figure 2-16 on page 36.
Generate Current Model
Drop- Down Menu
Add a Builder
Requirement: The imported Excel workbook must be in the .XLS
format. It must have been created using Microsoft Excel Versions 97
through 2003.
Chapter 2. Overview of portlet creation 35
Figure 2-16 Importing into the project
In the General category of the select dialog, select the file
system and select Next. In the next window, browse to the location
of your .xls, select it, and click Finish.
Now, we are ready to add a builder to the project. Select the add
builder button (refer to “Outline View” on page 34) and the Builder
Palette displays as shown in Figure 2-17 on page 37.
There are two ways to navigate through the Builder Palette. The
first way is the All category, which displays a list of all of the
builders available to the project highlighted in the box on the
right. If you highlight the first entry on the right and press the
E key, you see all of the builders that start with the letter
“E”.
The second method is to display a reduced set of builders on the
right depending on the category that you choose on the left.
36 Building Composite, Role-Based Dashboards with WebSphere
Dashboard Framework
Figure 2-17 The Builder Palette
Select the Excel Import builder and click OK.
The builder then shows in the model editor view of your IDE. Now,
we need to complete the inputs for this builder:
Name: Enter SalesSpreadsheet.
File to Import: Use the ellipses (...) button at the end of the
field. In the choose reference dialog, select choose file, expand
the WEB-INF directory, and select the Excel spreadsheet that you
just imported.
Generate Schema: Ensure that On Design Regen is selected.
Content Selection Method: Select Automatic (let builder find the
content).
Sheet: Select Sheet1.
Has Header Row: Ensure this is checked.
Preserve Empty Rows: Ensure this is unchecked.
Preserve Cell Formatting: Ensure this is unchecked.
At the completion of this step, your builder looks similar to
Figure 2-18 on page 38. After you specify all of the inputs, click
OK.
Important: Do not use spaces in your builder names.
Tip: At any time within a builder, you can select F1 to get
contextual Help.
Chapter 2. Overview of portlet creation 37
Figure 2-18 Finished Excel Import builder
2.4.5 Step four: Displaying data
To display data from the Excel spreadsheet, we use one of the
WebSphere Dashboard Framework builders called the Summary and
Drilldown builder. We keep it simple at this stage, but for more
information, see Chapter 4, “Displaying data” on page 79.
To add the Summary and Drilldown builder, click the Add builder
button from the outline view and select Summary and Drilldown from
the list of available builders.
Complete the following inputs.
Under the Properties section of the builder, complete the following
inputs. See Figure 2-19 for the completed properties:
Name: Give your builder a name. In our case, it is
displayData.
Initialization Action: Click the ellipses (...) button at the end
of the field, and from the resulting dialog, select DataServices →
SalesSpreadsheet → execute.
Figure 2-19 Under the Properties section
Next, under the Summary Chart Properties section, we need to tell
the builder what to display in the graph. See Figure 2-20 on page
39 for the completed inputs.
38 Building Composite, Role-Based Dashboards with WebSphere
Dashboard Framework
Complete the following inputs:
Column for X-Axis: From the drop-down list, select Region.
Column Selection: Not all of the information in the spreadsheet
makes sense in a graph, so change this to Include Specific
Columns.
Column for Y-Axis: To select the specific columns, click on the
field, and a drop-down list appears. Select Forecast_Sales and in
the field below, select Actual_Sales.
Figure 2-20 Completing the Summary Chart Properties section
2.4.6 Step five: Running the model
First, you test the model.
Testing a model With just these few inputs, it is now possible to
run the model. To test a model, select Run → Run. The Create,
manage, and run configurations window appea