A single data page can create many instances of itself, with each instance being tailored to the context in which you are using it in the application. This simplifies creation and maintenance of your code, since one data page can serve multiple references, even from multiple applications (if the data page is in a framework layer, every application in an implementation layer derived from that framework can make use of it) at the same time.
As a simple example, imagine that you are going to display a list of products on a page so a customer can select from them and put the selections in a shopping cart:
You have a preferred provider, Northwind. If the customer does not want to select from their products, the customer can use a more general Google search to get a list of products.
You can deliver both (or multiple) provider product lists by using a single data page with multiple possible data sources. Depending on the parameters (including which provider to use), the data page creates a tailored instance of itself on the clipboard. The instance has the data about the products that the specific provider offers, and no other data.
The Definition tab of the data page lists the possible data sources for instances of the data page:
If the reference specifies the Northwind product list (so the When condition
NorthwindSearchProviderSelected evaluates to true), the data page requests data from the NorthwindProductList data source (a Report Definition) and creates an instance of itself on the clipboard with the data returned from that source (or, depending on the data page's refresh strategy, it may use an already-existing instance of itself on the clipboard that was created using the same parameters and conditions).
On the clipboard, you can see the instance of the data page created to respond to the reference:
The page pxDPParameters in the image above holds the properties and values sent with the data page reference, which permit tailoring the data page instance:
Let's say the customer does a second search, using the Google option. The reference goes to the same data page; it uses the parameters sent to evaluate the When condition
NorthwindSearchProviderSelected to false. The data page then uses the other data source option to create an instance of itself on the clipboard (or locate an existing instance that matches the parameter values of the reference and the refresh conditions of the data page), and in that instance, provides data that matches the parameters sent with the reference.
Management of data page instances
By default, PRPC can maintain 600 read-only unique instances of a data page, although you can change that limit in the prconfig file to as high as 1000. When the number of page instances exceeds the set limit, the system deletes all data page instances that were last accessed more than ten minutes previously.
If, after that step, the number of instances of the data page still exceeds the set limit, the system tolerates an overload up to 1250 instances. If the number exceeds that limit, the system deletes instances (irrespective of when they were last accessed), up until the number of entries in the cache is below the set limit.
The data page creates new instances as needed to respond to references and to replace the deleted instances.