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
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 &)).
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.
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?