Map data in the Client
- Switch to Simplicity for Mobile Devices.
- Now the client needs to display the data it's receiving from the Servlet. First go to the Query screen in the emulator (by pressing the "Back" button if the results screen is showing) and press the query button.
- Now go to the Response mappings node of the Transaction. This is where the information received from the Servlet is displayed. The resultTable data shows up as a node in the right, titled 'resultTable_tableData'.
- Choose the Replace text on the left under Stringitem3.
- Select resultTable_tableData on the right. This will replace the text of the StringItem in the Results form with the data from the table. resultTable_tableData will appear in the tree on the left to indicate that this substitution will be made.
- Before testing this change, Select the Display options node of the transaction. We now want the client to switch displays after a transaction has occurred. Choose 'results' from the popup list on the top of the Property page as the display to switch to after a transaction has completed.
- Now you may test the client. Enter the word "printer" into the query Text Box, if it is not already there.
- Press the Query button on the query screen of the Emulator. The client will send its request to the servlet, receive data, and display the results on the form page.
A problem is immediately apparent. The query was of "printer", and information about cables came back. This is because the Servlet always performs the same query. It's time to refine the Servlet one last time so that it will perform a search based on the information sent to it from the client.
| Data Representations, Inc. http://www.datarepresentations.com support@datarepresentations.com sales@datarepresentations.com |