In the Attribute list, choose the attribute whose values you want to pass to a In the Default Value field, enter the value to use by default for the attribute. If

5-14 Oracle Fusion Middleware Users Guide for Oracle Portal p_creator in varchar2, p_create_date in varchar2 as begin htp.p’tabletrtdbCreator:btd’ || ’td’ || p_creator || ’tdtr’ || ’trtdbCreate Date:btd’ || ’td’ || p_create_date || ’tdtr’ || ’table’; exception when others then htp.psqlerrm; end; You can add a call to this procedure to an item type My Item Type so that this information is displayed for items of that type. First you choose PLSQL as the Procedure Type, and then add the following to the Procedure Call field Figure 5–5 : schema.DISPLAY_ATTRIBUTES You include the link text Display Attributes, and you specify an icon to associate with the procedure. For the procedure to return the appropriate attribute values, you need to pass it the attribute names. Your procedure includes two parameters: p_creator and p_create_ date. You need to pass these two parameters information from the Creator and Create Date attributes Figure 5–6 . Each item of type My Item Type will now include a link to run the procedure Figure 5–7 . When users click the specified icon, the additional attributes are displayed as an HTML table Figure 5–8 . Figure 5–5 Adding a PLSQL Procedure Call to an Item Type Figure 5–6 Passing Attribute Values to PLSQL Procedure Parameters Figure 5–7 Example My Item Type Item Preparing to Add Content 5-15 Figure 5–8 Example My Item Procedure Call Results

5.2.2.2.4 Including an Item Type’s Procedure Call on a Page

If an item type includes a procedure call, the link to execute the procedure call will be displayed with an item of that type only if the Associated Functions attribute is displayed in the region that contains the item. To include an item type’s procedure call on a page:

1. Go to the page to which you want to add the link.

For information on locating a page, see Section 8.1, Locating Pages in Oracle Portal .

2. Switch to Edit mode.

3. In the region to which you want to add the link, click the Edit Region icon.

4. Click the AttributesStyle tab.

5. In the Available Attributes list, select Associated Function.

6. Click the Move arrow.

7. Click Apply.

8. Click Close.

5.2.2.3 Making an Item Type Available to a Page Group

When you create an item type, it is not immediately available for use by content contributors. This is because you will probably want to edit the item type first to add attributes and procedure calls. When you are happy with the item type, and are ready for content contributors to start adding items of that type, you must make the item type available in the page group. To make an item type available to a page group:

1. From the Page Groups portlets Work In drop-down list, choose the page group to

be edited. By default, the Page Groups portlet is located on the Build tab of the Builder page.

2. Click the Configure tab.

3. In the Types and Classification section, click the Edit link.

4. From the Hidden Item Types list, select the item type that you want to make

available. The Hidden and Visible Item Type lists include all the item types owned by this page group and the Shared Objects page group. Note: You can also reach the Configure Types and Classification page by clicking the configure the list of available item types link on the first page of the Add Item Wizard. 5-16 Oracle Fusion Middleware Users Guide for Oracle Portal

5. Click the Move icon to move the selected item type into the Visible Item Types

list. The order of item types in the Visible Item Types list determines the order when items in a region are grouped by item type. For information about how to group items by item type, see Section 10.2.10, Grouping Items in a Region .

6. Click OK to return to the Configure tab.

7. Click Close.

You can also exclude an item type from a page group, meaning that content contributors cannot add items of that type to pages in the page group. For example, if you have created your own item types, you might want to exclude some of the built-in item types from the page group. To do this, select the item type in the Visible Item Type list and click the Remove icon.

5.2.2.4 Deleting an Item Type

When you delete an item type, all items of that type are also deleted. You cannot undo this action. Take care when deleting an item type from the Shared Objects page group. Item types in the Shared Objects page group may be used across page groups. Deleting an item type from Shared Objects removes it from all page groups that use it. To delete an item type:

1. Use the Navigator to browse to the item type that you want to delete.

To get to the Navigator click the Navigator link on any page. By default you can find a Navigator link on the Portal Builder page.

2. In the row for the item type, click the Delete link.

3. In the confirmation page, click Yes.

5.2.3 Working with Page Types

Page types define the contents of a page and the information that is stored about a page. The information stored about a page is determined by the attributes of the page type. By default, Oracle Portal includes several base page types so that page managers can get started creating pages right out of the box. Base page types include: ■ Standard —These contain and manage items, portlets, tabs, and sub-page links. ■ URL —These provide a route to another Web page, identified by its URL. When a user clicks the page link, the Web page referenced by the link is displayed. Note: If you delete an item type that is one of the selected Default WebDAV Types on the Items tab of page properties, the option that used that type either Default Regular Files, Default Zip Files, or Default Image Files is reset to Inherit from Parent Page - [FileZip FileFile] . Tip: If the item type is shared, it will be in the Shared Objects page group. See Section 4.6, Sharing Objects Across Page Groups Preparing to Add Content 5-17 ■ PLSQL —These consist of PLSQL code that executes when the pages are rendered. ■ JavaServer Pages JSPs —These are an extension to servlet functionality that provides a simple programmatic interface to Web pages. JSPs are HTML pages with special tags and embedded Java code that is executed on the Web or application server. JSPs provide dynamic functionality to HTML pages. They are compiled into servlets when first requested, and they run in the servlet container. For a complete list of base page types, see Section A.3, Base Page Types . You may find that you want to store more information about your pages than the base page types allow. If this is the case, you can create your own page types. You base your page type on one of the base page types. The page type automatically inherits all of the base page type’s attributes. But, after you create your page type, you can edit it to add other attributes that are specific to your requirements. These attributes can be other default Oracle Portal attributes, or attributes that you have created yourself. In addition to adding attributes to page types, you can also add calls to PLSQL or HTTP procedures. You can pass attributes as parameters to those procedures if required.

