Contents: Creating mashups : Mashup Center 2.0
This topic describes how to use a default wizard to create a custom widget that organizes and displays content in a table. In five steps, the wizard guides you through all the tasks required to create a customized Data Viewer
widget to include in your mashup applications.
About this task
Based on the default Data Viewer
widget that is available in the palette, this wizard helps you create a widget that can accept and display content either from a feed in the catalog or from a remote location such as a Web site. Regardless of the source, Mashup Center recognizes and parses the data and then displays it. Valid content sources include RSS, Atom, and JSON array-formatted feeds from the catalog or Internet. You can also display content from a file that contains data in comma-separated value (CSV) format. For more information about the Data Viewer
, see Data Viewer : Mashup Center 2.0
To create a custom widget using the Data Viewer
wizard, do the following steps:
- In the mashup builder, in the main actions menu, select Create a New Widget.
- Click Create a widget from a Wizard..
- In the window, select Display a table of data.
- Click Launch Wizard.
- In the Content Source window, specify where Mashup Center needs to locate the source of the content. Do one of the following steps:
- To select a source of data that does not exist in the catalog, for example a feed from a Web site or a file located on a remote server, select Enter the URL to your content. Type or paste the URL in the field, and select Load.
- To select a content source that is stored in the catalog, select Select content from the catalog. Then click the Select from the Catalog button to open a window with a list of feeds from the catalog. Click the name of the feed to give it focus, and then click Done.
When Mashup Center recognizes and parses the data, it will display in a table on the right side of the wizard.
In the Content Selection window, specify how to display the content. Do the following steps:
In the Widget Filter window, select how to highlight and filter the content in your table. Do the following steps:
- To specify the number of rows to display in the table at a time, click the down arrow beside the Rows per view and select a number. Choices include 5, 10, 15, 20, and 30. By default, tables display five rows of data in a single view. To see additional rows, users can use the page navigator that displays at the bottom of the table.
- To display column headers, select Show column headers. Column headers persistently display as users navigate through the table views.
- Navigate to the Columns Settings section of the window.
- To remove a column from the table, clear the check box next to the column header.
- To change the title of a column header, delete the current name in the field, and replace it with your own header name. If you decide to use the original title, click Restore title at the end of the row.
- To change the alignment of a column header, select one of the three alignment buttons next to the header name. By default, all headers are right-justified.
- To change a column header value from a string to a number, open the menu next to the alignment buttons and select Number. By default, all headers have a String value.
- In the Column field, select the column that contains the content that will meet your filter criteria.
- In the Column value is field, select whether the content is text-based or numerical.
- In the Comparison field, type the characters that you want Mashup Center to locate, and specify if the row should begin with, contain, or end with the characters.
- Now that you have specified your filter criteria, specify how you want the table to get updated when the criteria is met. Select one of the following options:
In the Widget Appearance window, specify the look and feel of the table, for example the title, font style, lines, and background colors. Do the following steps:
- To highlight the row that meets the criteria, Select Highlight the row with and then select a color.
- To display only the row or rows that meet the criteria, select Show only matching rows.
- To remove the row or rows that meet the criteria, select Remove matching rows.
In the Save Widget window, select how you want to be able to find your newly created widget. Choices include the following:
- To create a title for the table, type the title in the Title for table field. Select how to align the title.
- In the Title font field, select a font style, size, and color for the title. You can also make the font bold and italic.
- In the Header font field, select a font style, size, and color for the column headers. You can also make the font bold and italic.
- In the Table font field, select a font style, size, and color for the content contained in the table cells. You can also make the font bold and italic.
- In the Column lines field, specify whether or not to display lines between columns. If you select to display lines, you can select one of the following three line thickness levels: Light, Medium, and Heavy.
- In the Row lines field, specify whether or not to display lines between rows. If you select to display lines, you can select one of the following three line thickness levels: Light, Medium, and Heavy.
- In the Odd row color field, open the color picker and select a background color for the odd rows.
- In the Even row color field, open the color picker and select a background color for the even rows.
The final steps of the wizard depend on how you selected to save the widget. If you selected to add your new widget to the current page, specify a name for the widget. If you selected to add the widget to your palette, select a category for the widget as well as the title that displays in the category. Finally, if you selected to add your widget to the catalog, specify the title, description, and version. Optionally, you can specify permissions and a sharing method, as described here:
- Add to my current page: This option adds the widget to the page that is currently selected in the page selector. You will select a name for your widget in the next window.
- Add to my palette: This option adds the widget to your palette. You will select the category in a later step.
- Add to the catalog: This option adds the widget to the catalog.
Click Finish. The widget builder returns to the start page and displays a message telling you that your widget was saved successfully.
- You can set either public or private catalog permissions. If you select Public, the widget displays in the catalog for all users. If you select Private, the widget displays in the catalog for you only, and no other users can see it.
- You can share your widget either as a URL or a ZIP package. If you select Widget URL, you share a fully qualified URL with others to reference. No files are downloaded. When users access the widget in the catalog and add it to the mashup builder, they will see the widget in the category they selected. Then they can add it to a page, edit settings, configure it, and wire it just like they can with any other widget in the palette. If you select Widgets definition and artifacts, you upload the widget package as a ZIP file. When users access the widget in the catalog and add it to the mashup builder, the widget definition and all the artifacts associated with the widget get deployed and installed on the Mashup Center server.
Parent topic: Working with widget builder wizards : Mashup Center 2.0