In the variable attributes of the elements (e.g. TEXT, RENDERED) you use epxressions to bind to the data behind the form.
Typical expressions are:
#{firstName} - directly accessing the firstName property
#{ADDRESS.street} - accessing the property of a 1:1 subdata
You may add formatting advices into the expression when the property is not a plain String but is a number or a date:
#{birthday:date:medium:CET} - birthday is a java.util.Date that is
shown in medium size using timezone CET
#{quantity:bigdecimal:dec2} - quantity is a BigDecimal and is shown
with 2 decimal digits always
The general format is:
#{...property...:...format...:...formatmask...:...timezone...}
The values for format, formatmask are exactly the same then the ones insdie the CaptainCasa processing for e.g. FORMATTEDFIELD-processing.
There are functions available that you can operate as part of the expression:
#{isNull(...propertyName...)}
#{isEmpty(...propertyName...)}
#{isNotNull(...propertyName...)}
#{isNotEmpty(...propertyName...)}
#{uppercase(...propertyName...)}
#{uppercaseid(...propertyName...)}
#{lowercase(...propertyName...)}
#{lowercaseid(...propertyName...)}
#{raw(...propertyName...)} - returns the original data type that is provided by the application
#{bigdecimal(...propertyName...)} - converts the data value into bigdecimal
#{int(...propertyName...)} - converts the data value into integer
#{decodeBase64(...propertyName...)} - converts the data value into a byte array
#{decodeHex(...propertyName...)} - converts the data value into a byte array
#{literal(literalId)} - accesses literal through interface IDynDataLiteralResolver
#{literal(literalId,p0,p1,...)} - passes any number of parameters into the literal processing
#{top()} - accesses the top data structure
#{top(...dataDefinitionIdOnTop...)} - accesses the data structure on
top with the name that is passed
#{replace(....propertyName...,from,to,from,to,...)} - replaces contained content, to value can be an expression
#{intHHMMSSToDayTime(...propertyName...)} - converts an integer number of format HHMMSS into HH:MM:SS
Functions are always applied on the value level of the expression they
refer to.
WRONG example: #{isEmpty(HEADER.orderDate)}
CORRECT example: #{HEADER.isEmpty(orderDate)}
The top()-function is useful for data assignments in the grid. Data in
a grid cell by default refers to its grid item. By using function
"top()" you can navigate up to the top most data definition - and as
consequence you can also acces data which is not belonging to the grid.
Example for usage from grid cell: #{top().HEADER.orderDate}
You may define default values that are used if the expression value is
not available.
Example: #{xxx.yyy|Harry}, the default value is
separated by a "|" character.