Difference between revisions of "UI States"

From Lianjapedia
Jump to: navigation, search
Line 59: Line 59:
  
 
and the 'Hide Orders' button changes the UI State to 'state2'.
 
and the 'Hide Orders' button changes the UI State to 'state2'.
 +
 +
 +
The 'state1' and 'state2' states are defined in the '''UI States Editor'''.
  
 
<br clear=all>
 
<br clear=all>
 +
 +
==UI States Editor==
 +
[[{{ns:file}}:uistates6.png|450px|thumb|left|link={{filepath:uistates6.png}}|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==
 
==Attributes==

Revision as of 10:49, 14 April 2016

Under Construction

See Also

Lianja system object, SHOWDOCUMENT(), UI Presentation Rules

Overview

UI States App

example_uistates App


The 'UI States App' (example_uistates) example App is included in the Lianja App Builder distribution to demonstrate the use of UI States.

example_uistates App


example_uistates App


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)
example_uistates App


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'.


example_uistates App


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

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