首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >高级搜索的高级共享定制

高级搜索的高级共享定制
EN

Stack Overflow用户
提问于 2015-06-08 12:38:44
回答 1查看 2.6K关注 0票数 2

我试图修改share-config-custom.xml,以便通过以下属性搜索电子邮件:

代码语言:javascript
运行
复制
           <!-- 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:

代码语言:javascript
运行
复制
    <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>

但不起作用。我试过aspectnode-type,而不是model-type。我用了很多force="true"for-mode="view" .还是没能成功。在搜索表单中,我看不到任何与属性相关的内容。这只是一个默认的搜索表单。任何帮助都将不胜感激。

问题是,我有一些带有cm:emailed方面的文档。我想创建一个仅用于搜索此类文档的表单。但是,当我说"<form labelId="Mails" descriptionId="Search for Mails">cm:content</form>“时,默认的内容搜索表单也被修改了。我相信一定有一些简单的方法。我不想在我的自定义模型中定义一个新类型,我把这个解决方案留给最后一个。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-06-08 20:44:22

共享配置不正确。看看Forms

您需要用方面字段更改cm:content form id="search"的模型类型。

我在打电话,所以答案可能很短。

-更新--你不能在“高级搜索”的下拉列表中选择一个方面,Al新鲜of的当前实现不允许这样做。

在大多数情况下,我只是将方面字段添加到默认的cm:content类型中。

或者,当我更多地控制方面何时应用时,我只需创建一个新类型的自定义:mailed,并具有父cm:content,以及强制的方面cm:emailed。然后,您可以创建一个将类型专门化为custom:mailed的行为,或者在Al新鲜to中创建一个入站规则,该规则在hasAspect cm:emailed上触发。

我希望这能澄清一点。

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

https://stackoverflow.com/questions/30709408

复制
相关文章

相似问题

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