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:

!Lianja.getElementByID("page1.section1").hide()

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:

$("section:section1?action=hide")

Is the same as

Lianja.showDocument("section:section1?action=hide")

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

For example:

$("page:customers.section1?action=search&text=value||hidedialogpanel")


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.