The Data Viewer
widget organizes and displays content in a table. It can display data from an Atom feed from IBM InfoSphere MashupHub 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.
Here is a simple example of CSV data in a file:
When configuring the Data Viewer widget, you can limit the number of rows in the table to accommodate the amount of data you are displaying. You can also select a custom style for the table by adding a title and setting font properties. For more sophisticated types of content, you can configure the table to highlight or filter rows when column values meet a specific criterion.
See the following table to learn which events the Data Viewer widget can send and receive:
- 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 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 as Table - sends data in a table payload format.
- Row as Text - sends data from the selected row 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.
- Table using URL (ATOM)- receives and displays the content from the URL of an Atom feed in the catalog.
- Table using JSON - receives data in a JSON array format.
- Table using Table - receives and displays data in a table format.
- Table using URL (Table) - receives and displays the content from the URL of a file that contains data in CSV format.
Display customer data from a spreadsheet in a table.
- In the catalog, click List Feeds.
- Hover your cursor over the MyCo Customer list feed, and click View Details.
- At the top of the Details window, copy the URL of the feed to your clipboard.
- Switch over to the Lotus Mashups browser.
- Drag the Data Viewer widget onto the page.
- Hover your cursor over the Data Viewer widget, and click the menu option icon .
- Click Edit Settings to open the configuration window.
- In the URL to CSV data or Atom feed field, paste the feed URL, and click Load. Notice how the widget recognizes the columns headers in the feed.
- 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 widget.