Error with custom advanced search and custom content view

I'm using Nuxeo 5.6 and I've cutomize the advanced search but when go into a folder (who has his content view customized) from the results, Nuxeo doesn't display well the content view.

This is the Folder shown from the advanced search:

alt text

And this is how it should be displayed:

alt text

This is the extension point for the advanced search:

    <contentView name="advanced_search">
        <coreQueryPageProvider>
            <property name="coreSession">#{documentManager}</property>
            <whereClause docType="advanced_search">
                <predicate parameter="ecm:fulltext" operator="FULLTEXT ALL">
                    <field schema="advancedsearch" name="system_fulltext" />
                </predicate>
                <predicate parameter="dc:title" operator="FULLTEXT ALL">
                    <field schema="advancedsearch" name="dublincore_title" />
                </predicate>
                <predicate parameter="sch:vasco" operator="FULLTEXT ALL">
                    <field schema="advancedsearch" name="schema_vasco" />
                </predicate>
                <predicate parameter="sch:doc_type" operator="FULLTEXT ALL">
                    <field schema="advancedsearch" name="schema_doc_type" />
                </predicate>
                <predicate parameter="sch:motsCle" operator="IN">
                    <field schema="advancedsearch" name="schema_motsCle" />
                </predicate>
                <predicate parameter="dateReunion:date" operator="=">
                    <field schema="advancedsearch" name="date_reunion_date" />
                </predicate>
                <predicate parameter="dateReunion:date" operator="BETWEEN">
                    <field schema="advancedsearch" name="date_reunion_date_1_min" />
                    <field schema="advancedsearch" name="date_reunion_date_1_max" />
                </predicate>
                <predicate parameter="palier:numero" operator="FULLTEXT ALL">
                    <field schema="advancedsearch" name="palier_numero" />
                </predicate>
                <predicate parameter="appli:application" operator="=">
                    <field schema="advancedsearch" name="application_application" />
                </predicate>
                <predicate parameter="sch:projet" operator="=">
                    <field schema="advancedsearch" name="schema_projet" />
                </predicate>
                <predicate parameter="ecm:parentId" operator="=">
                    <field schema="advancedsearch" name="system_parentId" />
                </predicate>
                <fixedPart>ecm:mixinType != 'HiddenInNavigation' AND
                    ecm:isCheckedInVersion = 0 AND ecm:currentLifeCycleState !=
                    'deleted'
                </fixedPart>
            </whereClause>
            <sort column="dc:modified" ascending="false" />
            <sortInfosBinding>#{documentSearchActions.searchSortInfos}
            </sortInfosBinding>
            <pageSize>10</pageSize>
        </coreQueryPageProvider>
        <searchLayout name="advancedSearch@layout"
            filterDisplayType="quick" />
        <useGlobalPageSize>true</useGlobalPageSize>
        <refresh>
            <event>documentChanged</event>
            <event>documentChildrenChanged</event>
        </refresh>
        <cacheKey>only_one_cache</cacheKey>
        <cacheSize>1</cacheSize>
        <selectionList>CURRENT_SELECTION</selectionList>
        <showTitle>false</showTitle>
        <showFilterForm>true</showFilterForm>
        <showPageSizeSelector>true</showPageSizeSelector>
        <showRefreshCommand>true</showRefreshCommand>
        <actions category="CURRENT_SELECTION_LIST" />
        <actions category="cv_actions@advanced_search" />
        <resultLayouts>
            <layout name="advancedSearch@listingLayout" title="document_listing"
                translateTitle="true" iconPath="/icons/document_listing_icon.png"
                showCSVExport="true" />
        </resultLayouts>
        <resultColumns>#{documentSearchActions.selectedLayoutColumns}
        </resultColumns>
        <flags>
            <flag>ADVANCED_SEARCH</flag>
        </flags>
    </contentView>

