| Oracle9iAS Portal PL/SQL API Reference - 9.0.2.6 | |||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||
| SUMMARY: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | DETAIL: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | |||||||
This package contains methods that allow providers to integrate page styles into their portlets. In addition there are APIs for drawing a portlet header and border.
A page style controls the colors and fonts used to render an Oracle portal page and all the portlets displayed within it. It is recommended that portlet developers integrate page styles in their portlets in order to create portlets that, when rendered in an Oracle Portal page, are consistent with the style used in that page and other portlets in that page.
When an Oracle Portal page is rendered, it includes a Cascading Style Sheet (CSS) with the definitions of the page's style settings. These styles are available to portlet developers through the wwui_api_portlet APIs. Since CSS are rendered by the page engine, they are only available in the Oracle Portal pages. You should only use these APIs in MODE_SHOW of the portlet's show method. The CSS are not available in the other modes of the portlet's show method.
To create dialogs, use methods in the wwui_api_portlet_dialogs package.
| Constant Summary | |
ABOUT_HREF_TAG | varchar2(20) |
ABOUT_LABEL_TAG | varchar2(20) |
ABOUT_TAG | varchar2(20) |
BODY_TAG | varchar2(20) |
COLLAPSE_HREF_TAG | varchar2(20) |
COLLAPSE_LABEL_TAG | varchar2(20) |
COLLAPSE_TAG | varchar2(20) |
CUSTOMIZE_HREF_TAG | varchar2(20) |
CUSTOMIZE_LABEL_TAG | varchar2(20) |
CUSTOMIZE_TAG | varchar2(20) |
HELP_HREF_TAG | varchar2(20) |
HELP_LABEL_TAG | varchar2(20) |
HELP_TAG | varchar2(20) |
REMOVE_HREF_TAG | varchar2(20) |
REMOVE_LABEL_TAG | varchar2(20) |
REMOVE_TAG | varchar2(20) |
TITLE_HREF_TAG | varchar2(20) |
TITLE_LABEL_TAG | varchar2(20) |
TITLE_TAG | varchar2(20) |
| Function/Procedure Summary | |
close_portlet | |
draw_error_portlet | |
draw_error_portlet_header | |
draw_portlet_header | |
draw_xml_header | |
open_portlet | |
portlet_body_color | varchar2 |
portlet_header_color | varchar2 |
portlet_headerlink | varchar2 |
portlet_headertext | varchar2 |
portlet_heading | varchar2 |
portlet_subheader_color | varchar2 |
portlet_subheaderlink | varchar2 |
portlet_subheadertext | varchar2 |
portlet_text | varchar2 |
render_portlet_bottom | |
render_portlet_top | |
| Constant Detail |
ABOUT_HREF_TAG constant varchar2(20) := '#ABOUT.LINK#'
ABOUT_LABEL_TAG constant varchar2(20) := '#ABOUT.LABEL#'
ABOUT_TAG constant varchar2(20) := '#ABOUT#'
BODY_TAG constant varchar2(20) := '#BODY#'
COLLAPSE_HREF_TAG constant varchar2(20) := '#COLLAPSE.LINK#'
COLLAPSE_LABEL_TAG constant varchar2(20) := '#COLLAPSE.LABEL#'
COLLAPSE_TAG constant varchar2(20) := '#COLLAPSE#'
CUSTOMIZE_HREF_TAG constant varchar2(20) := '#CUSTOMIZE.LINK#'
CUSTOMIZE_LABEL_TAG constant varchar2(20) := '#CUSTOMIZE.LABEL#'
CUSTOMIZE_TAG constant varchar2(20) := '#CUSTOMIZE#'
HELP_HREF_TAG constant varchar2(20) := '#HELP.LINK#'
HELP_LABEL_TAG constant varchar2(20) := '#HELP.LABEL#'
HELP_TAG constant varchar2(20) := '#HELP#'
REMOVE_HREF_TAG constant varchar2(20) := '#REMOVE.LINK#'
REMOVE_LABEL_TAG constant varchar2(20) := '#REMOVE.LABEL#'
REMOVE_TAG constant varchar2(20) := '#REMOVE#'
TITLE_HREF_TAG constant varchar2(20) := '#TITLE.LINK#'
TITLE_LABEL_TAG constant varchar2(20) := '#TITLE.LABEL#'
TITLE_TAG constant varchar2(20) := '#TITLE#'
| Function/Procedure Detail |
procedure close_portlet
Example:
wwui_api_portlet.close_portlet;
procedure draw_error_portlet(
p_has_border in boolean default false
) p_has_border - true if portlet should be drawn with a borderprocedure draw_error_portlet_header
procedure draw_portlet_header(
p_provider_id in integer,
p_portlet_id in integer,
p_title in varchar2,
p_has_details in boolean default false,
p_has_edit in boolean default false,
p_has_edit_defaults in boolean default false,
p_has_help in boolean default false,
p_has_about in boolean default false,
p_show_details in boolean default true,
p_show_edit in boolean default true,
p_show_help in boolean default true,
p_show_about in boolean default true,
p_show_remove in boolean default true,
p_show_collapse in boolean default true,
p_is_collapsed in boolean default false,
p_referencepath in varchar2,
p_back_url in varchar2 default null,
p_refresh_url in varchar2 default null
) This procedure draws the header for the portlet. The portlet Show method can call this procedure when the page calls portlet.show. This API can be used by the provider to draw the portlet header in the Show mode of the portlet show method. It is recommended that the portlet header be drawn if the has_title property passed to the Show method is true.
Note: If you are using Oracle Portal 9.0.2 or later, it is recommended that you use render_portlet_top to draw the portlet header rather than the draw_portlet_header procedure described here.
Example:
if (p_portlet_record.has_title_region) then
--- Draw the portlet header and specify what links are available
--- from that header (i.e. details, customize, help, and about).
--- The has_title property is set at the page region level.
wwui_api_portlet.draw_portlet_header
(
p_provider_id => p_portlet_record.provider_id,
p_portlet_id => p_portlet_record.portlet_id,
p_title => 'My Portlet Title',
p_has_details => true,
p_has_edit => true,
p_has_help => true,
p_has_about => true,
p_referencepath => p_portlet_record.reference_path,
p_back_url => p_portlet_record.page_url
);
end if;
p_provider_id - the ID of the provider to which the
portlet belongsp_portlet_id - the portlet idp_title - the portlet titlep_has_details - indicates whether the portlet implements
mode_show_details.
MODE_SHOW_DETAILS is one of the display
modes of the show_portlet method (database
provider) and of PortletRenderer.render
(Web provider). It displays detailed
information implemented by the portlet.p_has_edit - indicates whether the portlet implements
mode_show_edit.
MODE_SHOW_EDIT is one of the display modes
of the show_portlet method (database
provider) and of PortletRenderer.render
(Web provider). It implements an interface
for user customizations for an individual
instance of a portlet. Note that:p_has_edit_defaults - indicates whether the portlet implements
mode_show_edit_defaults.
MODE_SHOW_EDIT_DEFAULTS is one of the
display modes of the show_portlet method
(database provider) and of
PortletRenderer.render (Web provider).
It implements an interface for default
customizations for an individual instance
of a portlet. Note that:p_has_help - indicates whether the portlet implements
mode_show_help, i.e. can display help
information about the portletp_has_about - indicates whether the portlet implements
mode_show_about, i.e. can display
information such as that found in the
About box of any applicationp_show_details - indicates whether the portlet displays
detailed information implemented by the
portlet. Note: This field available
with Oracle9iAS Portal 9.0.2 or later.p_show_edit - indicates whether the portlet displays a
Customize link. Note: This field
available with Oracle9iAS Portal 9.0.2
or later.p_show_help - indicates whether the portlet displays a
Help link. Note: This field
available
with Oracle9iAS Portal 9.0.2 or later.p_show_about - indicates whether the portlet displays an
About link.
Note: This field is available
with Oracle9iAS Portal 9.0.2 or later.p_show_remove - indicates whether the portlet displays a
Remove icon.
Note: This field is available
with Oracle9iAS Portal 9.0.2 or later.p_show_collapse - indicates whether the portlet displays a
Collapse/Restore link.
Note: This field is available
with Oracle9iAS Portal 9.0.2 or later.p_is_collapsed - indicates whether the portlet content is
collapsed.
Note: This field is available
with Oracle9iAS Portal 9.0.2 or later.p_referencepath - the portlet instance ID.
A portlet instance refers to the placement
of an individual portlet within an
individual Oracle Portal page. The value
for p_reference_path passed into the Show
method in the portlet record should be
used for this parameter.p_back_url - the URL for the calling page passed
through the links generated in the
portlet header.
The value for the p_back_url parameter
should be set to the value of the
parameter p_portlet_record.page_url
passed on show method.p_refresh_url - The URL for the calling page.
The page is reloaded/built from the
database, rather than from cache.
Note: This field is available
with Oracle9iAS Portal 9.0.2 or later.
procedure draw_xml_header(
p_provider_id in integer,
p_portlet_id in integer,
p_title in varchar2,
p_has_details in boolean default false,
p_has_edit in boolean default false,
p_has_edit_defaults in boolean default false,
p_has_help in boolean default false,
p_has_about in boolean default false,
p_referencepath in varchar2,
p_back_url in varchar2 default null
) The portlet Show method can call this procedure when the page calls portlet.show. This procedure generates HTML that follows the XML standard.
Note: It is recommended that the portlet header be drawn if the has_title property passed to the Show method is TRUE.
Example:
if (p_portlet_record.has_title_region) then
--- Draw the XML portlet header and specify what links are available
--- from that header (i.e. details, customize, help, and about).
--- The has_title property is set at the page region level.
wwui_api_portlet.draw_xml_header(
p_provider_id => p_portlet_record.provider_id,
p_portlet_id => p_portlet_record.portlet_id,
p_title => 'Title',
p_has_details => true,
p_has_edit => true,
p_has_help => true,
p_has_about => true,
p_referencepath => p_portlet_record.reference_path,
p_back_url => p_portlet_record.page_url);
end if;
p_provider_id - the ID of the provider to which the
portlet belongs.p_portlet_id - the portlet idp_title - the portelt titlep_has_details - indicates whether the portlet implements
mode_show_details.
MODE_SHOW_DETAILS is one of the display
modes of the show_portlet method (database
provider) and of PortletRenderer.render
(Web provider). It displays detailed
information implemented by the portlet.p_has_edit - indicates whether the portlet implements
mode_show_edit.
MODE_SHOW_EDIT is one of the display modes
of the show_portlet method (database
provider) and of PortletRenderer.render
(Web provider). It implements an interface
for user customizations for an individual
instance of a portlet. Note that:p_has_help - indicates whether the portlet implements
mode_show_help, i.e. can display help
information about the portletp_has_about - indicates whether the portlet implements
mode_show_about, i.e. can display
information such as that found in the
About box of any applicationp_referencepath - the portlet instance ID.
A portlet instance refers to the placement
of an individual portlet within an
individual Oracle Portal page. The value
for p_reference_path passed into the Show
method in the portlet record should be
used for this parameter.p_back_url - the URL for the calling page passed
through the links generated in the
portlet header.
The value for the p_back_url parameter
should be set to the value of the
parameter p_portlet_record.page_url
passed on show method.
procedure open_portlet(
p_has_border in boolean default false
) The has_border property passed to the portlets show method should passed into this API. The value for the has_border property passed to the portlets show method is set at the page region level.
Note: Use this API in conjunction with close_portlet to encapsulate the portlet content.
Example:
wwui_api_portlet.open_portlet(p_portlet_record.has_border);
function portlet_body_color return varchar2
Note: Since CSS are rendered by the page engine, they are only available in the Oracle Portal pages. The portlet implementations should only use this API in MODE_SHOW of the portlet's show method. The CSS are not available in the other modes of the portlet's show method.
Example:
wwui_api_portlet.portlet_body_color;
htp.p('<TR class="'||
wwui_api_portlet.portlet_body_color ||'">');
function portlet_header_color return varchar2
Note: Since CSS are rendered by the page engine, they are only available in the Oracle Portal pages. The portlet implementations should only use this API in MODE_SHOW of the portlet's show method. The CSS are not available in the other modes of the portlet's show method.
Example:
wwui_api_portlet.portlet_header_color;
htp.p('<TR class="'||
wwui_api_portlet.portlet_header_color ||'">');
function portlet_headerlink(
p_string in varchar2
) return varchar2Note: Since CSS are rendered by the page engine, they are only available in the Oracle Portal pages. The portlet implementations should only use this API in MODE_SHOW of the portlet's show method. The CSS are not available in the other modes of the portlet's show method.
Example:
l_headerlink := 'Info';
l_headerlink := wwui_api_portlet.portlet_headerlink
(
p_string => l_headerlink
);
htp.p('<td>'||l_headerlink||'</td>');
p_string - the string to which the CSS style is to be applied
function portlet_headertext(
p_string in varchar2
) return varchar2Note: Since CSS are rendered by the page engine, they are only available in the Oracle Portal pages. The portlet implementations should only use this API in MODE_SHOW of the portlet's show method. The CSS are not available in the other modes of the portlet's show method.
Example:
l_headertext := 'Welcome';
l_headertext := wwui_api_portlet.portlet_headertext
(
p_string => l_headertext
);
htp.p('<td>'||l_headertext||'</td>');
p_string - the string on which the CSS style is to be applied
function portlet_heading(
p_string in varchar2,
p_level in number
) return varchar2Note: Since CSS are rendered by the page engine, they are only available in the Oracle Portal pages. The portlet implementations should only use this API in MODE_SHOW of the portlet's show method. The CSS are not available in the other modes of the portlet's show method.
Example:
l_header := 'Users';
l_header := wwui_api_portlet.portlet_heading
(
p_string => l_header,
p_level => 3
);
htp.p('<td>'||l_header||'</td>');
p_string - the string on which the CSS style is to be appliedp_level - the heading level that indicates the size.
The possible values are 1, 2, 3 and 4.function portlet_subheader_color return varchar2
Note: Since CSS are rendered by the page engine, they are only available in the Oracle Portal pages. The portlet implementations should only use this API in MODE_SHOW of the portlet's show method. The CSS are not available in the other modes of the portlet's show method.
Example:
wwui_api_portlet.portlet_subheader_color;
htp.p('<TR class="'||
wwui_api_portlet.portlet_subheader_color ||'">');
function portlet_subheaderlink(
p_string in varchar2
) return varchar2Note: Since CSS are rendered by the page engine, they are only available in the Oracle Portal pages. The portlet implementations should only use this API in MODE_SHOW of the portlet's show method. The CSS are not available in the other modes of the portlet's show method.
Example:
l_subheaderlink := 'Info';
l_subheaderlink := wwui_api_portlet.portlet_subheaderlink
(
p_string => l_subheaderlink
);
htp.p('<td>'||l_subheaderlink||'</td>');
p_string - the string on which the CSS style is to be applied
function portlet_subheadertext(
p_string in varchar2
) return varchar2Note: Since CSS are rendered by the page engine, they are only available in the Oracle Portal pages. The portlet implementations should only use this API in MODE_SHOW of the portlet's show method. The CSS are not available in the other modes of the portlet's show method.
Example:
l_subheadertext := 'Admin';
l_subheadertext := wwui_api_portlet.portlet_subheadertext
(
p_string => l_subheadertext
);
htp.p('<td>'||l_subheadertext||'</td>');
p_string - the string on which the CSS style is to be applied.
function portlet_text(
p_string in varchar2,
p_level in number
) return varchar2Note: Since CSS are rendered by the page engine, they are only available in the Oracle Portal pages. The portlet implementations should only use this API in MODE_SHOW of the portlet's show method. The CSS are not available in the other modes of the portlet's show method.
Example:
l_text := 'Type the name of the User';
l_text := wwui_api_portlet.portlet_text
(
p_string => l_text,
p_level => 3
) ;
htp.p('<td>'||l_text||'</td>');
p_string - the string on which the CSS style is to be appliedp_level - the text level that indicates the size.
The possible values are 1, 2, 3 and 4.
procedure render_portlet_bottom(
p_portlet_record in wwpro_api_provider.portlet_runtime_record,
p_title in varchar2 default null,
p_show_details in boolean default false,
p_show_edit in boolean default false,
p_show_help in boolean default false,
p_show_about in boolean default false
) Call this procedure to draw the bottom (or footer) of a portlet. The portlet Show method can call this procedure when the page calls portlet.show.
Note: Use this procedure with PDK-Java (JPDK) v2 and later. It replaces the draw_portlet_header procedure used in earlier releases of Oracle Portal.
Example:
-- Render the bottom of the portlet (Close the portlet)
wwui_api_portlet.render_portlet_bottom(
p_portlet_record => p_portlet_record, --- pass portlet record as is
p_title => 'My Portlet Title' --- title of portlet
p_show_details => false, --- don't display details link
p_show_edit => true, --- display customize link
p_show_help => true, --- display help link
p_show_about => true --- display about link
);
p_portlet_record - the portlet_runtime_record that was passed
to the show method of the portletp_title - the portlet titlep_show_details - indicates whether the portlet
displays a Details linkp_show_edit - indicates whether the portlet
displays a Customize linkp_show_help - indicates whether the portlet
displays a Help linkp_show_about - indicates whether the portlet
displays an About link
procedure render_portlet_top(
p_portlet_record in wwpro_api_provider.portlet_runtime_record,
p_title in varchar2 default null,
p_show_details in boolean default false,
p_show_edit in boolean default false,
p_show_help in boolean default false,
p_show_about in boolean default false
) Call this proceure to draw the top (or header) of a portlet. The portlet Show method can call this procedure when the page calls portlet.show.
Note: Use this procedure with PDK-Java (JPDK) v2 and later. It replaces the draw_portlet_header procedure used in earlier releases of Oracle Portal.
Example:
-- Render the top of the portlet (Open the portlet)
wwui_api_portlet.render_portlet_top(
p_portlet_record => p_portlet_record, --- pass portlet record as is
p_title => 'My Portlet Title' --- title of portlet
p_show_details => false, --- don't display details link
p_show_edit => true, --- display customize link
p_show_help => true, --- display help link
p_show_about => true --- display about link
);
-- Render the content of your portlet (Only if portlet is not collapsed)
if not p_portlet_record.is_collapsed then
-- Code to print out the content of your portlet --
end if;
p_portlet_record - the portlet_runtime_record that was passed
to the show method of the portletp_title - the portlet titlep_show_details - indicates whether the portlet
displays a Details linkp_show_edit - indicates whether the portlet
displays a Customize linkp_show_help - indicates whether the portlet
displays a Help linkp_show_about - indicates whether the portlet
displays an About link
| Oracle9iAS Portal PL/SQL API Reference - 9.0.2.6 | |||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||
| SUMMARY: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | DETAIL: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | |||||||