![](/img/trans.png)
[英]How can I make the custom properties of an aspect searchable in alfresco share?
[英]How to add custom aspect to folder in Alfresco 4.2?
我已經使自定義方面存儲了我需要的信息...但是我不知道如何將其添加到文件夾中,以便當用戶上傳文檔時,他們需要輸入該文檔的元數據。
從存儲庫或在為文件夾創建新規則時,我的自定義方面未顯示在“管理方面”對話框中。
如果我在創建規則時選擇“設置屬性”選項,就可以看到它,但是我一次只能設置一個屬性,並且只能使用規則中定義的數據。
我已將我的方面添加到“ web-client-config-custom.xml”中,如下所示:
<config evaluator="string-compare" condition="Action Wizards">
<aspects>
<aspect name="custom:MyAspect" />
</aspects>
</config>
<!-- Displays the properties in view details page -->
<config evaluator="aspect-name" condition="custom:MyAspect">
<property-sheet>
<separator name="sepMyAspect1" display-label="MyAspect" component-generator="HeaderSeparatorGenerator" />
<show-property name="p1" />
<show-property name="p2" />
<show-property name="p3" />
<show-property name="p4" />
<show-property name="p5" />
<show-property name="p6" />
</property-sheet>
</config>
</alfresco-config>
我禁不住以為我錯過了此.xml文件中的某些內容。 但是我在Alfresco上沒有足夠的經驗來確定它是什么。
編輯:
我嘗試修改content-model.properties.xml文件,並且至少在“管理內容方面”對話框中顯示了一些內容……但是它顯示得很奇怪,如果我將其添加到文件夾中,操作將會失敗。
custom_customModel.description=User Defined Content Model
custom_customModel.aspect.custom_MyAspect.title=MyAspect
custom_customModel.aspect.custom_MyAspect.description=MyAspect Description
custom_customModel.property.custom_p1.title=p1
custom_customModel.property.custom_p1.description=p1 desc
custom_customModel.property.custom_p2.title=p2
custom_customModel.property.custom_p2.description=p2 desc
custom_customModel.property.custom_p3.title=p3
custom_customModel.property.custom_p3.description=p3 desc
custom_customModel.property.custom_p4.title=p4
custom_customModel.property.custom_p4.description=p4 desc
custom_customModel.property.custom_p5.title=p5
custom_customModel.property.custom_p5.description=p5 desc
custom_customModel.property.custom_p6.title=p6
custom_customModel.property.custom_p6.description=p6 desc
當我打開對話框時,我得到:
aspect.custom = MyAspect
標題應該在哪里...好像早就被切斷了。
編輯2:
好吧,我設法取得了一些進步,現在顯示為:
aspect.custom_MyAspect
另外,我現在可以在為文件夾制定規則時選擇它。 原來,我在share-config-custom.xml文件中使用了'='而不是':'。
但是,從我的自定義方面看不到屬性。 它似乎被添加了,但是當我進入屬性表單時我看不到……既不通過使用對話框也不通過創建將方面添加到每個新項目的規則……
不確定這是否是您想要的,但是您配置了兩個用戶界面,舊的資源管理器(web-client-config-custom.xml)和共享(share-config-custom.xml)。
就是說,看看https://wiki.alfresco.com/wiki/Forms#Types_and_Aspects 。
假設您希望屬性出現在節點具有您方面的每種形式(共享)中,則配置(share-config-custom.xml)應類似於
<config evaluator="aspect" condition="fdk:exif">
<forms>
<form>
<field-visibility>
<show id="fdk:manufacturer" />
<show id="fdk:originalDateTime" />
<show id="fdk:compression" />
<show id="fdk:xResolution" />
<show id="fdk:yResolution" />
<show id="fdk:flash" />
</field-visibility>
</form>
</forms>
</config>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.