And this is the extension point for the folder's content view:

    <contentView name="ContentView_ADD">
        <coreQueryPageProvider>
            <property name="coreSession">#{documentManager}</property>
            <whereClause docType="ContentView_ADD_cv">
                <predicate parameter="palier:numero" operator="FULLTEXT ALL">
                    <field schema="ContentView_ADD_cv" name="palier_numero" />
                </predicate>
                <predicate parameter="sch:doc_type" operator="FULLTEXT ALL">
                    <field schema="ContentView_ADD_cv" name="schema_doc_type" />
                </predicate>
                <predicate parameter="sch:cdc" operator="IN">
                    <field schema="ContentView_ADD_cv" name="schema_cdc" />
                </predicate>
                <predicate parameter="sch:segment" operator="IN">
                    <field schema="ContentView_ADD_cv" name="schema_segment" />
                </predicate>
                <predicate parameter="dateReunion:date" operator="BETWEEN">
                    <field schema="ContentView_ADD_cv" name="date_reunion_date_min" />
                    <field schema="ContentView_ADD_cv" name="date_reunion_date_max" />
                </predicate>
                <fixedPart>ecm:mixinType != 'HiddenInNavigation' AND
                    ecm:isCheckedInVersion = 0 AND ecm:currentLifeCycleState !=
                    'deleted' AND ecm:parentId = ?
                </fixedPart>
            </whereClause>
            <parameter>#{currentDocument.id}</parameter>
            <sort column="palier:numero" ascending="false" />
            <sortInfosBinding>#{documentSearchActions.searchSortInfos}
            </sortInfosBinding>
            <pageSize>10</pageSize>
        </coreQueryPageProvider>
        <searchLayout name="ContentView_ADD_cv@cvLayout"
            filterDisplayType="quick" />
        <useGlobalPageSize>true</useGlobalPageSize>
        <refresh>
            <event>documentChanged</event>
            <event>documentChildrenChanged</event>
        </refresh>
        <cacheKey>only_one_cache</cacheKey>
        <cacheSize>1</cacheSize>
        <selectionList>CURRENT_SELECTION</selectionList>
        <showTitle>false</showTitle>
        <showFilterForm>true</showFilterForm>
        <showPageSizeSelector>true</showPageSizeSelector>
        <showRefreshCommand>true</showRefreshCommand>
        <actions category="CURRENT_SELECTION_LIST" />
        <actions category="cv_actions@ContentView_ADD" />
        <resultLayouts>
            <layout name="ContentView_ADD@cvListingLayout" title="document_listing"
                translateTitle="true" iconPath="/icons/document_listing_icon.png"
                showCSVExport="true" />
        </resultLayouts>
        <resultColumns>#{documentSearchActions.selectedLayoutColumns}
        </resultColumns>
        <flags>
            <flag>ADVANCED_SEARCH</flag>
            <flag>DOCUMENT_CONTENT</flag>
        </flags>
    </contentView>