5.2.3.1 Creating a Page Type

To create a page type:

1. In the Navigator, click the link for the page group in which you want to create the

page type. To get to the Navigator click the Navigator link on any page. By default you can find a Navigator link on the Portal Builder page.

2. Click the Page Types link.

3. Next to Create New, click the Page Type link.

4. In the Display Name field, enter a descriptive name for the page type. The

Display Name identifies the page type to other users. It is used in the Portal Navigator and Create Page Page Type list, so shorter display names are better. Use up to 256 characters of any kind, including spaces.

5. From the Base Page Type list, choose the base page type from which you want

your page type to inherit attributes. You can choose from Standard, PLSQL, or URL.

6. Click Create.

7. Click Close.

5.2.3.2 Editing a Page Type

When you first create a page type, it is exactly the same as the base page type from which you chose to inherit attributes. To truly customize the page type, you need to edit it to add more attributes, and possibly procedure calls. Tip: If you create a page type in a particular page group, that page type is available only in that page group. If you want the page type to be available in multiple page groups, either create it in the Shared Objects page group, or if the page type already exists promote it to the Shared Objects page group. See Section 4.6, Sharing Objects Across Page Groups 5-18 Oracle Fusion Middleware Users Guide for Oracle Portal

5.2.3.2.1 Editing the Basic Properties of a Page Type

To edit the basic properties of a page type: 1. Use the Navigator to browse to the page type that you want to edit. To get to the Navigator click the Navigator link on any page. By default you can find a Navigator link on the Portal Builder page.

2. In the row for the page type, click the Edit link.

This opens the Edit Page Type page, displaying the Main tab. The attributes available on the Main tab vary a little from the attributes available when you first create the page type. Notably, the Main tab includes a Name attribute.

3. In the Name field, edit the name of the page type. The name is used internally

only. The default value in the Name field is created from the Display Name provided for the page type when it was created. The Name is truncated to 30 characters and all spaces and special characters are discarded. For example, if the Display Name is Research Development, the Name is ResearchDevelopment. The Name is not case sensitive. It must be unique within its page group and the Shared Objects page group. Use up to 30 alphanumeric characters A to Z, a to z, 0 to 9 and the underscore character _; spaces and other special characters are not allowed.

4. In the Display Name field, edit the descriptive name of the page type. The Display

Name identifies the page type to other users. It is used in the Portal Navigator and Create Page Page Type list, so shorter display names are better. Use up to 256 characters of any kind, including spaces. Changes to the page type Display Name are not reflected immediately on cached pages. To make the change display immediately, you must clear the page groups cache. Go to the Access tab of the page group that owns the page type, and click the Clear Cache link. Any change you make here does not affect the value in the Name field. 5. In the Description field, enter information about the page type that may be useful to others, such as its arguments, functionality, or usage. The description is displayed only when editing the page type.

6. In the Icon field, enter the path and file name of an image to associate with the

page type. Click Browse to locate the image if you are not sure of its path or file name. When you click Apply or OK, the file is uploaded to the Oracle Metadata Repository.

7. Click OK.

Note: You cannot edit the base page types. Tip: If the page type is shared, it will be in the Shared Objects page group. See Section 4.6, Sharing Objects Across Page Groups Note: This icon is not currently used within Oracle Portal. The icon may be used in future releases. Preparing to Add Content 5-19

5.2.3.2.2 Adding Attributes to a Page Type

To add attributes to a page type: 1. Use the Navigator to browse to the page type that you want to edit. To get to the Navigator click the Navigator link on any page. By default you can find a Navigator link on the Portal Builder page.

2. In the row for the page type, click the Edit link.

3. Click the Attributes tab.

4. In the Available Attributes list, select the attributes that you want to add to the

page type.

5. Click the Move icon to move the selected attributes to the Selected Attributes list.

The order of attributes in the Selected Attributes list determines the order in which the attributes are displayed when users create or edit a page of this type. Use the icons to the right of the list to change the order.

6. Click Apply to add the attributes to the page type.

7. When you have added the attributes, you can change their display properties if necessary:

a. In the Default Value field, enter the value to use by default for the attribute. If

page managers do not specify a value for the attribute, the default value is used. You can leave this field blank if you prefer. Multi-valued attributes are not supported for lists of values. That is, users are able to choose only one value from an attribute list of values. This means that attribute values can be displayed in combo boxes and pop-ups, but not as check boxes, drop-down lists, or radio buttons.

