When you wire two widgets on a mashup page, you essentially introduce the widgets to each other and tell them how to communicate. The widgets communicate by passing event data (often called a payload).
To wire two widgets, either drag and drop one widget onto another, or manually wire the widgets using the wiring interface. To access the wiring interface, click the display menu at the top, right corner of one of the widgets, and select Edit Wiring
. When you wire two widgets using the wiring interface, you can start with either the sending widget or the receiving widget.
During the wiring process, one widget sends the data, and the other widget receives the data. The sender widget sends data as a result of some event, such as clicking a cell in a table. When the receiver widget receives the content, a designated action takes place, for example a page refreshes and displays updated information.
You can also enable automatic wiring in the properties for mashup pages so that widgets will automatically get wired together. To enable automatic wiring at the page level, click Actions
-> Edit Page Properties
. In the Advanced
section of the window, select the check box to enable automatic wiring. In order to automatically wire widgets, the following criteria must be met:
- The event being automatically wired must have the same event name and payload type.
- Automatic wiring is enabled for both widgets. For more information about how widget developers can enable automatic wiring for widgets, see ../com.ibm.help.mashups.dev.doc/mash_dev_widget_autowiring.html.
Parent topic: Working with widgets: imc3