Source Code Configuration:How to Configure Expressions Using Source Code
I. Custom Placeholder Definition Expressions
- Data permission definition expression:
${thisTeacherName}
- Query condition definition in the interface designer:
$#{thisTeacherName}
(needs to add a # symbol)The above configurations can be checked by viewing the
originRsql
in thequeryWrapper
to see if the placeholders are correctly replaced.
II. Visibility and Filter Condition Expression Definitions
Visibility and filtering can both be defined in field annotations and xml
definitions.
- Visibility:
invisible="$!{activeRecord.deadline}" / invisible = true
@Field.String
@Field(displayName = "View/Page", invisible = true)
private String viewName;
- Filtering:
domain = " code == ${activeRecord.id} " / domain = "code == '111' "
@Field.one2many
@Field(displayName = "Child Order List", summary = "Child Order List")
@Field.Relation(relationFields = {"code"}, referenceFields = {"code"}, domain = "code != '1234'")
private List<ChildOrder> orderList;