Public Portlet Parameters Support

2-20 Oracle Fusion Middleware Developers Guide for Oracle Portal portlet developer and are exposed to the page designer, through the user interface. After adding a portlet to a page, page designers can assign values to the public portlet parameters to make the information displayed in the portlet specific to the page. Page designers can assign values to public portlet parameters by providing a specific value constant, a system variable for example, the portal user name, or a page parameter. At run time, the portlet receives the values from the sources specified. In this way, page designers have complete control over the source of the parameter, whereas you have complete control over how the data is used after it is transmitted to the portlet. ■ Private portlet parameters: You can use private portlet parameters to implement internal navigation in your portlet. You can pass parameters to your portlets every time the page is requested. Private portlet parameters can be passed exclusively from the portlet instance to the same portlet instance. Private portlet parameters do not require a full page refresh. You can create a link in a portlet that can be used to refresh the portlet only, without triggering a full portal page refresh. By doing this, only the content of the affected portlet is updated and the rest of the page is not. Refer to Partial Page Refresh in Chapter 7, Enhancing Java Portlets for details about setting this programmatically. Portlets supporting public portlet parameters enable page designers to tailor the portlets data input for each portlet instance. In this case, the portlet developer can focus on the portlet logic, while page designers can easily reuse portlets and address the interaction between the page and the portlets. All five portlet building technologies discussed in this chapter OmniPortlet, Web Clipping, Java portlets, Portlet Builder, and PLSQL portlets support public portlet parameters. OmniPortlet, Web Clipping, and Portlet Builder provide complete support through their wizard interface. You can add public portlet parameter support to your Java portlets programmatically or with the Java Portlet Wizard. PLSQL portlets support public parameters only programmatically.

2.13 Private Portlet Parameter Support

This section describes the portlet building tools in terms of their support for private parameters.

2.13.1 OmniPortlet, Web Clipping, and Portlet Builder

OmniPortlet, Web Clipping, and Portlet Builder do not provide access to the portlet developer to private portlet parameters.

2.13.2 Java Portlets and PLSQL Portlets

In your Java portlets and PLSQL portlets, you can implement internal navigation by using private portlet parameters. Note: The JSR 168 standard does not cover the notion of public portlet parameters. If you want to utilize public portlet parameters in your Java portlets, you have to use PDK-Java. Portlet Technologies Matrix 2-21

2.14 Event Support

An event is a user action that you define to display a Portal page. User actions include clicking a link or a button in a portlet. Page designers specify what to do when an event occurs in a portlet on a page. When an event occurs, page designers can either redisplay the current page or navigate the user to another portal page, optionally passing values to that pages parameters.

2.14.1 Web Clipping, OmniPortlet, and Java Portlets

Web Clipping, OmniPortlet, and Java portlets support events.

2.14.2 Portlet Builder and PLSQL Portlets

Portlet Builder and PLSQL portlets do not support events.

2.15 Ability to Hide and Show Portlets Based on User Privileges

This section describes the portlet building tools in terms of their support for authorization functionality.

2.15.1 Web Clipping and OmniPortlet

You can hide and show portlets built with Web Clipping and OmniPortlet on portal pages dynamically by using security managers. Although Web Clipping and OmniPortlet do not expose security managers through the user interface, you can apply them by editing their XML provider definition file.

2.15.2 Java Portlets

The PDK provides a number of security managers for Java portlets. Following are two examples: ■ Group security manager: The group security manager makes the portlet appear to users who are members of a specified group, while hiding it from those who are not members. ■ Authentication level security manager: You can use the authentication level security manager to control access to the portlets based on the users authentication level. For example you may hide the portlet from public users but display it to authenticated users. JSR 168 portlets support the standard servlet mechanisms.

2.15.3 Portlet Builder

Portlet Builder provides a declarative user interface to control access to portlets. Note: PLSQL portlets do not support private and public parameters simultaneously. You need to decide which parameter type to support before coding your PLSQL portlet.