Binding the User Interface to Scenario Data
The View Designer features components that make it easy to access bulk model data. This section will add to the vdl file created in previous sections to add a table of data into a Column titled
RESULTS.
Perform the following steps to update the View.
The applied changes are shown:
- The expected return on investment can be edited directly in the INPUT DATA table. The scenario can be run as required using the RUN OPTIMIZATION button.
- The fields in the header row come automatically equipped with small widgets that enable column sorting.
- The RESULTS table:
- displays a data table detailing the proportion of capital allocated to each share type.
- displays the pagination control to display on the bottom right. The drop-down menu in the pagination control enables page navigation and selection of the number of entries per page.
- has a Search box enabled at the top, while the ticked box for Column Filters has enabled search boxes at the top of each column.
- has 5 rows as configured and displays both the entries and the corresponding index entries for the Shares_fraction entity. Column headings reflect the aliases assigned in foliodata.mos.
The app has a production-ready table that is bound to the underlying model data. As a user interface developer, you do not need to worry about lower level concerns like data marshaling and synchronization, styling, implementing search, and pagination.