The design of Main Page uses the Visible property of tables and table columns to control the layout by switching on/off the display of table components depending on end user actions.
User-driven display of one table in a set
The design of Main Page consists of three tables, which are, from top to bottom:
•To hold controls for user interaction that will determine the way data is displayed
•To display the book catalog as a list, visible when the end user selects the List radio button
•To display the book catalog as a table, visible when the end user selects the Table radio button
The book catalog is displayed as a list or as a table, not both. This is defined using he following mechanisms:
1.When the radio button choice is made (List or Table), the node $PERSISTENT/Root/@show-as-list receives a value of 1 for List or 0 for Table.
2.The Visible property of the table (in the design) that displays the book catalog as a list is set to: $PERSISTENT/Root/@show-as-list = 1. So this table will become visible only when the radio button choice is List.
3.The Visible property of the table that displays the book catalog as a table is set to: $PERSISTENT/Root/@show-as-list = 0. So the visibility of this table is switched on only when the radio button choice is Table.
Conditional display of table columns
The topmost table of Main Page (screenshot below) consists of two one-row tables. The display of several columns in these two table have been made conditional on certain user selection. To see these settings. click inside a column and then look at the XPath expression of the Visible property of that table column.
The visibility conditions of some of these columns are given below:
•The column of the Horizontal Slider (highlighted in blue above) is visible when the List radio button is selected, invisible when the Table radio button is selected.
•The column of the Fit to Screen check box is visible when the Table radio button is selected, invisible when the List radio button is selected.
•The columns of the Search How combo box and Search Term edit field are visible when the Search check box is selected, invisible when it is not selected.
•The column of the Add Record button is visible when the Search check box is not selected, invisible when it is selected.