Usage nuxeo-results-view

Hello,

I'm trying to use the nuxeo-results-view element to display a custom listing on a documents layout. I created the page-provider and a page-provider results layout.

Then I used the following HTML fragment to embed it in the layout:

<nuxeo-results-view
  role="widget"
  document="[[document]]"
  provider="customerfiles" <!-- my page provider -->
  visible="true"
  search-name="customerfiles" <!-- results layout of page provider -->
  schemas="dublincore,common,uid,file,my-schema"
  params="{system_parentId : document.uid}">
</nuxeo-results-view>

It actually kind of works:

  • the created results layout is embedded in the HTML shown in the browser
  • some documents are retrieved using the page provider

But:

  • the retrieved documents aren't added to the table -> so there aren't displayed at all
  • the params attribute is ignored at all -> simply all existing documents are in the result set of the page provider

I don't know what I'm missing or doing wrong. I appreciate any help/hints.

Regards,

Marvin

0 votes

3 answers

2698 views

ANSWER



Actually I had two independent issues. First one was a typo in the dom-module id. Second one in the params attribute. Quotes are very important, so I had to change it to: params="{"system_parentId" : "[[document.uid]]"}" (Replace inner double quotes with & quot; (without space after &)).

0 votes



Hello Marvin,

I've stumbled upon exactly the same problem recently: https://answers.nuxeo.com/general/q/461fd4b8f46a4e7fb965438ed7c209be/Using-page-providers-in-Web-UI

I've contacted the support, seems that Page Providers in WebUI are buggy, so it should be fixed in the next hotfix: https://jira.nuxeo.com/browse/NXP-24253

UPD: It is NOT a bug, I've tried doing it incorrectly. If anyone will have the same issue - you should read the comments to JIRA ticket, you'll get an explanation of doing this correctly.

0 votes



It's still not working for me when using "nuxeo-document-content" element only with the "nuxeo-results-view", the params are used correctly.
03/02/2018


Even when following the instructions of this tutorial I cannot get it to work. The search-results were retrieved (<my nuxeo host>/nuxeo/api/v1/search/pp/customerfiles/execute?currentPageIndex=0&pageSize=40&sortBy=&sortOrder= is called but the results didn't display in HTML) and even the queue view shows the results correctly. Seems like this is a bug. Does someone experience the same?

0 votes