Creating the SSCAMaster 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 SSCAMaster 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 the JDBC information. The JDBC connection allows the master application to access a database and extract specific database information. This example uses sampledb on port 4747.

    1. Select the JDBC URL option.

    2. Complete these options:

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

      • Password – enter SQL, which is the password used to access the ASA 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

    NoteIf you click on the R & D row, the query does not work because of the “&”.

  6. Click Next. The Define window displays.

  7. Use the Define window to identify record 1 as the header row. In the Define Record Layout section, click “Records contain labels,” accept the default, 1, in the “Labels are displayed in Record” option, then click Next.

  8. On the Filter window, click Next.

  9. On the Configure Parameters window, click Next.

  10. In the Window Preview window, in Element Name, enter SSCAMaster. Under Window Preview, notice the grid showing Dept Name and Dept Head.

    Click Finish.

  11. On the Application Builder window, click Save.

  12. In the Finish window, accept all the defaults and click Finish to save the application..

  13. Click OK to confirm.

  14. Click Close to exit the Application Builder.

  15. In Mobile Web Studio, approve the application:

  16. Select Approved from the Application Manager Status menu. You see your newly approved SSCAMaster application in the detail pane.