Creating multiple-page applications  Creating the SSCA Department application

Chapter 3: Creating a Multipage Mobile Application

Creating the SSCA Master application

In this step, define the SSCA Master application. The master application displays a list of departments within an organization. The application has two columns for department name, and department manager data.

StepsDefining the SSCA Master application

  1. Log in to Mobile Web Studio.

  2. Select Applications from the Build menu in the left pane, select New under Application Manager, and click the New button to launch Application Builder.

  3. Click the down-arrow to the right of Add, and select Database Element.

  4. In the Database Elements Definition window, enter Java Database Connection (JDBC) information. The JDBC connection allows the master application to access a database and extract specific database information.

    The values in this example assume that the database included with Mobile Web Studio—sampledb—has been started and that it is accessible on port 4747.

    1. Select the JDBC URL option.

    2. Complete these options:

      • Username – enter dba, which is the database user name.

      • Password – enter SQL, which is the password used to access the database.

      • JDBC Connect URL – enter the URL used by JDBC to connect to the database:

        jdbc:sybase:Tds:localhost:4747?ServiceName=
        sampledb
        
      • JDBC driver – enter the JDBC driver used to connect to the database, in this case:

        com.sybase.jdbc2.jdbc.SybDriver
        
      • SQL Query String – enter the following SQL code to select department heads for each department from sambledb:

        select d.dept_name as 'Dept Name', e.emp_fname + ' ' + e.emp_lname as 'Dept Head' from department d, employee e where d.dept_head_id = e.emp_id
        
      • UI XSLT – leave this field empty.

  5. Click Preview. A two column table showing Dept Name and Dept Head displays in the Preview panel.

    Dept Name

    Dept Head

    R & D

    David Scott

    Sales

    Judy Snow

    Finance

    Mary Anne Shea

    Marketing

    Scott Evans

    Shipping

    Jose Martinez

  6. Click Next. The Split window displays.

  7. Click Next to bypass these options.

  8. Use the Define window to identify record 1 as the header row. In the Define Record Layout section:

  9. On the Filter window, click Next. The parameter definition window displays.

  10. On the parameter definition window, click Next. The Window Preview displays.

  11. In Element Name, enter SSCA Master. Under Window Preview, notice the grid showing Dept Name and Dept Head.

    Click Next.

  12. On the Continuous Capture Page, click Finish.

  13. On the Application Builder window, click Save to create the application.

  14. In the Finish window, change this entry (accept all other defaults).

    Content tab

  15. Click Finish to save the application.

  16. Click OK to confirm.

  17. Click Close to exit the Application Builder.

  18. In Mobile Web Studio, approve the application:

  19. Select Approved from the Application Manager Status menu. You see your newly approved SSCA Master application in the detail pane.





Copyright © 2005. Sybase Inc. All rights reserved. Creating the SSCA Department application

View this book as PDF