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 wires that allow 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 reference content to understand how to work with 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 opens the global page using the given page ID. |
Handle iEvent | com.ibm.mashups.builder.closePage | This event redirects to the previous page when users close the current page. |
Event type | Event name | Description |
Broadcast iEvent | com.ibm.mashups.builder.switchPage | This event triggers a page switch when user switch spaces. |
Handle iEvent | com.ibm.mashups.builder.switchSpace | This event switches 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 refreshes 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 page, 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 switches to the first page or parent page. |
Handle iEvent | com.ibm.mashups.builder.changePageMode | This event updates 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 updates 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 updates 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 refreshes 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 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 tells the wiring widget to create a wire. |
Broadcast iEvent | com.ibm.mashups.builder.createQuickWire | This event creates 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 updates 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 creates a widget instance according to the widget definition ID in the event payload. |
Handle iEvent | com.ibm.mashups.builder.displayWidget | This event displays a widget inside the layout widget. |
Handle iEvent | com.ibm.mashups.builder.renameWidget | This event renames a widget. |
Handle iEvent | com.ibm.mashups.builder.changeSkin | This event changes the skin of widgets. |
Handle iEvent | com.ibm.mashups.builder.skinLoaded | This event creates a widget skin's resize and drag handlers. |
Handle iEvent | com.ibm.mashups.builder.resetStyle | This event resets the inline style of the layout widget. |
Handle iEvent | com.ibm.mashups.builder.resizeWidget | This event updates 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 highlights a widget. |
Handle iEvent | com.ibm.mashups.builder.removeWidgetHighlight | This event removes the highlight from a widget. |
Handle iEvent | com.ibm.mashups.builder.addNewWire | This event adds the wire definition in the widget markup. |
Handle iEvent | com.ibm.mashups.builder.removeWire | This event removes 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 closes the hidden widgets corral dialog box. |
Broadcast iEvent | com.ibm.mashups.builder.createQuickWire | This event creates 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 updates 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 moves a widget into the hidden widgets corral. |
Handle iEvent | com.ibm.mashups.builder.renameWidget | This event renames a widget. |
Handle iEvent | com.ibm.mashups.builder.skinLoaded | This event creates a widget skin's drag handler. |
Handle iEvent | com.ibm.mashups.builder.highlightWidget | This event highlights a widget. |
Handle iEvent | com.ibm.mashups.builder.removeWidgetHighlight | This event removes the highlight from a widget. |
Handle iEvent | com.ibm.mashups.builder.addNewWire | This event adds a wire definition in the widget markup. |
Handle iEvent | com.ibm.mashups.builder.removeWire | This event removes a wire definition in the widget markup. |
Handle iEvent | com.ibm.mashups.builder.autoWireCreated | This event moves widgets into the hidden widgets corral after a wire is created. |
Event type | Event name | Description |
Broadcast iEvent | com.ibm.mashups.builder.changePageMode | This event informs other system widgets that the page mode has changed. |
Broadcast iEvent | com.ibm.mashups.builder.savePage | This broadcast event saves a page when the page mode is switched from edit to view mode. |
Broadcast iEvent | com.ibm.mashups.builder.displayInMashupDialog | This event tells the dialog displayer widget to display other system widgets in dialog boxes, for example the Page Source and More Pages dialog boxes. |
Broadcast iEvent | com.ibm.mashups.builder.loadPageSource | This event tells the dialog displayer widget to load the page source. |
Broadcast iEvent | com.ibm.mashups.builder.viewMorePage | This event tells 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 closes the wiring interface dialog box. |
Handle iEvent | com.ibm.mashups.builder.editWire | This event loads the wiring interface when editing a wire. |
Event type | Event name | Description |
Broadcast iEvent | com.ibm.mashups.builder.closeMashupDialog | This event closes the Edit dialog box for pages. |
Broadcast iEvent | com.ibm.mashups.builder.savePage | This broadcast event tells the page source widget to save the page before the page theme changes. |
Broadcast iEvent | com.ibm.mashups.builder.updatePageTitle | This broadcast event tells the page title widget to update its user interface. |
Broadcast iEvent | com.ibm.mashups.builder.refreshNavigation | This broadcast event tells the navigation widget to refresh itself. |
Handle iEvent | com.ibm.mashups.builder.editPage | This event loads the Edit dialog box for pages. |
Event type | ievent name | Description |
Handle iEvent | com.ibm.mashups.builder.editSpace | This event loads the Edit Settings dialog box. |
Broadcast iEvent | com.ibm.mashups.builder.closeMashupDialog | This event closes the Edit Settings dialog box. |
Broadcast iEvent | com.ibm.mashups.builder.displayInMashupDialog | This event tells the display helper to display the Change Owner dialog box. |
Broadcast iEvent | com.ibm.mashups.builder.switchSpace | This event tells the space selector to switch the current space if the space owner has changed. |
Broadcast iEvent | com.ibm.mashups.builder.spacemanager.spaceOwnerChanged | This event tells the space manager that a space owner has changed. |
Broadcast iEvent | com.ibm.mashups.builder.refreshSpaceSelector | This event tells the space selector to refresh due to a change in the space title. |
Event type | Event name | Description |
Handle iEvent | com.ibm.mashups.builder.manageSpaces | This event loads the space manager. |
Handle iEvent | com.ibm.mashups.builder.spacemanager.spaceCreated | When a new space is created, this event refreshes the space selector and appends the new space to the list of spaces. |
Handle iEvent | com.ibm.mashups.builder.spacemanager.pageThemeChanged | This event caches pages with theme changes and then refreshes the current page if the theme changes. |
Handle iEvent | com.ibm.mashups.builder.spacemanager.deletePage | This event caches deleted pages and then refreshes if the current page is deleted. |
Handle iEvent | com.ibm.mashups.builder.spacemanager.spaceOwnerChanged | This event caches owner-changed spaces and then switches the space if the current space owner is changed. |
Handle iEvent | com.ibm.mashups.builder.spacemanager.pageCreated | This event announces that a new page has been created and refreshes the list of spaces and pages. |
Handle iEvent | com.ibm.mashups.builder.exportSpace | This event invokes the export space API to export the space. |
Handle iEvent | com.ibm.mashups.builder.deleteSpace | This event caches deleted spaces and then switches the space if the current space is deleted. |
Handle iEvent | com.ibm.mashups.builder.addSpaceToFavorite | This event adds favorite spaces to the Favorites Quick Access section in the space manager. |
Handle iEvent | com.ibm.mashups.builder.removeSpaceFromFavorite | This event removes non-favorite spaces from the Favorites Quick Access section in the space manager. |
Broadcast iEvent | com.ibm.mashups.builder.refreshSpaceSelector | This event refreshes the space selector if a new space is created. |
Broadcast iEvent | com.ibm.mashups.builder.switchSpace | This event switches the current space to a different space. Also used when the current space is deleted. |
Broadcast iEvent | com.ibm.mashups.builder.switchPage | This event switches the current page to a different page. |
Broadcast iEvent | com.ibm.mashups.builder.saveCheck | This event checks if the current page contains unsaved edits when switching spaces. |
Broadcast iEvent | com.ibm.mashups.builder.closeMashupDialog | This event closes the space manager. |
Broadcast iEvent | com.ibm.mashups.builder.refreshNavigation | This event refreshes the navigation if the current page is deleted. |