| Oracle Application Server Portal PL/SQL API Reference - 904 | |||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||
| SUMMARY: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | DETAIL: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | |||||||
This package contains procedures and functions to get the values of portlet parameters.
Portlets use this API to retrieve any read-only parameters that have been passed into the URL of the current page.
Portlets obtain their parameters by calling a parameter API. Parameter values are stored by the invoking page as a series of name-value (N-V) pairs. Parameters that have more than one value are represented by N-V pairs with the same name and different values. Requests for parameter values will return one or more values (depending on the values stored and the method used) in the order in which they were setup. In retrieval, value order is maintained.
The URL may contain multiple parameters with the same name. In this case a parameter is a assigned to the portlet using the reference path as it uniquely identifies the portlet instance on the page. The scoping information of the reference path can be used to target parameter values to individual portlets within a page.
Example: If portlets with the reference paths 'ref1' and 'ref2' are displayed on a given page, and if the following parameters are passed to the portlets through the URL:
then these results are returned for the calls to the get_value API:
Comments:
| Function/Procedure Summary | |
get_names | owa.vc_arr |
get_value | varchar2 |
get_values | owa.vc_arr |
get_values | owa.vc_arr |
retrieve | |
retrieve | wwpro_values |
| Function/Procedure Detail |
function get_names(
p_reference_path in varchar2
) return owa.vc_arrAny user can use this function.
Example:
If a URL has these parameters:
http://.......?empno=10&deptno=10&ref1.deptno=20&ref1.deptno=25&ref1.folderid=30
where 'ref1' is the reference path of the portlet instance.
Then this call:
l_names owa.vc_arr;
l_names := wwpro_api_parameters.get_names
(
p_reference_path => p_portlet_runtime_record.reference_path
);
Returns:
deptno and folderid in l_names
p_reference_path - a unique identifier for a portlet instance on
the current page. The reference_path is
passed to the portlet's show procedure in the
portlet_runtime_record.
function get_value(
p_name in varchar2,
p_reference_path in varchar2
) return varchar2Any user can use this function.
Notes:
A scalar value is a single number, value, or data item, as opposed to a vector, matrix, or array (which contain multiple values).
The reference path identifies a portlet instance on a page and can be used to target parameters to an individual portlet or to groups of portlets on a given page.
Example:
If a URL has these parameters:
http://.......?empno=10&empno=25&deptno=10&ref1.deptno=20&ref1.empno=30
Then this call:
l_value varchar2;
l_value := wwpro_api_parameters.get_value
(
p_name => 'empno',
p_reference_path => p_portlet_runtime_record.reference_path
);
Returns:
l_value = '30'
p_name - the name of the parameter to be returnedp_reference_path - a unique identifier for a portlet instance on
the current page. The reference_path is
passed to the portlet's show procedure in the
portlet_runtime_record.
function get_values(
p_name in varchar2,
p_reference_path in varchar2
) return owa.vc_arrTo return values associated with a list of parameter names, call get_values function (multiple parameter names).
Any user can use this function.
Example:
If a URL has these parameters:
http://......?empno=10&deptno=10&ref1.deptno=20&ref1.deptno=25&ref1.folderid=30
where 'ref1' is the reference path of the portlet instance.
Then this call:
l_values owa.vc_arr;
l_values := wwpro_api_parameters.get_values
(
p_name => 'depno',
p_reference_path => p_portlet_runtime_record.reference_path
);
Returns:
20 and 25 for l_values.
p_name - the name of the portlet parameterp_reference_path - a unique identifier for a portlet instance on
the current page. The reference_path is
passed to the portlet's show procedure in the
portlet_runtime_record.
function get_values(
p_names in owa.vc_arr,
p_reference_path in varchar2
) return owa.vc_arrTo return values associated with a single parameter name, call get_values function (single parameter name).
Any user can use this function.
Example:
If a URL has these parameters:
http://.......?empno=10&deptno=10&ref1.deptno=20&ref1.deptno=25&ref1.folderid=30
where 'ref1' is the reference path of the portlet instance.
and if:
l_names contains 'deptno' and 'folderid'
Then this call:
l_values owa.vc_arr;
l_names owa.vc_arr;
l_values := wwpro_api_parameters.get_values
(
p_names => l_names,
p_reference_path => p_portlet_runtime_record.reference_path
);
Returns:
20, 25, and 30 for l_values
p_names - the names of the portlet parametersp_reference_path - a unique identifier for a portlet instance on
the current page. The reference_path is
passed to the portlet's show procedure in the
portlet_runtime_record.
procedure retrieve(
p_names in out owa.vc_arr,
p_values in out owa.vc_arr
) The names and values are returned, unchanged, into a table. If a parameter has more than one value, only the first is returned.
Any user can use this procedure.
Example:
If a URL has these parameters:
http://.......?empno=10&deptno=10&ref1.deptno=20&ref1.deptno=25&ref1.folderid=30
Then this call:
wwpro_api_parameters.retrieve
(
l_names,
l_values
);
Sets the following names and values:
'empno', 'deptno', 'ref1.deptno', 'ref1.deptno', 'ref1.folderid' in l_names and '10', '10', '20', '25', '30' in l_values
p_names - the names of the parameters, unchanged, in the specified
tablep_values - the values of the parameters into the specified tablefunction retrieve return wwpro_values
Any user can use this function.
Note: This is an internal API.
Example:
l_pro_values wwpro_values; l_pro_values := wwpro_api_parameters.retrieve;
| Oracle Application Server Portal PL/SQL API Reference - 904 | |||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||
| SUMMARY: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | DETAIL: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | |||||||