The Data Editor
widget uses common operations such as sort, filter, and limit to transform content received from one widget into outgoing content to be sent to a second widget. Using the Data Editor
widget, you can send only the content you need in a format that can be consumed by other data-displaying widgets.
The Data Editor
widget can consume the following two types of data:
- A URL from a remote feed. In most cases, you will simply configure the Data Editor widget to point to a feed URL in the catalog.
- Data in a table format.
The Data Editor
widget is one of several data converters in Lotus Mashups that transform and republish the event data, either to modify event data types or the output.
- You can wire the Data Editor widget to another widget on the mashup page either before or after the transformation process.
- To configure the Data Editor widget, click the menu options icon , and click Edit Settings to open the transformation window.
- To define a feed source and start the transformation, click Get Data from Feed, and either type or paste the URL to the remote feed or the feed created in MashupHub.
- After you finish transforming the feed data and click Save, you can return to the transformation window to make additional changes by clicking Edit Transformation in the widget window or by clicking Edit Settings in the configuration window.
- After you finish transforming the feed data and click Save, you may want to start the entire transformation process over again. To do this, click Clean Transformation in the widget window.
See the following table to learn which events the Data Editor widget can send and receive:
- Content as Text -- sends transformed data in a CSV-like string, for example:
Umpire Burls,Baba Reboot,USA,Music Seller,10.90,1985|
Hyde your Jekyll,Boney Thomas,UK,Mellow-D Records,9.90,1988|
Greatest Hits,Donnie B Goode,USA,XYZZY,9.90,1982|
Still got lots,Gerry Jones,UK,Experienced Records,10.20,1990|
Susie,Susie Cue,EU,Ad Tech,9.90,1997|
One night long,Bebe Jeeze,UK,Midday,10.90,1998|
Onward Mother,Junior Brook,UK,UCB,8.10,1973|
May Flower,Stewart Lightel,UK,Candle Wick,8.50,1990|
What a man likes,Perry Simpson,USA,Reboot,8.70,1987
- Content as Table - sends data in a table structure
- Content using URL (ATOM) -- receives a URL from an Atom feed. Produces errors if the feed or URL is not valid
- Content using Table -- receives data in a table structure
Use the Data Editor widget to filter customer revenue data from a feed and display the data in a bar chart.
In the Data Editor widget, click the menu icon and then Hide to move the widget from the page to the hidden widgets corral.
- Download the sample spread sheet at http://www-10.lotus.com/ldd/mashupswiki.nsf/dx/CustomerRevenue.xls/$file/CustomerRevenue.xls to your local machine.
- Use MashupHub to create a feed from the spread sheet. Name the new feed Customer Revenue.
- In the Details window of the Customer Revenue widget, copy the URL of the feed to your clipboard.
- In Lotus Mashups, drag the Data Editor and Chart widgets onto the page.
- Click the wiring icon for the Data Editor widget to open the wiring interface, and do the following steps:
- In the Select content to send section, select Content as Text.
- In the Select a widget to receive content section, select Chart.
- In the Select an action section, select Display Data using Any Data.
- Click Done.
- Hover your cursor over the Data Editor widget, and click the menu options icon .
- Click Edit Settings to open the configuration window.
- Click Get Data from Feed.
- In the Feed URL field, paste the URL of the Customer Revenue feed into the field, and click OK. Now the data from the feed displays at the top of the window
- In the window, do the following steps to filter the customer name and yearly revenue data from the rest of the data in the feed:
- Click Select Fields.
- At the bottom of the window, continue deselecting fields until you have only these four fields selected: Customer_Name, Y2005, Y2006, and Y2007.
- Click OK. Now the top left field updates to show the data you selected.
- To preview the data in a bar chart, click Preview. Now, in the bottom section of the window, you should see a bar chart that displays yearly revenue for the customers in the spreadsheet.
- Click Done to close the window. You should now see the bar chart of customer revenue data on the mashup page.