Data Viewer : Mashup Center 2.0Added by IBM on November 20, 2009 | Version 1 (Original)
Contents: Creating mashups : Mashup Center 2.0
The Data Viewer
widget organizes and displays content in a table. It can display data from an RSS, Atom, or JSON array-formatted feed from the catalog or internet, or from a file that contains data in comma-separated value (CSV) format. You can wire the Data Viewer
widget to send content to other widgets in your mashup, or you can wire it to receive content from other widgets.
The Data Viewer
widget is designed to display structured, non-nested feed data only. This widget will not display content feeds properly. To display content feed, use the Feed Reader
or Nested Data Viewer
Here is a simple example of CSV data in a file:
To download a sample file of CSV data, download vegetablesv20txt
When configuring the Data Viewer
widget, you can do the following actions:
- Limit the number of rows in the table to accommodate the amount of data you are displaying.
- Select a custom style for the table by adding a title and setting font properties for the title, header, and table.
- Add column and row lines.
- Specify colors for odd and even rows to add more visual cues.
- Configure the table to highlight or filter rows when column values meet a specific criterion.
- Customize messages for the end user.
See the following table to learn which events the Data Viewer
widget can send and receive:
Table 1. Events for the Data Viewer widget
|Table as URL (ATOM): sends an Atom feed URL from the catalog. This is the URL that points to the data that is currently being displayed in the widget. ||Table using URL (ATOM): receives and displays the content from the URL of an Atom feed in the catalog.|
|Table as URL (Table): sends the URL of the CSV file that contains the data. This is the URL that points to the data in the CSV file that is currently being displayed in the widget.||Table using JSON: receives data in a JSON array format. |
|Table as Table: sends data in a table payload format.||Table using Table: receives and displays data in a table format. |
|Row as Text: sends data from the selected row in CSV format. ||Table using URL (Table): receives and displays the content from the URL of a file that contains data in CSV format.|
|Row as Table: sends data from the selected row in a table format. |
|Cell as Table: sends data from the selected cell in a table format. |
|Cell as Text: sends data from the selected cell.|
|(Column name) as Text: sends data from the selected row in this column. |
: Display customer data from a feed in the catalog.
- Hover your cursor over the Data Viewer widget, and click the menu options icon .
- In the Data Selection section, click Browse to open the mashup catalog.
- In the search field, typeMyCo Customer list. When it displays in the window, click it so that it is selected.
- Click Done.
- In the configuration window, change any other settings you want. For example, you can select which rows and columns you want to display, change the appearance, filter the data, and customize messages for end users.
- Click Save to close the configuration window.
Now the customer data in the MyCo Customer list
feed displays as a table in the Data Viewer
Parent topic: Widget reference : Mashup Center 2.0