我正在尝试修改 share-config-custom.xml 以便可以通过以下属性搜索电子邮件:
<!-- cm:emailed aspect -->
<show id="cm:originator" />
<show id="cm:addressee" />
<show id="cm:addressees" />
<show id="cm:sentdate" />
<show id="cm:subjectline" />
这是我的 share-config-custom.xml:
<config evaluator="model-type" condition="cm:content">
<forms>
<form label="Mails">
<field-visibility>
<show id="cm:originator" />
<show id="cm:addressee" />
<show id="cm:addressees" />
<show id="cm:sentdate" />
<show id="cm:subjectline" />
</field-visibility>
</form>
</forms>
</config>
<config evaluator="string-compare" condition="AdvancedSearch">
<advanced-search>
<!-- Forms for the advanced search type list -->
<forms>
<!--
The 'form' config element contains the name of the model type
of the form to display.
The element supports the following optional attributes:
id = form id, the id of "search" will be assumed if not set
label = label text to display - defaults to model type if not set
labelId = I18N message id of label text to display
description = description text to display
descriptionId = I18N message id of description text to display
-->
<form labelId="Mails" descriptionId="Search for Mails">cm:content</form>
</forms>
</advanced-search>
它不起作用。我试过了aspect
,node-type
而不是model-type
. 我使用了许多组合force="true"
,for-mode="view"
...仍然无法正常工作。在搜索表单中,我看不到与属性相关的任何内容。这只是一个默认的搜索表单。任何帮助将不胜感激。
up:需要明确的是,问题是我有一些带有 cm:emailed 方面的文件。我想创建一个仅用于搜索此类文档的表单。但是,当我说“ <form labelId="Mails" descriptionId="Search for Mails">cm:content</form>
”时,默认的内容搜索表单也被修改了。我相信一定有一些简单的方法。我不想在我的自定义模型中定义新类型,我将这个解决方案留到最后。