This article describes how Mashup Center system widgets communicate through public events.
The mashup builder itself is an example of a mashup application. The user interface is coded with a set of system widgets that communicate with each other through the sending and receiving of events. These system widgets are wired together to create the environment you use when you create your own mashup.
As a developer, you can use the following list of system widgets and their events as a reference when creating your own system widgets. As you develop widgets, you can refer back to this content to understand how to adhere to the events that are defined in each system widget.
Event type | Event name | Description |
Broadcast iEvent | com.ibm.mashups.builder.pageSwitched | Before the navigation widget switches to a new page, the widget loads the current theme, if necessary, and renders the navigation user interface. Then, the navigation widget broadcasts this event to inform other widgets that the current page is now the new page. If users delete all pages, the page ID will be set as null in the event payload. |
Handle iEvent | com.ibm.mashups.builder.switchPage | The navigation widget handles this event to switch to the given page ID in the event payload. If the page ID is not provided, the first page in the current user's navigation is loaded. If no page exists in the current user's navigation, the navigation widget will prompt the user to create a new page. |
Handle iEvent | com.ibm.mashups.builder.refreshNavigation | This event is used when the navigation model is changed, for example when the user changes the title of the current page. |
Handle iEvent | com.ibm.mashups.builder.openPage | This event is used to open the global page using the given page ID. |
Handle iEvent | com.ibm.mashups.builder.closePage | This event is used to redirect to the previous page when the user closed the current page. |
Event type | Event name | Description |
Broadcast iEvent | com.ibm.mashups.builder.switchPage | This event is used to trigger a page switch when user switch spaces. |
Handle iEvent | com.ibm.mashups.builder.switchSpace | This event is used to switch to a space with a given ID. |
Handle iEvent | com.ibm.mashups.builder.pageSwitched | Using this event, the space selector updates itself when users switch pages. |
Handle iEvent | com.ibm.mashups.builder.refreshSpaceSelector | This event is used to refresh the space selector menu. |
Event type | Event name | Description |
Broadcast iEvent | com.ibm.mashups.builder.displayInMashupDialog | The page menu widget broadcasts this event to tell the dialog displayer widget to load various system widgets such as share age, publish page, embed page, and edit page. |
Broadcast iEvent | com.ibm.mashups.builder.switchPage | When users click Delete in the page action menu to delete the current page, this event is used to switch to the first page or parent page. |
Handle iEvent | com.ibm.mashups.builder.changePageMode | This event is used to update which options are available on the page action menu according to different page modes. For example, when the page is in view mode, the Edit page option is disabled. |
Handle iEvent | com.ibm.mashups.builder.pageSwitched | This event is used to update which options are available on the page action menu after users switch to another page. For example, users may have different view and edit permissions for different pages. |
Event type | Event name | Description |
Broadcast iEvent | com.ibm.mashups.builder.addWidgetFromToolbox | The palette widget broadcasts this event to tell the layout widget to create a widget instance according to the widget definition ID in the event payload. |
Broadcast iEvent | com.ibm.mashups.builder.displayInMashupDialog | This event tells the dialog displayer widget to load the embed widget. |
Handle iEvent | com.ibm.mashups.builder.changePageMode | This event is used to update the palette according to a new page mode. For example, when the page is in view mode, the palette widget is hidden. |
Handle iEvent | com.ibm.mashups.builder.refreshPalette | This event is used to refresh the palette when the catalog model is changed, for example when users add widgets from the catalog to the mashup builder. |
Event type | Event name | Description |
Broadcast iEvent | com.ibm.mashups.builder.hideWidget | The layout widget broadcasts this event to tell the hidden widgets corral widget to hide the specified widget. |
Broadcast iEvent | com.ibm.mashups.builder.widgetResized | The layout widget broadcasts this event to tell the end user widget that the widget has been resized. |
Broadcast iEvent | com.ibm.mashups.builder.createAutoWire | When users drag and drop one widget onto another widget, this event gets broadcast to tell the wiring widget to create a wire. |
Broadcast iEvent | com.ibm.mashups.builder.createQuickWire | This event is used to create a wire between two widgets. |
Handle iEvent | com.ibm.mashups.builder.pageSwitched | The layout widget handles this event to load the page content and metadata according to the page ID that is passed in through this event's payload. The layout widget loads only widgets that have the visible attribute set to true. |
Handle iEvent | com.ibm.mashups.builder.changePageMode | This event is used to update the layout widget according to the new page mode. For example, when a page is in view mode, skin artifacts are hidden. |
Handle iEvent | com.ibm.mashups.builder.addWidget | This event is used to create a widget instance according to the widget definition ID in the event payload. |
Handle iEvent | com.ibm.mashups.builder.displayWidget | This event is used to display a widget inside the layout widget. |
Handle iEvent | com.ibm.mashups.builder.renameWidget | This event is used to rename a widget. |
Handle iEvent | com.ibm.mashups.builder.changeSkin | This event is used to change the skin of widgets. |
Handle iEvent | com.ibm.mashups.builder.skinLoaded | This event is used to create a widget skin's resize and drag handlers. |
Handle iEvent | com.ibm.mashups.builder.resetStyle | This event is used to reset the inline style of the layout widget. |
Handle iEvent | com.ibm.mashups.builder.resizeWidget | This event is used to update the size of the widget's skin. |
Handle iEvent | com.ibm.mashups.builder.resizeAction | This event handles requests to resize the widget. |
Handle iEvent | com.ibm.mashups.builder.moveAction | This event handles requests to move the widget. |
Handle iEvent | com.ibm.mashups.builder.highlightWidget | This event is used to highlight a widget. |
Handle iEvent | com.ibm.mashups.builder.removeWidgetHighlight | This event is used to remove the highlight from a widget. |
Handle iEvent | com.ibm.mashups.builder.addNewWire | This event is used to add the wire definition in the widget markup. |
Handle iEvent | com.ibm.mashups.builder.removeWire | This event is used to remove the wire definition in the widget markup. |
Event type | Event name | Description |
Broadcast iEvent | com.ibm.mashups.builder.displayWidget | The hidden widgets corral broadcasts this event to tell the layout widget to hide the specified non-system widget. |
Broadcast iEvent | com.ibm.mashups.builder.closeMashupDialog | This event is used to close the hidden widgets corral when it's displayed in a dialog box. |
Broadcast iEvent | com.ibm.mashups.builder.createQuickWire | This event is used to create a wire between two widgets. |
Handle iEvent | com.ibm.mashups.builder.pageSwitched | The hidden widgets corral handles this event to load the page content according to the page ID that is passed in through the event's payload. The hidden widgets corral loads only the widgets that have the visible attribute set to false. |
Handle iEvent | com.ibm.mashups.builder.changePageMode | This event is used to update the hidden widgets corral according to a new page mode. For example, when the page is in view mode, the hidden widgets corral is not visible. |
Handle iEvent | com.ibm.mashups.builder.hideWidget | This event is used to move a widget into the hidden widgets corral. |
Handle iEvent | com.ibm.mashups.builder.renameWidget | This event is used to rename a widget. |
Handle iEvent | com.ibm.mashups.builder.skinLoaded | This event is used create a widget skin's drag handler. |
Handle iEvent | com.ibm.mashups.builder.highlightWidget | This event is used to highlight a widget. |
Handle iEvent | com.ibm.mashups.builder.removeWidgetHighlight | This event is used to remove the highlight from a widget. |
Handle iEvent | com.ibm.mashups.builder.addNewWire | This event is used to add a wire definition in the widget markup. |
Handle iEvent | com.ibm.mashups.builder.removeWire | This event is used to remove a wire definition in the widget markup. |
Handle iEvent | com.ibm.mashups.builder.autoWireCreated | This event is used to move a non-system widget into the hidden widgets corral after a wire is created. |
Event type | Event name | Description |
Broadcast iEvent | com.ibm.mashups.builder.changePageMode | This event is used to inform other system widgets that the page mode has changed. |
Broadcast iEvent | com.ibm.mashups.builder.savePage | This event gets broadcast to save a page when the page mode is switched from edit to view mode. |
Broadcast iEvent | com.ibm.mashups.builder.displayInMashupDialog | This event is used to tell the dialog displayer widget to display other system widgets in dialog boxes, for example the dialog boxes for viewing the page source and more pages. |
Broadcast iEvent | com.ibm.mashups.builder.loadPageSource | This event is used to tell the dialog displayer widget to load the page source. |
Broadcast iEvent | com.ibm.mashups.builder.viewMorePage | This event is used to tell the dialog displayer widget to load the interface for viewing more pages. |
Handle iEvent | com.ibm.mashups.builder.pageSwitched | When users switch pages, this event is used to switch to view mode and update the user permissions based on the new page ID. |
Handle iEvent | com.ibm.mashups.builder.pageCreated | When users switch to a newly created page, this event is used to specify edit mode as the default page mode. |
Event type | Event name | Description |
Broadcast iEvent | com.ibm.mashups.builder.addNewWire | This event gets broadcast when users create a new wire between widgets. |
Broadcast iEvent | com.ibm.mashups.builder.removeWire | This event gets broadcast when users remove a wire between widgets. |
Broadcast iEvent | com.ibm.mashups.builder.autoWireCreated | This event gets broadcast when two widgets are auto-wired through a drag-and-drop action. |
Broadcast iEvent | com.ibm.mashups.builder.closeMashupDialog | This event is used to close the wiring interface when it's displayed in a dialog box. |
Handle iEvent | com.ibm.mashups.builder.editWire | This event is used to load the wiring interface when editing a wire. |
| ievent name | Description |
Broadcast iEvent | com.ibm.mashups.builder.closeMashupDialog | close itself since it's displayed in a mashup dialog |
Broadcast iEvent | com.ibm.mashups.builder.savePage | broadcast this iEvent to inform Page Source to save the page before theme is swtiched. |
Broadcast iEvent | com.ibm.mashups.builder.updatePageTitle | broadcast this iEvent to inform Page Title to update its UI |
Broadcast iEvent | com.ibm.mashups.builder.refreshNavigation | broadcast this iEvent to inform Navigatio iWidget to refresh itself. |
Handle iEvent | com.ibm.mashups.builder.editPage | load edit page property interface in dialog displayer |
| ievent name | Description |
Handle iEvent | com.ibm.mashups.builder.editSpace | load edit space interface in dialog displayer |
Broadcast iEvent | com.ibm.mashups.builder.closeMashupDialog | close itself since it's displayed in a mashup dialog |
Broadcast iEvent | com.ibm.mashups.builder.displayInMashupDialog | notify display helper to display change space owner interface |
Broadcast iEvent | com.ibm.mashups.builder.switchSpace | notify space selector to switch current space if space owner is changed |
Broadcast iEvent | com.ibm.mashups.builder.spacemanager.spaceOwnerChanged | notify space manager that one space owner is changed |
Broadcast iEvent | com.ibm.mashups.builder.refreshSpaceSelector | notify space selector to refresh since space title is changed |
| ievent name | Description |
Handle iEvent | com.ibm.mashups.builder.manageSpaces | load space manager interface in dialog displayer |
Handle iEvent | com.ibm.mashups.builder.spacemanager.spaceCreated | when new space is created, refresh space selector and append to space list |
Handle iEvent | com.ibm.mashups.builder.spacemanager.pageThemeChanged | cache the page whose theme is changed, then refresh if current page theme is changed |
Handle iEvent | com.ibm.mashups.builder.spacemanager.deletePage | cache the deleted page, then refresh if current page is deleted |
Handle iEvent | com.ibm.mashups.builder.spacemanager.spaceOwnerChanged | cache owner-changed space, then switch space if current space owner is changed |
Handle iEvent | com.ibm.mashups.builder.spacemanager.pageCreated | be notified that new page is created, then refresh space/page list. |
Handle iEvent | com.ibm.mashups.builder.exportSpace | invoke export space api to export space |
Handle iEvent | com.ibm.mashups.builder.deleteSpace | cache the deleted space, then switch space if current space is deleted |
Handle iEvent | com.ibm.mashups.builder.addSpaceToFavorite | add favorite space to Favorites Quick Access section |
Handle iEvent | com.ibm.mashups.builder.removeSpaceFromFavorite | remove non-favorite space from Favorites Quick Access |
Broadcast iEvent | com.ibm.mashups.builder.refreshSpaceSelector | notify to refresh space selector if new space is created |
Broadcast iEvent | com.ibm.mashups.builder.switchSpace | notify to switch current space(or if current space is deleted) |
Broadcast iEvent | com.ibm.mashups.builder.switchPage | notify to switch current page |
Broadcast iEvent | com.ibm.mashups.builder.saveCheck | notify to check if current page is dirty when switching space |
Broadcast iEvent | com.ibm.mashups.builder.closeMashupDialog | close itself since it's displayed in a mashup dialog |
Broadcast iEvent | com.ibm.mashups.builder.refreshNavigation | notify to refresh navigation if current page is deleted |