UI States
Under Construction
Contents
See Also
Lianja system object, SHOWDOCUMENT(), UI Presentation Rules
Overview
UI States App
The 'UI States App' (example_uistates) example App is included in the Lianja App Builder distribution to demonstrate the use of UI States.
To see the effect of UI states, switch to the Desktop App View.
Clicking the Show Orders and Hide Orders buttons shows and hides the Orders grid section.
As we will see, the 'visible' property of the 'Orders' grid section is being set based on a change of UI State. The UI State is being set in the click event of the buttons.
Setting a UI State
UI States can be changed using the showdocument() function or the Lianja system object showDocument() method.
showdocument(changestate:<state>)
To cause all UI components to revert back to their default attributes (no UI State set), use:
showdocument(resetstate)
Back in the UI States App (in Development View), open up the Field Attributes for the buttons.
These use the Inline Delegate version of the showdocument() function.
The 'Show Orders' button changes the UI State to 'state1'.
and the 'Hide Orders' button changes the UI State to 'state2'.
The 'state1' and 'state2' states are defined in the UI States Editor.
UI States Editor
The UI States Editor is accessed from its headerbar toolbutton and is where you define the names and behavior of UI States.
The UI State definitions are 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.
Attributes
UI States
The UI States attribute specifies the UI states that affect the container/control.
- Multiple states should be specified as a comma separated list.
Initial UI State
The Initial UI state attribute specifies the starting UI state for the container/control.
Notes on Client Support
Attribute | Notes |
---|---|
UI States | |
Initial UI State |