Connecting to a View Wrapper
The Investment application is nearly complete, with just a few more connections left to make. Most importantly, you need to connect the MainWindowView part to the secondary BuySecurityView and SellSecurityView parts.
You need to make event-to-action connections between the push buttons of the main window and the secondary windows. To open the secondary windows when the push buttons are clicked, you need to connect the clicked event of the Push Button part to the openWidget action of the secondary window View Wrapper parts.
1. Open the Composition Editor for the MainWindowView part.
2. Connect the clicked event of the Buy push button to the openWidget action of the BuySecurityView view wrapper part.
3. Connect the clicked event of the Sell push button to the openWidget action of the SellSecurityView view wrapper part.
4. If you want to test your work, you need to add an initial item to the Drop-down List part, because the Buy and Sell push buttons are only enabled when an item is selected in the Drop-down List part. Do the following:
a. Open the Properties window for the Drop-down List part and click on the value cell for the items property.
b. Click on
to display the
items window.
c. Select Add and enter some sample text into the edit field in the table.
d. Select OK to close the Items window.
e. Click anywhere on the Composition Editor to apply the properties changes.
Your connections for the MainWindow should look like this:
Last modified date: 03/26/2020