Public Render Parameters
The Public Render Parameter application object provides read and write access to public render parameters. Public render parameters allow portlets to share navigational state information and preserve this information across requests. Use this object in rules when we need the site to store a user's selection as a public render parameter during the action phase and have other portlets read this public render parameter during the render phase. We can write public render parameters from preprocessors and portlets (JSR 168, JSR 286, and legacy IBM portlets) during the action phase. Render parameters are read from anywhere, including preprocessors, themes, dynamic assembly transformation, and portlets, during all phases. Let's apply an example to this definition to highlight how we can use the public render parameters application object in rules that you create on the site.
For example,
- Select a travel destination from an airline website.
- The selection is saved by a portlet as a public render parameter during the action phase.
- Portlets read the destination during the render phase from bookmarks. The portlet can provide ticket prices based on the destination.
- Visibility rules display content in the site based on the destination selection.
Note that we cannot write public render parameters from themes or from update rules.
Description Public Render Parameter application object Type of data stored Strings and arrays of strings. Since these parameters are encoded in the portal URLs, HCL recommends used string values that are not long in length. Location of stored data Public render parameters are encoded in all portal URLs. Public render parameters remain available when a user remains in the same browser tab or opens a new tab using a link from the original tab. Duration of storage Data is not connected to a user session. Data is available in the same browser tab, window, or bookmarks. Supported user types We can use this object for all users. For example, supported user types include authenticated users and anonymous users, with and without sessions
Note: The Shared Data application object is also used in rules to share data between portal web applications. Use the Shared Data application object, instead of the Public Render Parameters application object, when we need to share complex data.
See: