Menu

Expressions

Jan Volf

PXML Expressions

PXML expressions are PHP expressions used directly in the PXML. Several rules apply to such expressions:

  • they must be enclosed in curly braces and thus should not contain curly braces themselves
  • the expression is always executed in the global scope - the PHP lambda functions are created from expressions
  • the instance of the document (encapsulating PXML document) in whose context expression is evaluated is reachable by $self variable

The expressions are evaluated several times in view's lifecycle:

  • during initialization only static bindings? are evaluated
  • just before restoring state binding expressions are evaluated first time
  • during execute stage of the view's lifecycle the event expressions are evaluated
  • binding expressions can also by evaluated during the update of display list if it results in dynamic creation of the components with bindings assigned
  • second time are binding expressions evaluated before saving state

Related

Wiki: BindingExpression
Wiki: EventExpression
Wiki: Home
Wiki: ViewLifecycle

MongoDB Logo MongoDB