And finally the extension point for the listing's layout:

    <layout name="ContentView_ADD@cvListingLayout">
        <templates>
            <template mode="any">/layouts/layout_listing_ajax_template.xhtml
            </template>
            <template mode="edit_columns">/layouts/layout_column_selection_template.xhtml
            </template>
            <template mode="edit_sort_infos">/layouts/layout_sort_infos_template.xhtml
            </template>
            <template mode="edit_sort_infos_map">/layouts/layout_sort_infos_template.xhtml
            </template>
            <template mode="csv">/layouts/layout_listing_csv_template.xhtml
            </template>
            <template mode="pdf">/layouts/layout_listing_pdf_template.xhtml
            </template>
        </templates>
        <properties mode="any">
            <property name="showListingHeader">true</property>
            <property name="showRowEvenOddClass">true</property>
        </properties>
        <properties mode="edit_columns">
            <property name="availableElementsLabel">label.selection.availableColumns</property>
            <property name="selectedElementsLabel">label.selection.selectedColumns</property>
            <property name="selectedElementsHelp"></property>
            <property name="selectSize">10</property>
            <property name="displayAlwaysSelectedColumns">false</property>
        </properties>
        <properties mode="edit_sort_infos">
            <property name="newSortInfoTemplate">#{documentSearchActions.newSortInfo}
            </property>
            <property name="required">false</property>
        </properties>
        <properties mode="edit_sort_infos_map">
            <property name="newSortInfoTemplate">#{documentSearchActions.newSortInfoMap}
            </property>
            <property name="required">false</property>
        </properties>
        <columns>
            <column name="selection" alwaysSelected="true">
                <properties mode="any">
                    <property name="isListingSelectionBox">true</property>
                    <property name="useFirstWidgetLabelAsColumnHeader">false</property>
                    <property name="columnStyleClass">iconColumn</property>
                </properties>
                <properties mode="csv">
                    <property name="isHidden">true</property>
                </properties>
                <properties mode="pdf">
                    <property name="isHidden">true</property>
                </properties>
                <widget>listing_ajax_selection_box</widget>
            </column>
            <column name="icon">
                <properties mode="any">
                    <property name="useFirstWidgetLabelAsColumnHeader">true</property>
                    <property name="columnStyleClass"></property>
                    <property name="label">Icon and document type</property>
                </properties>
                <widget>icon</widget>
            </column>
            <column name="title">
                <properties mode="any">
                    <property name="useFirstWidgetLabelAsColumnHeader">true</property>
                    <property name="columnStyleClass"></property>
                    <property name="label">Title</property>
                    <property name="sortPropertyName">dc:title</property>
                </properties>
                <properties mode="edit_sort_infos">
                    <property name="showInSortInfoSelection">true</property>
                </properties>
                <properties mode="edit_sort_infos_map">
                    <property name="showInSortInfoSelection">true</property>
                </properties>
                <widget>title</widget>
            </column>
            <column name="numero">
                <properties mode="any">
                    <property name="useFirstWidgetLabelAsColumnHeader">true</property>
                    <property name="columnStyleClass"></property>
                    <property name="label">Palier</property>
                    <property name="sortPropertyName">palier:numero</property>
                </properties>
                <properties mode="edit_sort_infos">
                    <property name="showInSortInfoSelection">true</property>
                </properties>
                <properties mode="edit_sort_infos_map">
                    <property name="showInSortInfoSelection">true</property>
                </properties>
                <widget>numero</widget>
            </column>
            <column name="cdc">
                <properties mode="any">
                    <property name="useFirstWidgetLabelAsColumnHeader">true</property>
                    <property name="columnStyleClass"></property>
                    <property name="label">CDC</property>
                    <property name="sortPropertyName"></property>
                </properties>
                <properties mode="edit_sort_infos">
                    <property name="showInSortInfoSelection">true</property>
                </properties>
                <properties mode="edit_sort_infos_map">
                    <property name="showInSortInfoSelection">true</property>
                </properties>
                <widget>cdc</widget>
            </column>
            <column name="segment">
                <properties mode="any">
                    <property name="useFirstWidgetLabelAsColumnHeader">true</property>
                    <property name="columnStyleClass"></property>
                    <property name="label">Segment</property>
                    <property name="sortPropertyName"></property>
                </properties>
                <properties mode="edit_sort_infos">
                    <property name="showInSortInfoSelection">true</property>
                </properties>
                <properties mode="edit_sort_infos_map">
                    <property name="showInSortInfoSelection">true</property>
                </properties>
                <widget>segment</widget>
            </column>
            <column name="date">
                <properties mode="any">
                    <property name="useFirstWidgetLabelAsColumnHeader">true</property>
                    <property name="columnStyleClass"></property>
                    <property name="label">Date</property>
                    <property name="sortPropertyName">dateReunion:date</property>
                </properties>
                <properties mode="edit_sort_infos">
                    <property name="showInSortInfoSelection">true</property>
                </properties>
                <properties mode="edit_sort_infos_map">
                    <property name="showInSortInfoSelection">true</property>
                </properties>
                <widget>date</widget>

            </column>
            <column name="doc_type">
                <properties mode="any">
                    <property name="useFirstWidgetLabelAsColumnHeader">true</property>
                    <property name="columnStyleClass"></property>
                    <property name="label">Type de Document</property>
                    <property name="sortPropertyName">sch:doc_type</property>
                </properties>
                <properties mode="edit_sort_infos">
                    <property name="showInSortInfoSelection">true</property>
                </properties>
                <properties mode="edit_sort_infos_map">
                    <property name="showInSortInfoSelection">true</property>
                </properties>
                <widget>doc_type</widget>
            </column>
        </columns>
        <widget name="numero" type="text">
            <labels>
                <label mode="any">Palier</label>
            </labels>
            <translated>false</translated>
            <fields>
                <field>data['palier']['numero']</field>
            </fields>
        </widget>
        <widget name="cdc" type="list">
            <labels>
                <label mode="any">CDC</label>
            </labels>
            <translated>false</translated>
            <fields>
                <field>data['sch']['cdc']</field>
            </fields>
            <properties widgetMode="view">
                <property name="hideSubLabels">true</property>
            </properties>
            <properties mode="any">
                <property name="hideSubLabels">true</property>
            </properties>
            <subWidgets>
                <widget name="sub0" type="text">
                    <labels>
                        <label mode="any"></label>
                    </labels>
                    <translated>false</translated>
                    <fields>
                        <field></field>
                    </fields>
                </widget>
            </subWidgets>
        </widget>
        <widget name="icon" type="listing_icon_type">
            <labels>
                <label mode="any"></label>
            </labels>
            <translated>true</translated>
            <fields>
                <field>data</field>
                <field>data.ref</field>
                <field>data.type</field>
                <field>data.folder</field>
            </fields>
        </widget>
        <widget name="title" type="listing_title_link">
            <labels>
                <label mode="any">Title</label>
            </labels>
            <translated>false</translated>
            <fields>
                <field>data</field>
                <field>data.ref</field>
                <field>data.dc.description</field>
                <field>data.file.content</field>
                <field>data.file.content.filename</field>
            </fields>
        </widget>
        <widget name="segment" type="list">
            <labels>
                <label mode="any">Segment</label>
            </labels>
            <translated>false</translated>
            <fields>
                <field>data['sch']['segment']</field>
            </fields>
            <properties widgetMode="view">
                <property name="hideSubLabels">true</property>
            </properties>
            <properties mode="any">
                <property name="hideSubLabels">true</property>
            </properties>
            <subWidgets>
                <widget name="sub0" type="text">
                    <labels>
                        <label mode="any"></label>
                    </labels>
                    <translated>false</translated>
                    <fields>
                        <field></field>
                    </fields>
                </widget>
            </subWidgets>
        </widget>
        <widget name="date" type="datetime">
            <labels>
                <label mode="any">Date</label>
            </labels>
            <translated>false</translated>
            <fields>
                <field>data['dateReunion']['date']</field>
            </fields>
        </widget>
        <widget name="doc_type" type="text">
            <labels>
                <label mode="any">Type de Document</label>
            </labels>
            <translated>false</translated>
            <fields>
                <field>data['sch']['doc_type']</field>
            </fields>
        </widget>
    </layout>
