Portlet Factory, Version 6.1.2
Shared Variable builder
Use this builder to share data between model or application instances, or between IBM® WebSphere Portlet Factory and non- WebSphere Portlet Factory code. For example, you may want to create a “filter” application that lets users specify values that are used by multiple other applications on the same or different web server page.
The Shared Variable builder will publish the value of a variable to the session, the request, a global data item (Java "static" field) or to a custom, user-defined repository.
The Shared Variable builder creates a two-way link between a variable and an external data store. This linkage allows the variable to be shared among models in a session, or to connect to some non- WebSphere Portlet Factory code that uses session or request attributes.
Each time the variable associated with this builder is read, its value is pulled in from the specified external storage location (session, request, and so on). Similarly, each time the variable is changed, the new value is written to the external store.
Your model code can access the variable just like any other variable, but its value is kept in synch with the external shared copy. Other models will see changes your model makes to the variable, and you will be able to see the most recent value set by other models.
Parent topic: Builder help
- About using the builder call editor
The builder call editor allows you to specify all the input values to a builder call.
- Using an LJO as a Bean input to a JSP tag
You can use the Shared Variable builder to export an LJO to the session or request so it can be used by a JSP tag or custom taglib call.
- Shared Variable builder inputs
This topic describes the inputs for the Shared Variable builder.
- Objects The Shared Variable Builder Creates
This topic describes the objects that are are created by the Shared Variable builder.
- Sharing the value of a variable with other IBM WebSphere Portlet Factory portlets
This topic describes the steps to follow to share the value of a variable with other WebSphere Portlet Factory Portlets.
- Using a request attribute as a variable value
This topic describes the steps to follow to use a request attribute as a variable value.
Library | Support |