Don't display the input document in a nuxeo-document-suggestion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-04-2019 02:23 AM
Hi, I'm trying to don't display the input document in a document-suggestion component, using the [[document.uid]] property inside the query in the Repository.Query operation, but nuxeo doesn't receive this uid.
This is my code:
<nuxeo-document-suggestion operation="Document.Query"
input = "[[document]]"
params='{"query": "SELECT * FROM Item WHERE ecm:uuid != '[[document.uid]]'"}'
label="[[i18n('label.relation.pickDocument')]]"
value="{{path}}"
min-chars="0"
result-formatter="[[myFormatter]]"
selected-item="{{toDoc}}">
</nuxeo-document-suggestion>
If I insert the code instead of the document property the query works and the input document doesn't display. Furthermore, if I show [[document.uid]] in a normal div, nuxeo receive the id correctly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-04-2019 04:02 PM
Hello,
- Create a page provider to list the document you need to search for, with a predicate linked to the
ecm:uuid
propertty, with!=
- In your document suggestion element, use the
pageProvider
attribute to point to the previous page provider - In your document type layout, create a
nuxeo-page-provider
element
<nuxeo-page-provider id="nxProvider" provider="<YOUR_PAGE_PROVIDER>" params="[[_computeParams(document)]]" enrichers="thumbnail, permissions" schemas="dublincore,common,uid" page-size="20" headers="{"X-NXfetch.document": "properties", "X-NXtranslate.directoryEntry": "label"}" auto=""></nuxeo-page-provider>
- Add the following code in the polymer section
_computeParams: function (document) {
return document ? {system_uuid: this.document.uid} : {};
},
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2019 03:36 AM
In the document suggestion element I have to declare page-provider = [[nxProvider]] right? It doesn't work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2019 09:33 AM
Try to add in the polymer section:
ready: function() {
this.nxProvider = this.$.nxProvider;
},
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2019 02:57 AM
It happens the next error
