0

尝试保存自定义类型的新文档时出现此异常:

org.alfresco.service.cmr.repository.MalformedNodeRefException: 06010026 Invalid node ref - does not contain forward slash: {node.nodeRef}

以下是自定义类型的定义:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Definition of new Model -->
<model name="ht:channelmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
 <!-- 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" />
 </imports>
 <!-- Introduction of new namespaces defined by this model -->
 <namespaces>
 <namespace uri="http://www.someco.com/model/content/1.0" prefix="ht" />
 </namespaces>

 <types>
 <!-- Here comes my type -->
    <type name="ht:doc">
        <title>Custom Document</title>
        <parent>cm:content</parent>
        <mandatory-aspects>
            <aspect>cm:generalclassifiable</aspect>
        </mandatory-aspects>
    </type>
 </types>

 <aspects>
    <aspect name="ht:channel">
        <title>Content Channel</title>
        <properties>
            <property name="ht:isWeb">
                <type>d:boolean</type>
            </property>
        </properties>
    </aspect>
 </aspects>
</model>

这是我如何设置表单以显示我的自定义类型的新文档的创建(内部share-config-custom.xml

<alfresco-config>               
   <config evaluator="string-compare" condition="DocumentLibrary">
        <create-content>
            <content id="plain-text" mimetype="text/plain" label="Prompt" itemid="ht:doc" />
        </create-content>
        <aspects>
            <visible>
                <aspect name="ht:channel" />
            </visible>
            <addable>
            </addable>
            <removeable>
            </removeable>
        </aspects>

        <types>
            <type name="cm:content">
                <subtype name="ht:doc" />
            </type>
        </types>
    </config>

     <config evaluator="model-type" condition="ht:doc">
      <forms>
         <form>
            <field-visibility>
               <show id="cm:title" force="true" />
               <show id="ht:isWeb" force="true" />
            </field-visibility>
            <appearance>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
            </appearance>
         </form>        
      </forms>
   </config>    
</alfresco-config>

格式有问题还是我缺少类型定义中的某些字段?

谢谢

4

1 回答 1

0

在专门的 Alfresco 论坛上找到了解决方案。

这里是:

<content id="myContent" label="Prompt" type="pagelink" index="1" >
         <param name="page">create-content?destination={nodeRef}&amp;itemId=ht:doc&amp;mimeType=text/html</param>
</content>
于 2013-07-02T16:30:07.310 回答