-
Notifications
You must be signed in to change notification settings - Fork 5
Property evaluation
A value of a property can be a reference to objects within an evaluation context.
String evaluation occurs upon building a Widget or an Action, in which each of the Node's properties will be sanitized.
An object can be refered using a syntax like ${state.address}
. In this case we're referring to the key address
of the Screen's state
Map.
Some of the objects are:
-
env
: refers to the Model'senvironment variables
, managed in the editor. E.g.${env.api_url}
. -
global
: refers to a static Map accessible viaLowder.globalVariables
where global key/value pairs can be stored, like the user's profile or an access token. E.g.${global.user.name}
. -
state
: refers to a Map each Screen has where its state is stored. E.g.${state.email}
. -
media
: a Map containing some media properties likeisWeb
,isMobile
,isAndroid
,portrait
, etc. -
entry
: available only when working with a List, where upon building each row, theentry
object will be available referring to an element of the array of data.${entry.firstName} ${entry.lastName}
.
Feel free to make your own objects available during evaluation by overriding the method getEvaluatorContext
of the PropertyFactory
.