首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Alfresco中的“变更类型”下拉文件完全空着

Alfresco中的“变更类型”下拉文件完全空着
EN

Stack Overflow用户
提问于 2015-12-11 01:53:42
回答 1查看 733关注 0票数 0

我正在研究Alfresco 5.0.d的“内容建模”教程:

http://docs.alfresco.com/5.0/tasks/dev-extensions-content-models-tutorials-create-custom-content.html

本教程的一部分是创建一个“自定义类型”。

问题:我不能看到任何“类型”在阿尔弗雷科分享。

复制步骤:

  1. 登录到Alfresco (http://localhost:8080/share)
  2. 单击我用演示创建的文档
  3. 选择“更改类型”<=下拉菜单完全为空

这是本教程指示我们创建的customModel.xml文件:

代码语言:javascript
复制
<model name="my:custommodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
   <imports>
      <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
      <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
   ...
   <namespaces>
      <namespace uri="http://www.mycompany.com/model/content/1.0" prefix="my"/>
   ...
   <types>
     <type name="my:doc">   
        <title>MyCompany Generic Document</title>
        <parent>cm:content</parent>
      ...
     <type name="my:marketingDoc">
        <title>MyCompany Marketing Document</title>
        <parent>my:doc</parent>
      ...
     <type name="my:whitepaper">
         <title>MyCompany Whitepaper</title>
         <parent>my:marketingDoc</parent>
      ...

下面是我的配置文件$ALFRESCO/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml的一个片段

代码语言:javascript
复制
 <config evaluator="model-type" condition="my:whitepaper">
   <forms>
     <form>
       <field-visibility>
         <show id="cm:name" />
         <show id="my:product" />
         ...
 <config evaluator="node-type" condition="my:whitepaper">
   <forms>
     <form>
       <field-visibility>
         <show id="cm:name" />
         <show id="my:product" />
         ...
  <types>
     <type name="cm:content">
        <!-- Custom sub-type added for whitepapers -->
        <subtype name="my:whitepaper" />
        ...

     <type name="cm:folder">
     </type>

     <type name="trx:transferTarget">
        <subtype name="trx:fileTransferTarget" />
     </type>
  </types>

解决办法:

为了使自定义类型可见,我需要编辑$ALFRESCO/tomcat/webapps/share/WEB-INF/classes/alfresco/messages/slingshot.properties

代码语言:javascript
复制
  ...
# Types
type.cm_content=Content Base Type
type.cm_folder=Folder Base Type
type.trx_transferTarget=Transfer Target
type.trx_fileTransferTarget=File Transfer Target

type.my_doc=Tutorial Doctype
type.my_marketingdoc=Tutorial Marketing Doctype
type.my_whitepaper=Tutorial Whitepaper Doctype
  <= This will make the types visible in the
     "Alfresco Share > My Documents > Change Type" pull-down
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-12-11 12:11:55

默认情况下,上载的文档类型为cm:content。

如果要更改其类型,请在存储库内容模型中定义自己的类型,如下所示:

我的子类型cm:内容

然后在share-config-custom.xml中将其添加为cm:content的子类型,如下所示:

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34214940

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档