Alfresco共享自定义模型的用户界面

时间:2016-12-26 09:23:01

标签: alfresco alfresco-share

我使用的是Alfresco 5.1企业版。我使用Alfresco& amp; amp; Model中的模型管理器创建了一个自定义内容模型。它有一些与之关联的自定义属性(ds:prority,ds:action,ds:actionText,ds:linkURL等)。我想自定义Share UI以包含这些自定义属性以及默认的cm:content属性(cm:content,cm:description,cm:title等)。我在ecmarchitect上提到Jeff Potts帖子,使用自定义模型&共享UI自定义。

现在我的问题是,我可以使用Alfresco Model Manager中创建的模型吗?创建自定义共享表单以及这些自定义属性。此过程的所有示例我都看到在Alfresco repo AMP中完成的内容模型定义,然后在Alfresco共享放大器中完成共享表单自定义。我可以单独创建共享AMP(用于我的Share UI Customization)&仍然参考我已经在Alfresco Model Manager中创建的模型?

2 个答案:

答案 0 :(得分:2)

您可以使用模型控制台列出已创建的&部署模型。

http://IP:Port/alfresco/s/enterprise/admin/admin-repoconsole

命令:show models

如果你能够看到你的模型加载(isLoaded)状态为“是”,那么你可以在共​​享放大器上部署应该没问题。 您是否在开发机器或生产机器中创建了此模型? 如果是开发机器,则需要使用Repo放大器在生产机器中部署模型。

##
##  Model Admin Commands
##

ok> show models

    Show deployed models - that are stored in the repository data dictionary.

ok> deploy model 

    Upload model to repository and load into runtime data dictionary. This will also
    set the repository model as active. 

    If a model is already deployed then it will be updated and re-deployed.

    e.g. deploy model alfresco/extension/exampleModel.xml

ok> undeploy model 

    Permanently delete model from repository (all versions) and unload from runtime data dictionary.

    e.g. undeploy model exampleModel.xml

ok> activate model 

    Set repository model to active and load into runtime data dictionary.

    e.g. activate model exampleModel.xml

ok> deactivate model 

    Set repository model to inactive and unload from runtime data dictionary. 

    e.g. deactivate model exampleModel.xml

当您使用Enterpise版本时,您也可以与Alfresco支持联系。

希望这会对你有所帮助。

答案 1 :(得分:0)

正如Murali指出的那样,一旦模型处于活动状态,我们可以创建一个共享AMP,如Jeff Potts教程中所指出的,使用maven目标( mvn package )创建共享放大器存档并部署与alfresco amps_share文件夹( / alfresco_one / amps_share )相同,然后将其应用于 /bin/apply_amps.sh 中的apply_amps.sh命令,然后重新启动alfresco。< / p>

请注意我的要求我需要自定义属性才能成为共享的内联编辑屏幕的一部分。所以我添加了

<config evaluator="node-type" condition="<my model>">
...
   <form id="doclib-inline-edit">
   ...
   <show id="my:property" force="true" /> 
   ...
...
</config>

最初,我在条件评估器&amp;中有cm:content。它没有用。只有在将其更新为我的型号名称后才开始反映更改。

注意:如果不重新启动Alfresco,则无法反映更改。

相关问题