how to add a virtual navigation tree ?

hi, i m trying to enable another navigation tree. for the moment, my contribution looks like this :

i declared a schema to hold my query
target=“org.nuxeo.ecm.core.schema.TypeService” point=“schema”

create a document LocationSearch
target=“org.nuxeo.ecm.core.schema.TypeService” point=“doctype” and the tree
target=“” point=“trees”

but i certainly miss something with the new content view byLocationsContentView:

i declared my view with this extension point
target=“org.nuxeo.ecm.platform.ui.web.ContentViewService” point=“contentViews”

adding locations_virtual_navigation.xhtml under nuxeo.war

<ui:decorate template="/incl/virtual_navigation_template.xhtml"
    <ui:param name="contentViewName" value="byLocationsContentView" />

and my deployment fragment

<?xml version="1.0"?>
  <extension target="application#MODULE">


    <!-- Unzip the contents of our nuxeo.war into the server -->
    <unzip from="${bundle.fileName}" to="/">


    <extension target="faces-config#NAVIGATION">

          <redirect />


  <extension target="pages#PAGES">

    <page view-id="/locations_virtual_navigation.xhtml">



@Anahide, everything else is working, and if i call the bySubjectContentView instead of my view in the DirectoryTreeService extension point, the result is another Subject tree.

for example, this is a try in the coverage view. DEBUG [org.nuxeo.ecm.platform.ui.web.binding.alias.AliasValueExpression] Resolved expression var='contentViewName' for mapper with id '1176491654_3d42a2f6_1': byCoverageContentView

and this is in my custom view. obviously, it did not call the good view, but i can't figure out why ?

*DEBUG [org.nuxeo.ecm.platform.ui.web.binding.alias.AliasValueExpression] Resolved expression var='contentViewName' for mapper with id '-574529264_4dcfd17_1': document_content*
0 votes

1 answers




it seems you've done a lot of things that's needed so you should be on the right path!

can you please edit your post to give more info about what you're experiencing (is the rest of the application working ok, including other virtual navigations? is it just that your own navigation is not displayed? is the virtual navigation the only thing that does not work in your plugin? do you see any errors in logs?).

also please try to format the xml content you're pasting using the "preformatted text" button as it's quite hard reading it right now, and your configuration could be useful to other users.



sorry for the xml but the pre-formatted button doesn't look's to work on my computer…apparently, it's not possible to mix code and unordered list in the same post.

Thanks for the update, i'm assuming you don't have any ERROR logs?

DEBUG logs are low level logs that can give hints, but it's not clear what's working or not: from your description i guess that the tab is shown, it's just not displaying the right navigation, is that it? Please give more info.

In any case, posting the contributions to and org.nuxeo.ecm.platform.ui.web.ContentViewService could give a hint.


no, no errors are displayed on the logs.

i see the tab and the tree but when i clic on one item, i dont get any result and the right part of the page doesn't change. if i rename the view to an existing one, bySubjects for example, the tree is working so i guess it's something on my custom view registration.

i can't post the contributions for now, i will post them tonight


ok, i finnaly find the problem…i was testing my contribution within the ide.

The view was not registred when i deploy my contribution directly in the eclispe nuxeo-ide, but everything is working when i export a jar file.

here is the contribution :

     <!-- le schema qui contient la navigation virtuelle -->  
<extension target="org.nuxeo.ecm.core.schema.TypeService" point="schema">
    <schema name="locationsearch" src="schemas/location_search.xsd" prefix="ls"/>

    <!-- le document qui contient le schema précedent -->
<extension target="org.nuxeo.ecm.core.schema.TypeService" point="doctype">   
    <doctype extends="Document" name="LocationSearch">
        <schema name="locationsearch"/>

    <!-- Crée la vue qui va permettre d'afficher les résultats -->

<extension target="org.nuxeo.ecm.platform.ui.web.ContentViewService"

<contentView name="byLocationsContentView">
  <title>location search</title>

    <property name="coreSession">#{documentManager}</property>
    <whereClause docType="LocationSearch">
      <predicate operator="STARTSWITH" parameter="lc:locations">
        <field name="location_search_query" schema="locationsearch"/>
        ecm:mixinType != 'HiddenInNavigation' AND
        !='deleted' AND ecm:isCheckedInVersion = 0
    <sort column="dc:title" ascending="true" />


    <layout name="document_virtual_navigation_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"
      showSyndicationLinks="true" />
    <layout name="document_virtual_navigation_listing_ajax_icon_2_columns"
      title="document_listing_icon_2_columns" translateTitle="true"
      showSyndicationLinks="true" />

  <actions category="CURRENT_SELECTION_LIST" />



<!-- ajout de la navigation virtuelle  -->
<extension target=""

    <directoryTree name="byLocationsNavigation" label="My location Test"
    contentView="byLocationsContentView" field="location_search_query"
    schema="locationsearch" outcome="locations_virtual_navigation">

0 votes

You may create a JIRA ticket or use the Forum and explain exactly the procedure to reproduce the way to not have the bundle deployed with Nuxeo IDE. This feature works and we may miss something or you may miss something. If you want to benefit of the hot reload features, this could be better for you :).

To create an issue JIRA you can go here.

Thanks for your feedback.


ok, i post my contribution in the french forum