Inline Delegates

From Lianjapedia
Jump to: navigation, search

See Also

Custom Delegates

Inline Delegates

All delegates can be specified as "inline commands" by prefixing them with a !.

For example:


The command should be in the scripting language that you have specified for the UI component. This can be used with good effect in manipulating the Lianja Object Model (LOM) with minimum coding. If you prefix the delegate with a (jquery-style) $ rather than a ! character then this provides a shorthand way of calling Lianja.showDocument().

For example:


Is the same as


When calling Lianja.showDocument() or using "inline delegates", you can "chain" actions together using || to separate them.

For example:


This is very effective when used in "inline delegates" to perform more than one action that changes the state of the UI through a transition.