Lesson 2: Creating a mobile application

In this lesson, you will create a mobile application that includes data from the SybStore database warehouse_inventory table.

NoteBefore you begin this lesson:

See “Starting and connecting to the MySybStore database” and “Starting and connecting to the Unwired Accelerator server” for details.

  1. In the WorkSpace main window, select the Enterprise Explorer tab if that view is open. If that view is not open, select Window|Show View|Enterprise Explorer to open the view.

  2. Expand the Mobile Servers folder to locate MyMobileServer.

  3. Right-click MyMobileServer and select Ping from the context menu to test the connection.

  4. When the Ping Succeeded message displays, click OK.

  5. In the Enterprise Explorer view, right-click MyMobileServer and select Connect from the context menu.

    The Unwired Accelerator version appears beside MyMobileServer, indicating the connection is established.

  6. Select File|New|Mobile Application from the WorkSpace main menu bar.

  7. When the Mobile Application Wizard opens, complete these options:

    Click Finish.

    The Mobile Application editor appears. By default, the Introduction tab displays additional help which you can use to get started.

  8. Select the Definition tab.

    The Elements section of the Definition page is where you add specific content to the mobile application. You can add one or more elements to each mobile application. In this lesson, you will add a database element.

    The icons at the top of the Elements pane represent supported content sources:

    The Mobile Templates portion of the Definition page is where you define which template to use for each device type.

    You can display the same content on different device types. You can choose which template to use for each device to provide the best content presentation. When a given device type connects to Unwired Accelerator, the content is rendered using the assigned template.

  9. Click the database element icon in the Elements section.

    The New Mobile Application Element wizard displays.

  10. Select Connection Profiles in the Database Connections section, then select MySybStore from the drop-down list.

  11. In the SQL Query section, choose Select from the Visual SQL drop-down list, then click the Visual SQL button. The database Select window opens, which allows you to visually create SQL for the selected statement.

  12. Select the warehouse_inventory table and click Open.

  13. Select the first five columns in the table by clicking on each column in the Table Layout pane.

    Each column is added to the Selection List toolbar and to the SELECT statement in the Preview window. You are now finished creating the SELECT statement.

  14. Click OK. The SELECT statement appears in the SQL Query pane.

  15. Click Validate to perform a syntax check on the SQL.

  16. When you see a message that the SQL validated successfully, click OK, then click Preview to display the SQL query in the preview pane.

    NoteIf the data that displays in the preview does not resemble the preceding image, make sure you initialized the tutorial database. See “Initializing the tutorial database” for instructions.

  17. Click Next. The Rules page of the wizard appears.

  18. In the Record Layout section, select Row and the Records Contain Labels option, then click Preview.

    The preview highlights the column headers.

  19. Click Finish to return to Definition tab of the Mobile Application editor.

    The element that you created displays in the Elements section.

  20. Select File|Save from the WorkSpace main menu bar to save the mobile application.

    NoteAlways save mobile applications before selecting Preview.

  21. Select the Preview tab in the Mobile Application editor.

    By default, the preview shows how the content would look displayed in a portal with a desktop browser.

  22. Click the PDA icon to preview the display.

  23. Select File|Close All from the WorkSpace main menu to close the preview window and editor.