Overview  Chapter 9: Deploying Applications to BlackBerry Devices

Chapter 8: Creating a Composite Application

Composite application tutorial

The tutorial shows you how to use the Composite Application Builder to create a composite application comprised of three new applications, and the Most Actives application you created in Chapter 6, “Creating a Multipage Mobile Charting Application.”

StepsCreating and approving the MostActives application

  1. From Mobile Web Studio, select Applications in the Build menu in the left pane, select New under Application Manager, and click the New button to launch Application Builder.

  2. In Application Builder, click Add to launch the New Web Element window.

  3. In Location, enter the following URL, and click Find:

    http://finance.yahoo.com/actives?e=o
    
  4. Click Next in the top right portion of the New Web Element window.

  5. Perform a one-click capture by moving your mouse over the six-column Volume Leaders table under U.S. Most Actives table, and clicking the mouse once (a flag follows your cursor with abbreviated instructions).

    NoteThe Web site changes periodically. If you do not see the six-column table with data, close the window and repeat the previous steps until you do, otherwise the tutorial will not work.

    You see a preview page where you select how much content to display.

  6. Click the Select button next to the six-column data grid, (you can use the scroll bar to scroll through the various options).

    Figure 8-1: Selecting the most active stocks grid

    NoteIf you do not see the six-column data grid, close the window and repeat the process until you do, otherwise the tutorial will not work.

    Click Next. The Split window displays.

  7. On the Split window, notice that Column 3 includes several values—volume, time, and time zone. Split Column 3 into separate columns to accommodate each value:

  8. Click Next to continue.

  9. On the Define window, select the “Records contain labels” check box. The “Labels are displayed in Record” option displays.

    Accept the default value 1, and click Next to continue. The Filter window displays.

  10. Use the Filter window to identify the columns you want to include in the application.

  11. Click Next. The parameter definition window displays with the parameter used to capture the table.

  12. Check the Variable check box to the left of “e.” This exposes the parameters for the variable.

  13. Click Next. The Window Preview window displays the modified table and a drop-down list. The links and drop-down list are not active.

  14. In Element Name, enter MostActives (no space) as the name for this Web element, and click Next. The Continuous Capture window displays.

  15. On the Continuous Capture window, click Finish. The New Web Element window closes.

  16. On the Application Builder window, the MostActives element appears under Element List. In the detail pane, the application displays. The links are not yet active, but the drop-down list includes the three options.

  17. Click Save to create the application.

  18. On the Finish window, make these entries (accept the defaults for all others):

    Content tab In Name, enter MostActives (no space).

  19. Click Finish to save the application, and click OK in the Application Saved Successfully window.

  20. Click Close in the upper-right corner to close the Application Builder window.

  21. From the Mobile Web Studio main window, select New from the Application Builder Status menu. The MostActives application displays in the detail pane.

  22. Right-click the MostActives (no space) application and select Approval Status | Approved.

  23. Click OK.

  24. Select Approved under Application Manager Status and verify the MostActives application displays.

StepsCreating and approving the Markets application

In this step, create a market overview application.

  1. From Mobile Web Studio, select Applications in the Build menu in the left pane, select New under the Application Manager Status menu, and click the New button in the Application Manager toolbar. The Application Builder window displays.

  2. In Application Builder, click Add to launch the New Web Element window.

  3. In Location, enter the following URL, and click Find or press Enter:

    http://money.cnn.com/markets/us_markets.html
    
  4. Click Next in the top right portion of the New Web Element window.

  5. Perform a one-click capture by moving your mouse over the U.S. Stock Markets table and clicking the mouse once (a flag follows your cursor with abbreviated instructions).

    You see a preview page where you select how much content to display.

  6. Click the Select button next to the data grid with the arrows in Column 3 (you can use the scroll bar to scroll through the various options), and click the Next button. The Split window displays.

    Figure 8-2: Selecting the market grid

  7. On the Split window, click Next to continue.

  8. On the Define window, select the “Records contain labels” check box. The “Labels are displayed in Record” option displays.

    Enter 2, and click Next to continue. The Filter window displays. Record 2 is highlighted.

  9. Use the Filter window to identify what to include in the application.

    Identify the fields to include:

    Identify the records to exclude:

  10. Click Next. The Window Preview window displays the modified table.

  11. In Element Name, enter Markets as the name for this Web element, and click Next. The Continuous Capture window displays.

  12. Click Finish. The New Web Element window closes and Markets appears under Element List.

  13. Click Save to create the application.

  14. On the Finish window, make this entry (otherwise accept the defaults):

    Content tab In Name, enter Markets.

    Window Preview At the bottom of the Finish window, you can see a preview of your application. The links do not work.

  15. Click Finish to save the application, and click OK in the Application Saved Successfully window.

  16. Click Close in the upper-right corner to close the Application Builder window.

  17. From the Mobile Web Studio main window, select New from the Application Builder Status menu. The Markets application displays in the detail pane.

  18. Right-click the Markets application and select Approval Status | Approved.

  19. Click OK.

  20. Select Approved under Application Manager Status and verify the Markets application displays.

