Preview tab  Importing and exporting portlets

Chapter 1: Developer Features

Portlet charting enhancements

EP allows you to create drill-down charts using the charting post-processing wizard. Drill-down charts use server-side click-across to link multiple charting portlets together into a cohesive application.

To create a drill-down charting portlet for two chart portlets, there must be a relationship between the category or series names of the first chart and the parameters used in defining the second chart’s data source.

This section has procedures to illustrate the creation of drill-down charts using server-side click-across. You create a table of data with the stock market’s most active stocks and use drill-down charting to display the quote page with details of a selected stock.

StepsCreating the Stock Details portlet

  1. Log in to Web Studio.

  2. Select Portlets from the Build menu in the left pane, select New from the Portlet Manager Status menu, then click the New button to launch the Portlet Builder.

  3. Click the arrow to the right of the Add button and select Web Element

  4. When the New Web Element window appears, enter http://finance.yahoo.com/ in the Location field and click Find.

  5. When the Yahoo Finance Web site displays, enter SY in the Enter Symbol field below the Yahoo Finance title bar, and click GO.

  6. In the New Web Element window, verify that One Click is selected as the Format, and click Next.

  7. Perform a One Click capture on the left column of the Sybase stock details table; that is, when the yellow selection box displays, click on the Last Trades cell.

  8. In the window where you choose which capture option to use, click Select to the left of the top grid capture, which should look like the capture option shown below, then click Next.

  9. On the Add Split Rules window, click Next to bypass the options.

  10. On the Define Record Layout window, click Next to bypass the options.

  11. On the Filter window, in the Add Filter Rule section, select “Include record(s)” and “number”, enter 1,4,5,8 in the text field, click Add, then click Next. The result looks similar to Figure 1-2.

    Figure 1-2: Add Filter Rule

  12. On the Parameters window, select the Variable option for the “s” parameter and complete these options for that parameter:

    Click Next.

  13. On the Window Preview, enter Stock Details for the element name and click Next.

  14. On the Continuous Capture window, because you do not want to perform a continuous capture, do not to click Continue, and click Finish.

  15. In the Portlet Builder, click Save.

  16. In the New Portlet Finish window, complete these options:

    Content tab Enter Stock Details in the Name field. The In Context option is selected by default.

    Roles tab Click Add All.

    Click Finish.

  17. When you see the message that the portlet was successfully saved, click OK.

  18. Close the Portlet Builder. Back in the Web Studio main window, select New from the Portlet Manager Status menu.

  19. Right-click the Stock Details portlet in the details pane and select Create Chart. The Create Chart wizard appears.

  20. In the Choose a Selection window, click Select next to the table and click Next.

  21. Complete the following options in the Select Chart Type window:

    Click Next to continue.

  22. On the Chart Parameters window, set these options:

    Click Next to continue.

  23. In the Preview window, click Finish.

  24. In the Web Studio main window, right-click the Stock Details portlet in the detail view and select Approval Status | Approved.

  25. When you see the confirmation that the portlet was saved successfully, click OK.

StepsCreating the Most Actives stock portlet

  1. In Web Studio, select Portlets from the Build menu in the left pane, select New from the Portlet Manager Status menu, then click the New button to launch the Portlet Builder.

  2. Click the arrow to the right of the Add button and select Web Element.

  3. When the New Web Element window appears, enter http://finance.yahoo.com/ in the Location field and click Find.

  4. When the Yahoo Finance Web site displays, click the Most Actives link above the Market Overview.

  5. In the New Web Element window, verify that One Click is selected as the Format, and click Next.

  6. Perform a One Click capture on the Most Actives stock table; that is, when the yellow selection box displays, click on the Symbol header cell.

  7. In the window where you choose which capture option to use, click Select to the left of the top grid capture, which should look like the capture option shown in Figure 1-3, then click Next.

    Figure 1-3: Select capture option

  8. On the Add Split Rules window, set the following:

  9. On the Define Record Layout window, click Next to bypass the option.

  10. On the Filter window, in the Add Filter Rule section, set the following:

    1. “Include record(s)” and “number”, enter 2-6 in the text field, and click Add;

    2. “Include field(s)” and “number”, enter 1,3 in the text field, and click Add.

    Click Next.

  11. On the Parameters window, click Next to bypass the options.

  12. In the Window Preview window, enter Most Actives for the Element Name.

  13. On the Continuous Capture window, click Finish.

  14. In the Portlet Builder, click Save.

  15. In the New Portlet Finish window:

    Content tab Enter:

    Roles tab Click Add All to add all of the available roles to the assigned roles list.

    Click Finish.

  16. Close the Portlet Builder. Back in the Web Studio main window, select New from the Portlet Manager Status menu.

  17. Right-click the Most Actives portlet in the details pane and select Create Chart.

  18. In the Create Chart wizard, click Select next to the table and click Next.

  19. Complete the following options in the Select Chart Type window:

  20. Click Find Portlet.

  21. When the Search window displays, click Search, select the Stock Details portlet in the Results pane, then click Add. The Name, Resource ID, and Window ID of the associated portlet display.

  22. Click Next to continue.

  23. In the Chart Parameters window, complete these options:

    Click Next to continue. The Most Actives chart displays in the Preview window.

  24. In the Preview window, click Finish.

  25. In the Web Studio main window, right-click the Most Actives portlet in the detail view and select Approval Status | Approved.

  26. When you see the confirmation that the portlet was saved successfully, click OK.

StepsPreviewing the drill-down chart portlet

  1. Select Approved from the Portlet Manager Status menu.

  2. Select the Most Actives portlet in the detail pane and click Preview.

  3. Click one of the bars in the bar chart. You see the Stock Details charting portlet with a bar chart for the selected company.





Copyright © 2004. Sybase Inc. All rights reserved. Importing and exporting portlets

View this book as PDF