The global context is a central repository for custom key-value pairs that are available to both application development and configuration. You can place, retrieve, and delete global context values based on their unique keys.
To update a global context, use the updateGlobalContext action. The same syntax and parameters apply as for the local context.
<ListItem feed="MovieTitles"> <Event eventId="onClick"> <Action actionId="updateGlobalContext"> <P pid="releaseYear" value="{$MovieTitles.ReleaseYear}" /> </Action> </Event> </ListItem>Although tiles should use the local context, they can also access data that is available in the global context. To access global context elements, use the {$_global.<value>} syntax. This example shows how TileWithGlobalContext uses values that are stored in the global context:
<Tile tileId="TileWithGlobalContext"> <LinearContainer layout="vertical"> <!-- Details skipped for brevity --> <UIElement type="label"> <P pid="text" value="{$_global. MovieTitles.ReleaseYear }" /> </UIElement> <UIElement type="label"> <P pid="text" value="{$_context.type}" /> </UIElement> </LinearContainer> </Tile>