有没有办法在 Moqui 中执行以下操作?
假设我有一个父类别(或分类等)列表......以请求类别:
<entity-find entity-name="mantle.request.RequestCategory" list="parentCategoryList">
<econdition field-name="parentCategoryId" operator="is-null" />
</entity-find>
我想使用“parentCategoryList”为每个父类别生成一个子列表,以在屏幕上显示单独的表单列表:
就像是:
<iterate list="parentCategoryList" entry="thisCategory" >
<entity-find entity-name="mantle.request.RequestCategory" list="categoryList">
<econdition field-name="parentCategoryId" from="thisCategory.requestCategoryId" />
</entity-find>
<!-- I include the following only to give an idea of what I am trying to do.
It is incorrect and incomplete -->
<script>listOfLists.add(categoryList)</script>
</iterate>
然后使用该 'listOfLists'迭代一个 form-list,为列表中的每个列表依次提供 form-list 'name' 和 'list'。(我知道您不能在操作之外使用迭代,也不能在操作内使用表单。)
我很可能以错误的方式思考这个问题。