The content of this documentation refers to all the Nuxeo products and modules. You may want to check the Nuxeo Platform technical documentation, the Nuxeo Studio documentation, the Core Developer Guide, or the Administration Guide.
Contributors, don't hesitate to move pages in the relevant spaces

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

When you click on a folderish document, you see a table with a list of its children. The default number of documents is 10 per page. Nuxeo queries the repository to get the list of children, and show the number per page of documents set in this query. To change this number, you need to change the query. Queries are defined in querymodel-contrib.xml in nuxeo-platform-webapp. The one showing the number per page is:

Code Block
xml
<queryModel name="CURRENT_DOC_CHILDREN">
  <pattern>
    SELECT * FROM Document WHERE ecm:parentId = ? AND
    ecm:isCheckedInVersion = 0 AND ecm:mixinType != 'HiddenInNavigation'
    AND ecm:currentLifeCycleState != 'deleted'
  </pattern>
  <sortable value="true" defaultSortColumn="dc:title"
    defaultSortAscending="true" />
  <max>10</max>

  <!--
    <whereClause>

    <predicate parameter="ecm:parentId" operator="=">
    <field schema="browsing_filters" name="query_parentId" />
    </predicate>
    </whereClause>
  -->
</queryModel>

To modify this query, you don't need to change the nuxeo jar. Write a new query with the same name and require org.nuxeo.ecm.webapp.querymodel.DefaultQueryModels, so your new definition will prevail. You can do it in your plugin or just add a querymodel-config.xml (double check, it ends with "config", not "contrib", when in the config folder) in $JBOSS/server/default/deploy/nuxeo.ear/config that could look like:

Code Block
xml
<?xml version="1.0"?>
<component name="com.myexample.query.model.override">
  <require>org.nuxeo.ecm.webapp.querymodel.DefaultQueryModels</require>
  <extension
    target="org.nuxeo.ecm.core.search.api.client.querymodel.QueryModelService"
    point="model">
    <queryModel name="CURRENT_DOC_CHILDREN">
      <pattern>
        SELECT * FROM Document WHERE ecm:parentId = ? AND
        ecm:isCheckedInVersion = 0 AND ecm:mixinType != 'HiddenInNavigation'
        AND ecm:currentLifeCycleState != 'deleted'
      </pattern>
      <sortable value="true" defaultSortColumn="dc:title"
        defaultSortAscending="true" />
      <max>11</max>
    </queryModel>
</extension>
</component>

...