Dynamic Parameters
Dynamic parameters refer to the ability to build a data request’s parameters based on the response structure of another request or on standard gadget view parameters or user preferences.
There are several cases where using dynamic parameters would be incredibly useful when you’re making requests for data from the container or from an external source:
If you are using variables passed from the container or into the view to control the type of information to be obtained
If there were custom user preferences set during the program flow that need to be used to capture particular information from the source
If the information used in the attributes of one data pipe request (e.g.,
os:Data
Request()
) should be based upon the result set of another, earlier data pipe request (e.g.,os:PeopleRequest()
)
Dynamic parameters may be applied to a number of attributes within
the data pipe tags. Creating a data pipe from a DataRequest
call allows the developer to
include dynamic parameters in any attribute of the tag, with the
exceptions of key
and method
. Other than a DataRequest
call, dynamic parameters may be
included in a number of alternate attributes for other calls, as shown
in Table 7-6.
Table 7-6. Dynamic parameter attributes
Attribute | Request types implementing |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Get Programming Social Applications now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.