About the Original Author

Recent articles by this author

After exporting a space to one server and then importing that space to another server, you might notice that the original IDs for that space and all its pages and widgets change. In cases where you do not want the IDs to change, you can run a stableid import command to import the space ZIP file ...

You can add a custom widget to the mashup build directly from the Add to Mashup Builder window in the catalog. Do the following steps: 1. Open the catalog.xml file for the widget in edit mode, and add the line in italic font: definition ...

This is an evaluation version of IBM Mashup Center, version 3.0.0.1. The product media contains all the functionality of a fully licensed version of IBM Mashup Center, except for the following limitations: This software is valid for 60 days from installation. This software is only available for ...

When browser settings for language are set to engb, certain widgets that display start and end dates of events might incorrectly display the dates in American English format ((MMDDYYYY)) instead of United Kingdom English format (DDMMYYYY). For example, when you view a series of events in the ...

The URL Customizer widget allows you to createdynamic URLs with customized parameters. The base URL can be any URL with parameters such as a parameterized feed URL from the catalog or a parameterized URL on the Web, and the parameter values can then come from an event that is passed from another widget on the mashup page

The URL Customizer widget automatically parses the parameters from the URL. After you customize the parameters in the URL Customizer widget's configuration settings, you can display the new data in another widget on the page, such as the Data Viewer, Feed Reader, or Web Site Displayer widgets. Since the URL Customizer widget is not used to display data, you will typically hide this widget on your mashup page.

For additional details about the URL Customizer widget, see the readme file located in Mashups_install_root\mm\installedApps\urlCustomizer.ear.ear\urlCustomizer.war.

Configuration tips

For example, let's say you have created a parameterized feed with data about customers in MashupHub. The feed URL may look something like this:

Notice the custname parameter and its default value of Cisco. When you configure the URL Customizer widget, you can paste in this feed URL and load it. The widget automatically parses the custname parameter and displays the default value as Cisco, as shown here:

You can then change the custname value either manually in the configuration window, or dynamically by wiring a value to the URL Customizer widget's Accept Parameters using Any Data action. When using a dynamic value, the single value that gets passed on the wire will populate the Default parameter to receive single value field. Finally, you can wire the URL Customizer widget to either the Data Viewer or Feed Reader widget to display the data.

Another example of how to use the URL Customizer widget is to customize the parameters of a Web site's URL and then pass that data to the Web Site Displayer widget to display the URL.

Events

See the following table to learn which events the URL Customizer widget can send and receive:

Send

Receive

URL as URL - sends a customized URL

Accept Parameters using Any Data - receives parameters from another widget on the mashup page, Many types of data are handled, such as the following:

A simple Text, Number or Boolean value. If a simple, stand-alone value is received, the value is set as the default parameter.

Text of format param=value or param1=value1&param2=value2. The parameter or parameters and values are placed into the URL as specified.

Text of format param|text|value or param1,param2|text,text|value1,value2. The parameter or parameters and values are placed into the URL as specified. This type of data is used primarily for handling CSV data from the Data Viewer widget.

JSON or Table format. All of the parameters of the object and their values are placed into the URL.

Other Model Data or object. All of the parameters of the object and their values are placed into the URL.

An array. Each individual element of the array is processed as above.

Every time parameters are received, the widget resends the URL. Parameters are cumulative.

Example scenario

Goal: Use the URL Customizer widget to customize a parameterized feed URL from the Web, and then pass the URL parameter values from another widget on the mashup page. Steps required:

By default, the first parameter is the value in the Default parameter to receive a single value field.

In the Default parameter to receive single value field, change the value to q.

Click Save.

Hover your cursor over the User Input widget, click the menu options icon , and select Edit Settings to open the configuration window.

Click Add, and then type Company Name in the field.

Click Save.

To wire the User Input widget to the URL Customizer widget, do the following steps:

Hover your cursor over the User Input widget, and click the wiring icon to open the wiring interface.

Click the Send tab.

In the Select content to send section, select Company Name as Any Data.

In the Select a widget to receive content section, select URL Customizer.

In the Select an action section, select Accept Parameters using Any Data.

Click Done.

In the Company Name field in the User Input widget, type Cisco and click Submit. Notice how the Web Site Displayer widget updates to show the Google Web site with Cisco in the search field instead of IBM.