General Creating Pagelet Producer Resources and Pagelets

Managing the Oracle WebCenter Pagelet Producer 24-9 To create a new pagelet, select the Pagelets section under the resource you want to use and click the Create icon in the toolbar. A pagelet called new will be added to the list. To modify an existing pagelet, click the pagelet name. Each pagelet has the following configuration pages: ■ Section 24.4.6.1, General ■ Section 24.4.6.2, Preferences ■ Section 24.4.6.3, Parameters ■ Section 24.4.6.4, Clipper

24.4.6.1 General

Enter a Name for the pagelet, and the Library name with which to associate the pagelet. A pagelet library is a user-defined way to group related pagelets. In the URL Suffix box, type the relative path to the pagelet do not include the Source URL prefix you entered for the resource. If you leave the URL Suffix blank, then the entire resource will be considered the pagelet. If you want the pagelet to be refreshed without reloading the entire page, choose Refresh Inline .

24.4.6.2 Preferences

On the Preferences page, enter the relative URLs to any preference pages required by the pagelet global, customize, or personalize. Do not include the Source URL prefix you entered for the resource.

24.4.6.3 Parameters

Data can be passed to pagelets using pagelet parameters or the pagelet payload. Parameters pass name-value pairs to the pagelet application, while the payload is any text, including XML. You can write an XML Schema to describe the XML that a particular pagelet expects and document this by entering a URI to and XSD file or a namespace:name qualifier on this page. This value is for convenience only, it is not used or enforced at runtime. On the Parameters page, enter the Payload Schema or the Parameters that should be passed to the pagelet. To add a parameter, click Create. Enter a Name for the pagelet and choose the Transport type: Request Parameter, Administrative Preference, Community Preference, or Pagelet Preference. Choose whether the parameter is Required and choose the appropriate data Type.

24.4.6.4 Clipper

Clipping allows you to form a pagelet by clipping a portion of a larger web page in a proxied application. For example, in a news web page there is a box listing the latest headlines. By identifying the containing HTML for that box, you can clip only the headlines and serve that subset of the news web page as a pagelet. In addition to clipping a portion of the body of the web page, the pagelets head element can be included by choosing Include head. This allows CSS, JavaScript, or other declarations that occur in the head element to be included with the clipped body portion. ■ To use a graphical tool to select page content, click Launch Clipper. ■ To specify HTML tag attributes that describe the section to be clipped, expand the Advanced Clipper section and enter the tag name and associated attributes. 24-10 Oracle Fusion Middleware Administrators Guide for Oracle WebCenter Keep the following in mind when using the clipper: ■ If the back-end resource is accessed over HTTPS, make sure the Pagelet Producer Console is also accessed over a secure port. ■ If the clip source is protected by a login form or other form of authentication, make sure to configure Autologin for the parent resource as described in Section 24.4.4, Autologin . If you are using the vault to store credential values, make sure to capture the credentials prior to using the clipper. ■ If you are having problems with the clipper, make sure the configured pagelet URL can be loaded by the browser without redirects. If necessary, change the pagelet suffix to reflect the final URL loaded by the browser after following all the redirects.

24.4.6.5 Documentation

The Documentation page displays sample code to access the pagelet and preference editor using either the JavaScript or REST API.

24.4.7 Injectors

A web injector inserts content into a specified location in the proxied resource page. The content may be any text, including HTML, CSS, JavaScript, and pagelet declarations. To create a new web injector, select the Injectors section under the resource you want to use and click the Create icon in the toolbar. A new injector called new will be added to the list. Injectors have the following configuration pages: ■ Section 24.4.7.1, General ■ Section 24.4.7.2, Content

24.4.7.1 General

Enter a Name for the web injector. The injector can be applied to a subset of the resource by typing a URL pattern into the URL Filter box. The injector will be applied only to those URLs within the resource that begin with the text in the URL Filter box. If the box is empty or contains only a ’’, the injector will be applied to the entire resource. To restrict the injector to specific kinds of content, type a comma separated list of MIME types in the MIME Filter box. For example, texthtml restricts the injector to HTML content, while textcss only restricts the injector to CSS content. Define where in the resources output the injection occurs by selecting one of the following: ■ Top puts the content first in the page. Do not use this option to inject pagelet declarations. ■ Bottom puts the content last in the page. ■ The BeforeAfterReplace options put the content into the page relative to the entry provided in the field on the page.

24.4.7.2 Content

Content to be injected may be any text, including HTML, CSS, JavaScript, and pagelet declarations. Content can be entered using the text editor. If the content is HTML, it can optionally be edited using the HTML editor.