View state behavior for the Page Builder theme
The Page Builder theme of WebSphere Portal v8.0 has a slightly different view state behavior in the browser than the other portal themes and the themes from previous portal versions.
In this topic...
- View state = navigational state.
- Render parameters as specified by the standard portlet API
- Public render parameters as specified by the standard portlet API
- Shared item sets as specified by the iWidget API
- Navigational state as specified by the iWidget API
- Navigational state as specified by the Mashups Enabler SPI
- Shareable parameter sets as specified by the Mashups Enabler SPI.
The browser Back button does not have an undo function. It interacts with the view or navigational state only, but not with the application state.
With regards to the Page Builder theme, the view state can be distinguished into the following two groups:
State Description Client side view This state consists of the initial state from the time when the page was loaded, and all state changes that happened since then caused by client side interactions that did not cause a page refresh. The actual content of the client side view state depends on the rendering mode of the theme and also on the methods that a portlet or widget used to alter view state. Preserved view This is the state that might be preserved for a page after actions such as the following:
- a page reload triggered by a click on the page Refresh button, or a portlet interaction
- a click to a different page in the navigation
- a click on the Back button
- a click on a bookmark.
The preserved state might then be available if the user calls that page again later. This depends on the conditions listed further below. The actual content of the preserved view state depends on the rendering mode of the theme and on the methods that a portlet or widget used to alter the view state. Whether that content is actually available after a page refresh depends on the rendering mode.
Client side mode
Portlets can alter the client side view state by one of following methods:
- Render parameters as specified by the standard portlet API
- Public render parameters as specified by the standard portlet API
- Navigational state as specified by the Mashups Enabler SPI
- Shareable parameter sets as specified by the Mashups Enabler SPI.
Portlets can alter the preserved view state by one of following methods:
- Render parameters as specified by the standard portlet API
- Public render parameters as specified by the standard portlet API
- Navigational state as specified by the Mashups Enabler SPI
- Shareable parameter sets as specified by the Mashups Enabler SPI only if the set named public-render-parameters is used.
Widgets can alter the client side view state by one of following methods:
- Shared item sets as specified by the iWidget API
- Navigational state as specified by the iWidget API
- Navigational state as specified by the Mashups Enabler SPI
- Shareable parameter sets as specified by the Mashups Enabler SPI.
Widgets can alter the preserved view state by one of following methods:
- Shared item sets as specified by the iWidget API only if the shared item set named public-render-parameters is used
- Navigational state as specified by the iWidget API
- Navigational state as specified by the Mashups Enabler SPI
- Shareable parameter sets as specified by the Mashups Enabler SPI only if the set named public-render-parameters is used.
View state behavior in client side rendering mode:
In client side mode the preserved view state is added to the browser history at the moment when the user changes to a different page. When the user navigates to a page, preserved state updates are not part of the history on that page until the user navigates to another page. This results in the following behavior:
- If a user selects page A, performs some portlet or widget interactions, and bookmarks page A, the bookmark contains the preserved state that the page had when the user initially selected page A, not the preserved state that page A had when the user created the bookmark.
- If a user selects page A, performs some portlet or widget interactions, and refreshes page A, page A is displayed with the preserved state that it had when the user initially selected page A, not the preserved state that page A had when the user clicked the browser Refresh button.
- If a user selects page A, performs some widget or portlet interactions, changes to page B, and clicks the browser Back button, page A is shown with the preserved state that it had when page A was initially selected, not the preserved state it had when the user navigated to page B.
- If a user selects page A, performs some widget or portlet interactions, changes to page B, and changes back to page A by clicking a link, page A is shown with the preserved state that it had when the user left page A and changed to page B.
Server side mode
Portlets can alter the client side state by one of following methods:
- Render parameters as specified by the standard portlet API
- Public render parameters as specified by the standard portlet API
- Navigational state as specified by the Mashups Enabler SPI
- Shareable parameter sets as specified by the Mashups Enabler SPI.
Portlets can alter the preserved view state by one of following methods:
- Render parameters as specified by the standard portlet API
- Public render parameters as specified by the standard portlet API
- Navigational state as specified by the Mashups Enabler SPI, only if the portlet that calls the API also specifies a parameter that results in an immediate page refresh.
- Shareable parameter setsas specified by the Mashups Enabler SPI only if the set named public-render-parameters is used by portlets in combination with an immediate page refresh.
Widgets can alter the client side state by one of following methods:
- Shared item sets as specified by the iWidget API
- Navigational state as specified by the iWidget API
- Navigational state as specified by the Mashups Enabler SPI
- Shareable parameter sets as specified by the Mashups Enabler SPI.
Widgets can alter the preserved view state by one of following methods:
- Navigational state as specified by the iWidget API
- Navigational state as specified by the Mashups Enabler SPI
In server side rendering mode the preserved state of the widgets is stored in a browser cookie.
View state behavior in server side rendering mode for portlet actions:
For portlet actions in server side mode the view state behaves as follows:
- If a user selects page A, performs some portlet interactions, and bookmarks page A, the bookmark contains the preserved state that the page had when the user created the bookmark.
- If a user selects page A, performs some portlet interactions, and refreshes page A, page A is displayed with the preserved state that it had when the user clicked the browser Refresh button.
- If a user selects page A, performs some portlet interactions, changes to page B, and clicks the browser Back button, page A is shown with the preserved state that it had when the user changed to page B.
- If a user selects page A, performs some portlet interactions, changes to page B, and changes back to page A by clicking a link, page A is shown with the preserved state that it had when the user changed to page B.
View state behavior in server side rendering mode for widget actions:
For widget actions in server side mode the view state behaves as follows:
- If a user selects page A, performs some widget interactions, and bookmarks page A, the bookmark does not contain the preserved widget state. If the user clicks the bookmark, the widget state depends on the last preserved state available in the widget state cookie for the widget. This can be empty.
- If a user selects page A, performs some widget interactions, and refreshes page A, page A is displayed with the preserved state that it had when the user clicked the browser Refresh button. This can be empty, if the cookie was deleted meanwhile.
- If a user selects page A, performs some widget interactions, changes to page B, and clicks the browser Back button, page A is shown with the most recent preserved widget state that is available in the cookie. This can be empty, if the cookie was deleted meanwhile.
- If a user selects page A, performs some widget interactions, changes to page B, and changes back to page A by clicking a link, page A is shown with the most recent preserved widget state that is available in the cookie. This can be empty, if the cookie was deleted meanwhile.
Parent: Browser behavior and scenarios