cancel
Showing results for 
Search instead for 
Did you mean: 

I create a new advanced search but it doesn't work

brigitte_
Confirmed Champ
Confirmed Champ

Hello,

I create a new advanced search (I don't want just overridden the default, I need to create several news advanced search). It seems it's possible as there is a choice in the local configuration of a domain or workspace for example.

So, I create a new advanced search, I can choice it for the local configuration on a domain. It's ok. But when I call it, the criteria is empty and the result search indicates "ERROR: layout " not found". I need to work on 2 custom type of document.

Here is an excerpt of my contentview-config.xml :

 <contentView name="my-advanced-search">

  <title>My custom Advanced Search</title>
  <showTitle>true</showTitle>

  <emptySentence>label.content.empty.search</emptySentence>
  <translateEmptySentence>true</translateEmptySentence>

  <coreQueryPageProvider>
    <property name="coreSession">#{documentManager}</property>
    <property name="maxResults">DEFAULT_NAVIGATION_RESULTS</property>
    <whereClause docType="MyAdvancedType">
         <predicate parameter="myTypeA:monchamps-1" operator="LIKE">
           <field schema="my-advanced-search" name="monchampsinterroge-1" />
        </predicate>
        <predicate parameter="myTypeB:monchamps-2" operator="LIKE">
           <field schema="my-advanced-search" name="monchampsinterroge-2" />
        </predicate>
       <fixedPart>
        ecm:isCheckedInVersion = 0 AND
        ecm:mixinType != 'HiddenInNavigation' AND 
        ecm:currentLifeCycleState != 'deleted' AND
        ecm:primaryType = 'myTypeA' OR
        ecm:primaryType = 'myTypeB' 
      </fixedPart>            
       </whereClause>
       <pageSize>20</pageSize>
       <sortInfosBinding>
         #{documentSearchActions.searchSortInfos}
       </sortInfosBinding> 
       </coreQueryPageProvider>

  <searchLayout name="my-advanced-search" />
  <showFilterForm>false</showFilterForm>

  <showPageSizeSelector>false</showPageSizeSelector>
  <useGlobalPageSize>false</useGlobalPageSize>
  <refresh>
    <event>documentChanged</event>
    <event>documentChildrenChanged</event>
  </refresh>
  <cacheKey>only_one_cache</cacheKey>
  <cacheSize>1</cacheSize>

   <resultColumns>
    #{documentSearchActions.selectedLayoutColumns}
  </resultColumns> 
  <resultLayouts>
    <layout name="search_listing_ajax" title="document_listing"
      translateTitle="true" iconPath="/icons/document_listing_icon.png"
      showCSVExport="true" showPDFExport="false" showSyndicationLinks="true" />
    <layout name="document_virtual_navigation_listing_ajax_compact_2_columns"
      title="document_listing_compact_2_columns" translateTitle="true"
      iconPath="/icons/document_listing_compact_2_columns_icon.png"
      showCSVExport="true" showPDFExport="false" showSyndicationLinks="true" />
    <layout name="document_virtual_navigation_listing_ajax_icon_2_columns"
      title="document_listing_icon_2_columns" translateTitle="true"
      iconPath="/icons/document_listing_icon_2_columns_icon.png"
      showCSVExport="true" showPDFExport="false" showSyndicationLinks="true" />
  </resultLayouts>

  <selectionList>CURRENT_SELECTION</selectionList>
  <actions category="CURRENT_SELECTION_LIST" />
  <flags>
    <flag>ADVANCED_SEARCH</flag>
  </flags>

</contentView>

In my layout-contrib.xml, I have the definition of my searchLayout :

<layout name="my-advanced-search">
  <templates>
    <template mode="any">/layouts/layout_default_template.xhtml</template>
  </templates>
  <rows>
    <row>
      <widget>search_all_words</widget>
    </row>
    <row>
      <widget>my_widget_search1</widget>
    </row>
    <row>
      <widget>my_widget_search2</widget>
    </row>
   </rows>

Here is my type :

  <schema name="my-advanced-search" src="schemas/my-advanced-search.xsd" 
  prefix="advsppa"/>

  <doctype extends="Document" name="MyAdvancedType">
  <schema name="my-advanced-search"/>
</doctype>

Any idea why my layout "my-advanced-search" isn't display ?

Thanks for any help !

1 ACCEPTED ANSWER

brigitte_
Confirmed Champ
Confirmed Champ

I find the problems ! Because of tests, my advanced search name was record with an old name in local configuration at the domain. I re-record it and now, all is right !

View answer in original post

1 REPLY 1

brigitte_
Confirmed Champ
Confirmed Champ

I find the problems ! Because of tests, my advanced search name was record with an old name in local configuration at the domain. I re-record it and now, all is right !

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.