xml - 如何在 [alfresco] 表单控件中隐藏/显示集合
问题描述
我想如果它的字段为空,我如何隐藏这个“集合”,如果它的字段有任何值,则显示这个集合。
<config evaluator="task-type" condition="vorwf:allocateDocumentProperties" replace="true">
<forms>
<form id="workflow-details">
<field-visibility>
<show id="bpm:workflowDescription"/>
<show id="packageItems" />
<show id="bpm:comment" />
<show id="transitions" />
</field-visibility>
<appearance>
<set id="information" appearance="title" label="Workflow Information" />
<set id="wfinfo" appearance="" template="/org/alfresco/components/form/2-column-set.ftl" />
<set id="assignees" appearance="title" label="Assignees" template="/org/alfresco/components/form/3-column-set.ftl" />
<set id="items" appearance="title" label="Workflow Documents" />
<field id="bpm:workflowDueDate" label="Due Date" set="wfinfo" read-only="true">
<control template="/org/alfresco/components/form/controls/date.ftl">
<control-param name="showTime">false</control-param>
<control-param name="submitTime">false</control-param>
</control>
</field>
<field id="bpm:workflowPriority" label="Priority" set="wfinfo" read-only="true">
<control template="controls/workflow/priority.ftl" />
</field>
<field id="transitions" set="outcome" />
</appearance>
</form>
</forms>
</config>
如果有人有任何想法,请告诉我!
解决方案
您可以借助 view-form/edit-form 并使用自定义模板。 https://docs.alfresco.com/5.2/references/forms-reference.html
此处给出了自定义编辑表单模板的示例: https ://docs.alfresco.com/5.2/tasks/forms-custom-formtemplate.html
推荐阅读
- reactjs - 我是否正确调用了我的 API?获取 CORS 错误
- cuda - 在共享内存中查找数组的最小索引的问题
- python - Django ImageField 在处理时保持原始图像比例
- amazon-dynamodb - DynamoDB 中的并发更新,是否有任何保证?
- php - 如何对齐不同尺寸的图像
- webpack-encore - 使用 webpack-encore 复制文件
- jackson - 将成功反序列化为 Instant 的默认字符串格式?
- mysql - Mysql删除查询忘记了Id约束
- javascript - 如何将所有值的总和添加为 Chart.Js 中圆环图的图表标题?
- r - 替换R中csv文件中列中的几个字符