Clear the Edit Wizard check box if you do not want to display the attribute on

5-12 Oracle Fusion Middleware Users Guide for Oracle Portal 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 region containing the item displays the Associated Function attribute and you do not select Display Procedure Results With Item , or you have not specified an icon. For information about adding the Associated Function attribute to a region, see Section 5.2.2.2.4, Including an Item 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 Item 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 item type in Section 5.2.2.2.2, Adding Attributes to an Item 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 item type.

11. Click OK.

To remove a procedure call from the item 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. Example 5–1 Adding an HTTP Procedure Call to an Item Type Imagine that your portal provides movie reviews to subscribers. To customize the hundreds of movie reviews you plan to upload, you create a Movie Review item type to use for each review. Knowing that users will want to find additional information about each movie, you decide to include a link to a search engine within the review. To include this link, you choose HTTP as the procedure type, and add the following to the Procedure Call field Figure 5–1 : http:www.google.comsearch You include the Link Text Click here for more..., and you specify an icon to associate with the procedure. You choose not to display the procedure results with the item because you want users to click the icon to access the search. For the search engine to return information about the appropriate movie, you need to pass it the movie title. Say your Movie Review item type includes an attribute called Preparing to Add Content 5-13 Movie Title. To pass the value in this attribute to the search engine, you select it in the Attribute list you could also use the Display Name attribute if it is used to store the title of the movie. Finally, you need to make sure that the attribute value is sent to the correct search engine parameter. In the case of Google, the search parameter name is q, so you enter this name in the Pass As field Figure 5–2 . This information is appended to the Procedure Call as follows: http:www.google.comsearch?q=MovieTitle Each movie review will now include a link to a customized search based on the movie title Figure 5–3 . When users click the specified icon, the customized search content based on the movie title displays Figure 5–4 . The movie title, which is the search criteria, displays at the top of the search results page. Figure 5–1 Adding an HTTP Procedure Call to an Item Type Figure 5–2 Passing Attribute Values to HTTP Procedure Parameters Figure 5–3 Example Movie Review Item Figure 5–4 Example Movie Review Procedure Call Results Example 5–2 Adding a PLSQL Procedure Call to an Item Type Imagine that you have written the following procedure that displays the creator and create date of an object in an HTML table: -- -- procedure display_attributes -- created Monday 17-JUN-2002 10:35 -- create or replace procedure display_attributes 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