In the Keywords field, enter any additional keywords to help users find your Click Next to display the Content Types and Portlet Modes page shown in

Creating Java Portlets 6-19 Figure 6–10 Portlet Modes Dialog Box 21. Once you have added all of the desired portlet Show modes, choose a function to be performed for each mode. For each portlet mode, click the portlet mode and select an option on the right as follows: ■ Select Generate JSP if you want Oracle JDeveloper to generate a JSP for the portlet mode. Enter a name for the JSP in the corresponding field, or accept the defaults. When you complete the wizard, the generated JSP displays in the Application Navigator where it can be selected for further development. This is the default selection for all portlet display modes. This selection enters code in the generated portlet java class that routes requests for the given mode to the generated JSP. ■ Select Generate ADF-Faces JSPX to generate .jspx files. The .jspx files will generate exactly the same markup as JSPs. ■ Select Map to Path if you want to map the portlet to an existing Web resource, such as a page. Enter the path in the corresponding field. With this selection, you must write the targeted resource or file yourself. The target could be, for example, a JSP, a servlet, or an HTML file. This selection enters code in the generated portlet java class that routes requests for the given mode to the specified target. ■ Select Custom Code if you want to implement the portlet mode through a custom coded object. You will create this object later. This selection generates a skeleton method to render content private void doMODE_ NAMECONTENT_TYPE in the generated portlet Java class. You must update this code to render useful content.

22. Click Next.

If you selected Editable on the General Portlet Properties page earlier in the wizard, then the Customization Preferences page displays Figure 6–11 . Go to step 23. If you did not select this option, then the Security Roles page displays Figure 6–13 . Go to step 31. 6-20 Oracle Fusion Middleware Developers Guide for Oracle Portal Figure 6–11 Customization Preferences Page

23. If you want to include additional customization preferences, click Add. The Add

New Preferences dialog box displays. Figure 6–12 Add New Preference Dialog Box

24. In the Name field, enter a name for the new preference. The name must be unique

in the portlet. Use only letters, numbers, and the underscore character.

25. In the Default Values field, enter one or more default values for the new

customization preference. Separate multiple values with commas.

26. Select the Translate Preference check box if you want the customization

preference value to be translated. If you select this option, Oracle JDeveloper generates a resource bundle class with strings for which you can obtain translations. At run time, the portlet references the resource bundle entries.

27. Click OK. Repeat the preceding steps if you want to add more customization

preferences. Note: The Name is always translated, but there is not always a need to translate the Default Value. For example, if the value is an integer, no translation is needed