Actions Example 11: Window with Separate Search Dialog
This example features a dialog for permanent assistance with querying data in another window. The example shows how to define object-like properties for handling interaction between windows.
The Find Existing Reservations dialog is opened by clicking on a "Find Existing..." button in the Reservations window.
Both the info window and the dialog can remain open between queries. Each time the user clicks the Find button in the dialog, data corresponding to the search conditions are retrieved in the info window.
Each time the user clicks Find, the dialog passes the two current search conditions to the info window. The dialog has a user-defined property of type Reservations (the info window), in which it stores the info window from which it was called.
The reason why you must use a user-defined property returning an object, not a string, is that the dialog must be able to start queries repeatedly. Only if the dialog refers to the calling window as a real object does it have access to all the objects within that window. It is not a simple matter of passing a first-time-only string to the info window.
In other words, the dialog must "remember" what info window it is serving. It receives the internal object identifier of the runtime info window when it is opened from it.
Continue with Find Existing Reservations Dialog.