Click Next. Creating a JSR 168 Portlet

Creating Java Portlets 6-21 28. To edit details for existing customization preferences, select the preference in the Portlet Preferences list and edit the fields in the Preference Details section. 29. To delete an existing customization preference, select the preference in the Portlet Preferences list and click Remove.

30. Click Next to display the Security Roles page

Figure 6–13 . Figure 6–13 Security Roles Page

31. JSR 168 portlets may use J2EE security roles that are defined in web.xml and

referenced in portlet.xml. The Available list displays the security roles defined in the portlet application’s Web deployment file web.xml. Moving a security role from the Available list to the Selected list creates a reference to the security role in the application’s portlet deployment file portlet.xml that refers to the security role in web.xml.

32. If you want to define a new security role, click New Security Role. The Create

New Security Role dialog box displays Figure 6–14 . Figure 6–14 Create New Security Role Dialog Box

33. In the Name field, enter a unique name for the security role.

34. In the Description field, enter a description for the security role, explaining the

access privileges and restrictions this role will have on the portlet.

35. Click OK.

6-22 Oracle Fusion Middleware Developers Guide for Oracle Portal The new security role is added to the Available list. You can also manually create security roles.

36. Click Next to display the Caching Option page

Figure 6–15 . Figure 6–15 Caching Option Page

37. Select Cache Portlet if you want to enable caching for your portlet.

Selecting this option indicates that portlet caching is managed by the portlet container. The portlet itself may choose to cache content for any given response. The settings on this page apply only when the portlet itself does not specify a caching condition for a response.

38. In the Default Expiry Conditions section, select:

■ Cache Content Expires After [] Seconds if you want the cached portlet content to expire after a certain amount of time. Specify the time limit in the adjacent field. ■ Cache Content Never Expires if you do not want the cached portlet content to expire. You may want to select this option if the portlet contains static content that is unlikely to change.

39. Click Next to display the Initialization Parameters page

Figure 6–16 . Note: If you do not want any default caching for this portlet, choose Do Not Cache By Default. In this case, the wizard actually sets a cache duration of 0 seconds. As stated earlier, this cache setting only comes into play when the portlet itself does not specify a caching condition for a response. If you choose no caching here and you later decide that you want default caching for the portlet, you can easily go back and change the cache duration value in the portlet.xml file, which is generated by the wizard, to a number greater than zero.