0 votes

0 answers

1396 views

ANSWER

Hi,

This is not enough information to understand where the problem could come from. Can you please give steps to reproduce on a bare 5.6 instance? Your custom configuration would help.

Also does problem persists after a login/logout? After a restart of the server if you're using hot reload?

Thanks

05/20/2014

No, if I restart the server or logout/login the problem is gone. I'll add some info about the costumization.
05/20/2014

Ok thanks, looks like a cache issue, can you please tell how the tab is defined?
05/21/2014

Thanks for your help. Wich tab do you mean? I have only modified one tab and is for the files.
05/21/2014

I'm trying to figure out where the cache issue comes from (and this issue has not been reported on 5.8 to my knowledge) so i'd like to know how the link between the tab and the content view is done: is the content view declared on the document type definition for instance?

I've tested using a "content view" widget on a custom tab layout, so maybe that's why i can't reproduce your issue.

05/21/2014

Ok, yes the content view is declared on the document type definition: <type id="DossierADD">

...
&lt;contentViews category=&quot;content&quot;&gt;
&lt;contentView showInExportView=&quot;false&quot;&gt;ContentView_ADD
&lt;/contentView&gt;
&lt;/contentViews&gt;
...

</type>

05/22/2014

Ok, thanks for the additional info, i'll try to reproduce.
05/22/2014