![]() |
![]() |
![]() |
![]() |
Mapping a complex query
We will now set up the UI mapping so the user will be able to interactively change the query.
- Select the UI Mapping page of the Database Editor.
- Scroll the tree toward the bottom, so that you can see the second query, which you have named 'descriptionQuery'.
- 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.
- Click once on "DESCRIPTION" in the part of the tree which is under 'descriptionQuery'.
- Choose 'jTable' from the area to the right.
- Click once on "PRODUCT_NUM" in the same part of the tree.
- Choose 'jTable' from the area to the right.
- Map "PURCHASE_COST" to 'jTable' in the same manner.
- Map "QTY_ON_HAND" to 'jTable' in the same manner.
- Click once on the "< Execute Statement >" action command which is under 'descriptionQuery'.
- Select the "searchFor" item on the right to associate it with the 'descriptionQuery' command.
- 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.
- Select "nameToSearchFor" from the right hand column.
- Press "Apply Changes".
You may now close the database editor and test your application.
Data Representations, Inc. http://www.datarepresentations.com support@datarepresentations.com sales@datarepresentations.com |
![]() |
![]() |
![]() |
![]() |