What is a parameter?

What is a page parameter?

Page parameters are used to pass values to a page. This means that the information displayed on a page can be different depending on where the page is called from, or who is viewing the page. For example, a stock ticker portlet could be set up to display a different portfolio depending on who is viewing the page.

A page parameter can get its value from (in order of precedence):

Notes: You can use parameters in your pages only if the parameters and events page group setting is enabled.

Page parameters in URL pages

In URL pages, the parameters added to the URL used to access the page are used to pass parameters on to the location specified for the page. For example, if a URL page (myurlpage) is created that points to the following URL:

http://www.yahoo.com/somepage

and a user accesses the page with the following parameters:

http://myportal/myurlpage?a=1&b=2

the following URL is generated:

http://www.yahoo.com/somepage?a=1&b=2

Page parameters in PL/SQL pages

In PL/SQL pages, the parameters added to the URL used to access the page are used to pass values on to bind variables in the PL/SQL code. For example, if a PL/SQL pages (myplsqlpage) is created that contains the following PL/SQL statement:

a:=:param1;

and a user access the page with the following parameters:

http://myportal/myplsqlpage?param1=123

the bind variable (a) is assigned the value 123.

What is a portlet parameter?

Portlet parameters are used to pass values to portlets. This means that the information displayed in a portlet can be specific to a particular page or user. A portlet's parameters are specified in the provider.xml file. For information about how to add parameters to your portlets, see the Portal Developer Kit on the Oracle Technology Network.

There are two types of portlet parameter: public and private. When a portlet is placed on a page, if the parameters and events page group setting is enabled, its public parameters are displayed to the page designer. The page designer can then assign values to the parameters to make the information displayed in the portlet specific to the page. The page designer can assign values to public portlet parameters by providing a specific value (constant), a system variable (for example, USER), or a page parameter.

Private parameters are used internally by the portlet, for example, for identifying the current row displayed, or the current tab displayed. Private portlet parameters are not displayed to the page designer.

For example, a stock ticker portlet could have a public portlet parameter (ticker) that accepts a stock symbol as its value. When the stock ticker portlet is placed on a page, the ticker parameter is displayed on the Edit Page: Parameters tab. On this tab, the page designer can set the value of the ticker parameter to a specific value, for example, ORCL. When the page is displayed, the portlet shows stock information for the specified company. Alternatively, the page designer could add a page parameter (symbol) to the page, and pass that page parameter to the portlet parameter. If the page parameter is customizable, users can set the stock ticker portlet to display stock information for any company they choose.

Related topics

Adding a parameter to a page
Passing values to portlet parameters