b. Select the Required check box if you want it to be mandatory for page

managers to provide a value for the attribute. The attribute will be displayed on the first page of the Create Page Wizard, and the Main tab of the Edit Page page. If you do not select this check box, page managers do not need to provide a value for the attribute and the attribute will be displayed on the Optional tab of the Edit Page page.

8. Click OK.

To remove attributes from the page type, select the attributes in the Selected Attributes list, and click the Remove icon. 5.2.3.2.3 Add a Procedure Call to a Page Type For an example of how you might use a procedure call in a page or item type, see Example 5–1, Adding an HTTP Procedure Call to an Item Type or Example 5–2, Adding a PLSQL Procedure Call to an Item Type . To add a procedure call to a page type: 1. Use the Navigator to browse to the page type that you want to edit. To get to the Navigator click the Navigator link on any page. By default you can find a Navigator link on the Portal Builder page. Tip: If the page type is shared, it will be in the Shared Objects page group. See Section 4.6, Sharing Objects Across Page Groups 5-20 Oracle Fusion Middleware Users Guide for Oracle Portal

2. In the row for the page type, click the Edit link.

3. Click the Procedures tab.

4. From the Type list, choose whether the call is to an HTTP or PLSQL procedure.

5. In the Procedure Call field, enter one of the following:

■ The URL of the HTTP procedure, including the protocol used to access it, for example: http:www.oracle.comsearchindex.html ■ The name of the PLSQL procedure. The procedure must already exist in the database and must be prefixed with its owning schema, for example: SCOTT.MY_PROC The PUBLIC user must be granted execute privileges on the procedure.

6. In the Link Text field, enter the text to display as a hypertext link that users can

click to execute the procedure call. This link is displayed only if the page includes a Page Function item and you do not select Display Procedure Results With Page, or you have not specified an icon. For information about adding a Page Function item to a page, see Section 5.2.3.2.4, Including a Page Type’s Procedure Call on a Page .

7. In the Icon field, enter the path and file name of an image to associate with this

procedure call. If you specify an icon, it is used instead of the Link Text, however you must still enter a value in the Link Text field to serve as the image’s rollover text. Click Browse to locate the image if you are not sure of its path or file name. 8. Select Display Procedure Results With Page to display the results of the procedure call directly in the page instead of displaying a link for users to click. This makes the results immediately visible to users, rather than requiring them to click a link to execute the procedure call themselves. 9. If the procedure you are calling has parameters, you can pass values to those parameters using the attributes you attached to the page type in Section 5.2.3.2.2, Adding Attributes to a Page Type .

a. In the Attribute list, choose the attribute whose values you want to pass to a

parameter in the procedure.

b. In the Pass As field, enter the parameter name if it is different from the

attribute name.

10. Click Apply to add the procedure call to the page type.

11. Click OK.

To remove a procedure call from the page type, click the Delete Procedure icon next to the procedure call in the Existing Procedure Calls section. To edit an existing procedure call, for example, to add more parameterattribute mappings, click the Edit Procedure icon next to the procedure call in the Existing Procedure Calls section. Remember to click Apply to save your changes. Tip: If the page type is shared, it will be in the Shared Objects page group. See Section 4.6, Sharing Objects Across Page Groups Preparing to Add Content 5-21

5.2.3.2.4 Including a Page Type’s Procedure Call on a Page

If a page type includes a procedure call, the link to execute the procedure call will be displayed in a page of that type only if a Page Function item is added to the page. To include a page type’s procedure call on a page: 1. Go to the page where you want to add the Page Function item. For information on locating a page, see Section 8.1, Locating Pages in Oracle Portal .

2. Switch to Edit mode.

3. In the region where you want to add the Page Function item, click the Add Item icon. If you do not see the Add Item icon, the region may be a portlet region, in which case, you cannot add items to this region.

4. From the Built-In Navigation Item Types list, choose Page Function.

If there are no page functions associated with the current page, this item type is not displayed. If you know there are page functions, but this item type does not appear in the list, contact your page group administrator. Your administrator selects which item types to display here. If you do not see Page Function in the list, the page may not have any page functions associated with it or the Page Function item type may not have been included in the page group. For information about how to include this item type, see Section 5.2.2.3, Making an Item Type Available to a Page Group .

5. Click Next.

6. From the Page Function list, choose the page function that you want to include in

the page.

7. Click Finish.

5.2.3.3 Making a Page Type Available to a Page Group

When you create a page type, it is not immediately available for use by page creators. This is because you will probably want to edit the page type first to add attributes and procedure calls. When you are happy with the page type, and are ready for page creators to start creating pages of that type, you must make the page type available in the page group. To make a page type available to a page group:

1. From the Page Groups portlets Work In drop-down list, choose the page group to

be edited. By default, the Page Groups portlet is located on the Build tab of the Builder page.

2. Click the Configure tab.

3. In the Page Defaults section, click the Edit link.

Note: You can also reach the Configure Types and Classification page by clicking the Configure link on the first page of the Create Page Wizard.