TOC PREV NEXT INDEX



Mapping a complex query


We will now set up the UI mapping so the user will be able to interactively change the query.

  1. Select the UI Mapping page of the Database Editor.
  2. Scroll the tree toward the bottom, so that you can see the second query, which you have named 'descriptionQuery'.
  3. Expand the 'descriptionQuery' part of the tree, if it is not already expanded. You may wish to collapse the 'inStock' part of the tree to avoid confusion.
  4. Click once on "DESCRIPTION" in the part of the tree which is under 'descriptionQuery'.
  5. Choose 'jTable' from the area to the right.
  6. Click once on "PRODUCT_NUM" in the same part of the tree.
  7. Choose 'jTable' from the area to the right.
  8. Map "PURCHASE_COST" to 'jTable' in the same manner.
  9. Map "QTY_ON_HAND" to 'jTable' in the same manner.
  10. Click once on the "< Execute Statement >" action command which is under 'descriptionQuery'.
  11. Select the "searchFor" item on the right to associate it with the 'descriptionQuery' command.
  12. Click on the item in the tree which reads "[ 'java' ]". Before executing the SQL statement, we want to replace the text 'java' with the value in a text field so users can specify what to search for. The input field that is chosen here will supply the new text.
  13. Select "nameToSearchFor" from the right hand column.
  14. Press "Apply Changes".

You may now close the database editor and test your application.

  1. Press the "connect" button in your application to connect to the database.
  2. Type something to search for in the text field at the bottom. Try typing "Java", "ram", and "IN" in the text field at the bottom and then pressing the 'search for' button.

Data Representations, Inc.
http://www.datarepresentations.com
support@datarepresentations.com
sales@datarepresentations.com
TOC PREV NEXT INDEX