Alfresco 自定义数据列表布局

Alfresco custom data list layout

我在 Alfresco 中创建了一个自定义数据列表,并用所需的数据列填充了它的模型。但是,当我在 Alfresco share 中查看列表时,顺序完全不对,并且存在我未在模型中定义的元素。

我已广泛搜索如何解决此问题,但没有成功。据我了解,我需要在 share-config-custom.xml 中定义布局,我在下面尝试过(仅我添加的片段):

  <config evaluator="model-type" condition="orpdl:orpList">
  <forms>
   <form>
    <field-visibility>
     <show id="orpdl:programName" />
    </field-visibility>
    <create-form template="../data-lists/forms/dataitem.ftl" />
    <appearance>
     <field id="orpdl:programName">
                       <control template="/org/alfresco/components/form/controls/textarea.ftl" />
     </field>
               </appearance>
   </form>
  </forms>
 </config>
 
 <config evaluator="node-type" condition="orpdl:orpList">
  <forms>
   <form>
    <field-visibility>
     <show id="orpdl:programName" />
    </field-visibility>
    <create-form template="../data-lists/forms/dataitem.ftl" />
    <appearance>
     <field id="orpdl:programName">
                       <control template="/org/alfresco/components/form/controls/textarea.ftl" />
     </field>
               </appearance>
   </form>
  </forms>
 </config>

内容模型:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Definition of new Model -->
<model name="orpdl:orpDataListModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

 <!-- Optional meta-data about the model -->
 <description>Information retrieved from the Opportunity Registration Process workflow form.</description>
 <author>Alan George</author>
 <version>1.0</version>

 <!-- Imports are required to allow references to definitions in other models -->
 <imports>
  <!-- Import Alfresco Dictionary Definitions -->
  <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
  <!-- Import Alfresco Content Domain Model Definitions -->
  <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
  <import uri="http://www.alfresco.org/model/system/1.0" prefix="sys" />
  <import uri="http://www.alfresco.org/model/datalist/1.0" prefix="dl" />
 </imports>

 <!-- Introduction of new namespaces defined by this model -->
 <namespaces>
  <namespace uri="http://www.test.com/model/orpDataListModel/1.0" prefix="orpdl" />
 </namespaces>
 
 <constraints>
        <constraint name="orpdl:contractTypeList" type="LIST">
   <parameter name="allowedValues">
    <list>
            <value>T&amp;M</value>
            <value>FFP</value>
            <value>CPFF</value>
            <value>CPIF</value>
    </list>
         </parameter>
  </constraint>
 </constraints>
 
 <types>
  <type name="orpdl:orpList">
   <title>Opportunity Registration Process</title>
   <description>Information retrieved from the Opportunity Registration Process workflow form.</description>
   <parent>dl:dataListItem</parent>
   <properties>
    <property name="orpdl:programName">
     <title>Program Name</title>
     <type>d:text</type>
     <mandatory>true</mandatory>
    </property>
    <property name="orpdl:programDescription">
     <title>Program Description</title>
     <type>d:text</type>
     <mandatory>true</mandatory>
    </property>
    <property name="orpdl:client">
     <title>Client</title>
     <type>d:text</type>
     <mandatory>true</mandatory>
    </property>
    <property name="orpdl:contractType">
     <title>Contract Type</title>
     <type>d:text</type>
     <mandatory>true</mandatory>
     <constraints>
      <constraint ref="orpdl:contractTypeList" />
     </constraints>
    </property>
    <property name="orpdl:value">
     <title>Value</title>
     <type>d:text</type>
     <mandatory>true</mandatory>
    </property>
   </properties>
  </type>
 </types>
</model>

此代码的目标是只显示 programName 文本框。但这就是我所看到的:

我错过了什么?

您在 <config> 标签中输入了错误的条件。
以下

<config evaluator="model-type" condition="orpdl:orpDataListModel">

应替换为

<config evaluator="model-type" condition="orpdl:issuesList">

这也适用于 node-type