Capture formats  Creating XML elements

Chapter 4: Building Portlets

One-click

Enterprise Portal uses a one-click content capture technology that allows users to create portlets from Web accessible sources.

Using this technology, you use links to navigate to the page that has the information from which you want to create a portlet. The content capture technology allows you to select only those pieces of information that you want use in a portlet.

Because of the numerous technologies that are used, you cannot always navigate to every possible page and successfully create portlets from all Web accessible sources. You may not be able to navigate to some sites or pages within sites. You may also not be able to create a portlet using the exact piece of information that is viewable to the user on a Web page. Especially challenging are Web sites that use JavaScript to generate some or all of an HTML page, and sites that use frame-based solutions.

Once you create a portlet using a Web accessible source, the portlet gets the current information from the source. If the layout of the information on the original page changes, the underlying technology attempts to locate the correct piece of information that represents the portlet’s content. However, the portlet can lose its content or obtain an incorrect piece of information because of changes in the source site. In such a case, the portlet is broken and must be re-created.

The one-click capture strategy allows you to target a specific area on a Web page from which to capture content. Click the left mouse button in a suitable area, indicated by a shadow-box that trails the mouse arrow. The capture option window displays the “best guess” capture from the specified area.

Web elements do not store static HTML, but instead are defined by a CCL statement that dynamically retrieves the content from its source. The CCL statement consists of:

When Web Studio executes the CCL statement, the capture technology parses the Web page and returns the piece of content that matches the feature tag. If an exact match cannot be determined, the content with the closest matching feature tag is returned. This allows the Web Studio to render the correct Web element even though the content, location, or formatting of the source may have changed.

StepsCreating a Web element

  1. Select Web Element. You see the Web Element Definition window. Enter a beginning uniform resource locator (URL)—the Internet address—of the Web content you want to capture in the Location text field, then click Find.

  2. When the location you entered displays, navigate to the page that contains the desired content, then click Next.

  3. Select the capture strategy from the Format drop-down list. This example uses the one-click capture format, so you select the content you want to capture. If you chose one of the other formats, only those elements that match the chosen format display.

  4. If necessary, select one, both, or neither (the default) of the two options to the left of the Back button. These options (CapAll and ACX) are not exclusive; they are separate, independent options.

    To capture all GETs and POSTs, and also pass the final HTML or JavaScript through the ActiveX component, select both CapAll and ACX.

    NoteThe CapAll and ACX options are only available in Web Studio from Portlet Builder. These options are not selectable from within Portal Interface. Once you select CapAll or ACX for a portlet, the options cannot be unselected, and a portlet rendered with these options will always play back in Portal Interface with these options used.

    Using CapAll and/or ACX can cause a significant performance hit during portlet play back, as more interaction is required between the EP server and the Web server from which the content is being captured.

  5. Click Next.

    NoteWhen you create a portlet using one-click capture, and the portlet content contains numerous links, some of the links may not work properly due to underlying JavaScript or redirect code in the link content.

  6. Click the left mouse button in a suitable area, indicated by a shadow-box that trails the mouse arrow and says “Select it”.

  7. The capture option window displays the “best guess” capture from the specified area.

    Click the light blue button to the left of the option you want to select. The button changes to a darker blue when you select it. Click Next.

  8. Enter a name for the element, then click Finish. You return to the Portal Builder where the new element displays.

NoteRegardless of the element type, the procedure to save the element and portlet is the same. See“Saving portlets”.





Copyright © 2004. Sybase Inc. All rights reserved. Creating XML elements

View this book as PDF