StepsCreating and approving the Energy application

In this step, create an energy overview application

  1. From Mobile Web Studio, select Applications in the Build menu in the left pane, select New under the Application Manager Status menu, and click the New button in the Application Manager toolbar. The Application Builder window displays.

  2. In Application Builder, click Add to launch the New Web Element window.

  3. In Location, enter the following URL, and click Find:

    http://money.cnn.com/markets/commodities.html
    
  4. When the window redisplays, click Next in the top right portion of the New Web Element window.

  5. Perform a one-click capture by moving your mouse over the Energy table and clicking the mouse once (a flag follows your cursor with abbreviated instructions).

    You see a preview page where you select how much content to display.

  6. Click the Select button next to the data grid with data in ENERGY, ENERGY3, ENERGY5, ENERGY7, ENERGY9, and so on (you can use the horizontal scroll bar to view wide tables, and the vertical scroll bar to scroll through the various presentation options).

    Figure 8-3: Selecting the energy grid

  7. Click the Next button. The Split window displays.

  8. On the Split window, split the first column, using the open parenthesis as the delimiter. Make sure the grid displays in Preview, and make these entries:

  9. Click Next to continue.

  10. On the Define window, select the “Records contain labels” check box. The “Labels are displayed in Record” option displays.

    Enter 2 to use the labels in Record 2, and click Next to continue. The Filter window displays.

  11. Use the Filter window to identify the columns you want to include in the application.

    Under Add Filter Rule, identify the fields to include:

    Identify the records to exclude:

  12. Click Next. The Window Preview window displays the modified table.

  13. In Element Name, enter Energy Futures as the name for this Web element, and click Next. The Continuous Capture window displays.

  14. Click Finish. The New Web Element window closes.

  15. On the Application Builder window, the Energy Futures element appears under Element List.

  16. Click Save to create the application.

  17. On the Finish window, make this entry (accept the defaults for all others):

    Content tab In Name, enter Energy.

    Window Preview At the bottom of the Finish window, you can see a preview of your application.

  18. Click Finish to save the application, and click OK in the Application Saved Successfully window.

  19. Click Close in the upper-right corner to close the Application Builder window.

  20. On the Mobile Web Studio main window, select New from the Application Builder Status menu. The Energy application displays in the detail pane.

  21. Right-click the Energy application and select Approval Status | Approved.

  22. Click OK.

  23. Click Approved under Application Manager Status and verify the Energy application displays.

StepsCreating the composite application

In this step, place the MostActives (no space), Most Actives, Markets, and Energy applications into a single composite application.

  1. While logged into Mobile Web Studio, click on Composite Apps in the Build menu. The Composite App Manager menu displays in the middle pane.

  2. In the toolbar, click the blue, down-arrow to the right of the New button and select New Mobile Application. The Composite Application Builder displays.

  3. Click the down-arrow to the right of the Tab Flow button, and select “2 Tab Layout” from the menu.

  4. Double-click to highlight Tab 1, and enter Stocks to rename the tab.

  5. Double-click to highlight Tab 2, and enter Market to rename the tab.

  6. Click the Add button to open the Search window.

    In the Search window, click the Search button. After a moment, all applications with the Approved status display.

  7. While holding the Control key, select each of these applications:

    Once all of the applications are highlighted, click the Add button

  8. All of the applications are added to the Composite Application Builder window. Using the right side of the screen, drag and drop the applications into position:

    Figure 8-4: Composite Application Builder

  9. Click the Save button to create the composite application.

  10. In the Composite Application Properties window:

  11. Click OK to save the Composite Application, and click OK to confirm.

  12. On the Composite Application Builder window, click the Deploy button. The Create Mobile Application window displays.

  13. In Group, select employees (the group you created in “Working with groups”) from the drop-down list, and click OK to deploy the Composite Application to that group.

  14. Click OK to confirm.

  15. Click Close to close the Composite Application Builder window.

  16. After synchronizing your mobile device you will see the Composite Mobile Application, Markets, if you are a member of the employees group.

    Figure 8-5: Example composite application

    Select the application you want to use, such as MostActives, from the drop-down list. Select the appropriate tab, Stocks or Markets, to view specific information.





Copyright © 2005. Sybase Inc. All rights reserved. Chapter 9: Deploying Applications to BlackBerry Devices

View this book as PDF