跳转到内容

Record 记录

Record标签不在界面上展示,用于关联数据获取。其他容器的数据源可以关联到 Record 容器。

API

通用属性见: 容器通用属性

用法

<!-- 顶层布局容器 -->
<View title="部门信息" version="2">
<!-- Record 数据容器,不展示,只持有数据 -->
<Record key="department" model="trantor_doc_Department" dataCondition="id = ?" dataParams="pageRecord.id" />
<!-- 对应Record标签中的department.company -->
<Detail title="所属公司" model="trantor_doc_Company" lookupFrom="department.company">
<Fields>
<Field name="name" />
</Fields>
</Detail>
<!-- 所有 (trantor_doc_Person 模型的 department 属性 <=> key为department) 的人员 -->
<Table title="部门人员" model="trantor_doc_Person" dataCondition="department.id = ?" dataParams="[#department.data.id]">
<Fields>
<Field name="name" />
<Field name="age" />
</Fields>
</Table>
</View>

注意:当前例子为0.17.x 版本