04-20-2012 06:59 AM
Out of the box, Nuxeo default to 20 items per display page. Users can change that to 50 maximum. I want to remove pagination at all. Or set items/page to very high number (eg 100000) by default
What need to be changed for that ?
04-20-2012 08:32 PM
Override the default content view definitions to set the default size you want. Not sure of the limit here, but I tried 1250 (with a big test view) and it worked. The on-screen selector for the items/page should be modified or removed to reflect the new max value, otherwise the 1250 items will be displayed but the screen will show 5 (a little confusing). One thing to keep in mind is the potential for performance issues as the number of documents grows.
Items/page can be found in content_view_result_layout_selector.xhtml -- to override you'll need to make a contribution.
Default content view can be overriden through an IDE contribution or directly by placing the override file in the nxserver/config directory and naming it
<component name="com.concena.ecm.webapp.contentview.contrib">
<require>org.nuxeo.ecm.webapp.contentview.contrib</require>
<extension target="org.nuxeo.ecm.platform.ui.web.ContentViewService"
point="contentViews">
<contentView name="document_content">
<title>label.contentview.document_content</title>
<translateTitle>true</translateTitle>
<showTitle>false</showTitle>
<coreQueryPageProvider>
<property name="coreSession">#{documentManager}</property>
<whereClause docType="AdvancedSearch">
<predicate parameter="ecm:fulltext" operator="FULLTEXT">
<field schema="advanced_search" name="fulltext_all" />
</predicate>
<predicate parameter="dc:title" operator="FULLTEXT">
<field schema="advanced_search" name="title" />
</predicate>
<predicate parameter="dc:modified" operator="BETWEEN">
<field schema="advanced_search" name="modified_min" />
<field schema="advanced_search" name="modified_max" />
</predicate>
<fixedPart>
ecm:parentId = ? AND ecm:isCheckedInVersion = 0 AND
ecm:mixinType !=
'HiddenInNavigation' AND ecm:currentLifeCycleState
!= 'deleted'
</fixedPart>
</whereClause>
<parameter>#{currentDocument.id}</parameter>
<sort column="dc:title" ascending="true" />
<pageSize>1250</pageSize>
</coreQueryPageProvider>
04-20-2012 08:32 PM
Override the default content view definitions to set the default size you want. Not sure of the limit here, but I tried 1250 (with a big test view) and it worked. The on-screen selector for the items/page should be modified or removed to reflect the new max value, otherwise the 1250 items will be displayed but the screen will show 5 (a little confusing). One thing to keep in mind is the potential for performance issues as the number of documents grows.
Items/page can be found in content_view_result_layout_selector.xhtml -- to override you'll need to make a contribution.
Default content view can be overriden through an IDE contribution or directly by placing the override file in the nxserver/config directory and naming it
<component name="com.concena.ecm.webapp.contentview.contrib">
<require>org.nuxeo.ecm.webapp.contentview.contrib</require>
<extension target="org.nuxeo.ecm.platform.ui.web.ContentViewService"
point="contentViews">
<contentView name="document_content">
<title>label.contentview.document_content</title>
<translateTitle>true</translateTitle>
<showTitle>false</showTitle>
<coreQueryPageProvider>
<property name="coreSession">#{documentManager}</property>
<whereClause docType="AdvancedSearch">
<predicate parameter="ecm:fulltext" operator="FULLTEXT">
<field schema="advanced_search" name="fulltext_all" />
</predicate>
<predicate parameter="dc:title" operator="FULLTEXT">
<field schema="advanced_search" name="title" />
</predicate>
<predicate parameter="dc:modified" operator="BETWEEN">
<field schema="advanced_search" name="modified_min" />
<field schema="advanced_search" name="modified_max" />
</predicate>
<fixedPart>
ecm:parentId = ? AND ecm:isCheckedInVersion = 0 AND
ecm:mixinType !=
'HiddenInNavigation' AND ecm:currentLifeCycleState
!= 'deleted'
</fixedPart>
</whereClause>
<parameter>#{currentDocument.id}</parameter>
<sort column="dc:title" ascending="true" />
<pageSize>1250</pageSize>
</coreQueryPageProvider>
04-20-2012 09:50 PM
This is what scare me. Do I really have to override the whole PageProvider for a single property ?
04-20-2012 11:19 PM
It's verbose, but I don't think it's all that scary
04-20-2012 11:52 PM
Just did that. But I have a feeling that this is somewhat brittle because now I'm responsible for those nxquery predicates (and other little stuffs). Also I'm still cannot be able to override the
06-04-2012 07:41 AM
The default max page size can be controlled by a framework property on future version 5.6, backported on maintenance branches for versions 5.4.2 and 5.5, see https://jira.nuxeo.com/browse/NXP-9052
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.