自定义模型的 Alfresco 共享 UI 表格
Alfresco share UI form for custom model
我使用的是 Alfresco one 5.1 企业版。我在 Alfresco 中使用模型管理器创建了一个自定义内容模型,它有一些与之关联的自定义属性(ds:prority、ds:action、ds:actionText、ds:linkURL 等)。我想自定义 Share UI 以将这些自定义属性与默认 cm:content 属性(cm:content、cm:description、cm:title 等)一起包含在内。我指的是 Jeff Potts post 在 ecmarchitect 上使用自定义模型并分享 UI 自定义。
现在我的问题是,我可以使用在 Alfresco 模型管理器中创建的模型并创建自定义共享表单以及这些自定义属性吗?此过程的所有示例我看到内容模型定义在 Alfresco 回购 AMP 中完成,然后在 Alfresco 共享放大器中完成共享表单自定义。我可以单独创建共享 AMP(用于我的共享 UI 自定义)并且仍然引用我已经在 Alfresco 模型管理器中创建的模型吗?
您可以使用模型控制台列出已创建和已部署的模型。
http://IP:Port/alfresco/s/enterprise/admin/admin-repoconsole
命令:show models
如果您能够看到模型的加载 (isLoaded) 状态为 "Yes",那么您可以在共享放大器上部署应该没问题。
您是否在开发机器或生产机器中创建了此模型?
如果是开发机,则需要 Repo amp 将模型部署到生产机中。
##
## 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
当您使用企业版时,您也可以联系 Alfresco 支持人员。
希望对您有所帮助。
正如 Murali 所指出的,一旦模型处于活动状态,我们就可以创建一个 Share AMP,正如 Jeff Potts 教程中所指出的那样,使用 maven 目标创建一个共享 amp 存档(mvn package) 并将其部署到露天 amps_share 文件夹 (/alfresco_one/amps_share),然后在 中使用 apply_amps.sh 命令应用相同的内容]/bin/apply_amps.sh 然后重启alfresco.
请注意,根据我的要求,我需要将自定义属性作为仅共享的内联编辑屏幕的一部分。所以我添加了
<config evaluator="node-type" condition="<my model>">
...
<form id="doclib-inline-edit">
...
<show id="my:property" force="true" />
...
...
</config>
最初我在条件评估器中使用了 cm:content,但没有用。仅在将其更新为我的型号名称后,它才开始反映更改。
注意:如果不重新启动 Alfresco,更改不会反映出来。
我使用的是 Alfresco one 5.1 企业版。我在 Alfresco 中使用模型管理器创建了一个自定义内容模型,它有一些与之关联的自定义属性(ds:prority、ds:action、ds:actionText、ds:linkURL 等)。我想自定义 Share UI 以将这些自定义属性与默认 cm:content 属性(cm:content、cm:description、cm:title 等)一起包含在内。我指的是 Jeff Potts post 在 ecmarchitect 上使用自定义模型并分享 UI 自定义。
现在我的问题是,我可以使用在 Alfresco 模型管理器中创建的模型并创建自定义共享表单以及这些自定义属性吗?此过程的所有示例我看到内容模型定义在 Alfresco 回购 AMP 中完成,然后在 Alfresco 共享放大器中完成共享表单自定义。我可以单独创建共享 AMP(用于我的共享 UI 自定义)并且仍然引用我已经在 Alfresco 模型管理器中创建的模型吗?
您可以使用模型控制台列出已创建和已部署的模型。
http://IP:Port/alfresco/s/enterprise/admin/admin-repoconsole
命令:show models
如果您能够看到模型的加载 (isLoaded) 状态为 "Yes",那么您可以在共享放大器上部署应该没问题。 您是否在开发机器或生产机器中创建了此模型? 如果是开发机,则需要 Repo amp 将模型部署到生产机中。
##
## 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
当您使用企业版时,您也可以联系 Alfresco 支持人员。
希望对您有所帮助。
正如 Murali 所指出的,一旦模型处于活动状态,我们就可以创建一个 Share AMP,正如 Jeff Potts 教程中所指出的那样,使用 maven 目标创建一个共享 amp 存档(mvn package) 并将其部署到露天 amps_share 文件夹 (/alfresco_one/amps_share),然后在 中使用 apply_amps.sh 命令应用相同的内容]/bin/apply_amps.sh 然后重启alfresco.
请注意,根据我的要求,我需要将自定义属性作为仅共享的内联编辑屏幕的一部分。所以我添加了
<config evaluator="node-type" condition="<my model>">
...
<form id="doclib-inline-edit">
...
<show id="my:property" force="true" />
...
...
</config>
最初我在条件评估器中使用了 cm:content,但没有用。仅在将其更新为我的型号名称后,它才开始反映更改。
注意:如果不重新启动 Alfresco,更改不会反映出来。