yvonne.milne
2014-03-19, 09:54
The example_uistates sample App included in the Lianja App Builder distribution demonstrates the use of UI States. Not sure how it's put together? Then read on...
To see what the App does, switch into Runtime View and click the 'Hide Orders' button:
589
You should see the 'Orders' grid disappear:
590
Click the 'Show Orders' button and the grid will reappear.
The 'visible' property of the 'Orders' grid is being set based on a change of UI State. The UI State is being set in the Click event of the buttons. Switch back to the Development View and open up the Field Attributes for the 'Show Orders' button (double click on the border of the button). Here you will see the inline delegate to change the state to 'state1'.
591
If you do the same for the 'Hide Orders' button, you will see that clicking the button changes the state to 'state2'.
592
The UI States are defined in the UI States Editor and written to a table called <app-name>_uistates - here example_uistates_uistates. When you first open the UI States Editor, you will be prompted to allow the table to be created if it does not already exist.
593
contd.
To see what the App does, switch into Runtime View and click the 'Hide Orders' button:
589
You should see the 'Orders' grid disappear:
590
Click the 'Show Orders' button and the grid will reappear.
The 'visible' property of the 'Orders' grid is being set based on a change of UI State. The UI State is being set in the Click event of the buttons. Switch back to the Development View and open up the Field Attributes for the 'Show Orders' button (double click on the border of the button). Here you will see the inline delegate to change the state to 'state1'.
591
If you do the same for the 'Hide Orders' button, you will see that clicking the button changes the state to 'state2'.
592
The UI States are defined in the UI States Editor and written to a table called <app-name>_uistates - here example_uistates_uistates. When you first open the UI States Editor, you will be prompted to allow the table to be created if it does not already exist.
593
contd.