The target tile can use the {$_context.<value>} syntax to access passed values in its local context.
To update the UI whenever the context changes, hook in for the onContextChanged event and perform the uiRefresh action.
Tiles that exist in the tile stack but are not visible do not execute actions of the onContextChanged event when it is triggered, but the next time they become visible.
<Tile tileId="Tile3"> <!--Refresh the UI when the context changes --> <Event eventId="onContextChanged"> <Action actionId="uiRefresh" /> </Event> <!--Stop further UI updates till the context updated event arrives --> <P pid="waitForContext" value="true" /> <LinearContainer layout="vertical"> <!-- Details skipped for brevity --> <UIElement type="label"> <P pid="text" value="{$_context.platform}" /> </UIElement> <UIElement type="label"> <P pid="text" value="{$_context.type}" /> </UIElement> <UIElement type="label"> <P pid="text" value="{$_context.movieBO.Name}" /> </UIElement> </LinearContainer> </Tile>
In some cases, the tile cannot proceed until the context is updated by other tiles. This is especially true for tablet apps: there is nothing to show in the detail view while the master view is retrieving data. Once the master tile has all the required data, it can update the detail tile’s context by firing an updateContext action. The detail tile, which has been on hold if waitForContext is enabled, can now resolve its bindings and refresh its UI.
<Tile tileId="MasterTile"> <P pid="width" value="300pt" /> <P pid="height" value="910pt" /> <BindingRef ref="Products" /> <ListContainer> <P pid="uiElementId" value="CategoriesList" /> <P pid="width" value="300pt" /> <P pid="height" value="910pt" /> <ListSection> <ListItem> <P pid="actionIndicator" value="arrow" /> <Event eventId="onClick"> <!--Update the Detail tile when the user taps the cell--> <Action actionId="updateContext"> <P pid="target" value="DetailTile" /> <P pid="selectedCategory" value="Notebooks" /> </Action> </Event> </ListItem> </ListSection> <!-- Further details skipped for brevity --> </ListContainer> </Tile> <Tile tileId="DetailTile"> <!--Refresh the UI when the context changes --> <Event eventId="onContextChanged"> <Action actionId="uiRefresh" /> </Event> <!—Freeze the Tile till the context updated event arrives! --> <P pid="waitForContext" value="true" /> <LinearContainer layout="vertical"> <!-- Details skipped for brevity --> ... </LinearContainer> </Tile>For additional details about context-specific actions and parameters, see the extensibility configuration XSD file.