I want to customize the nuxeo-data-table that shows nuxeo-results in nuxeo-assets-search-results.html by adding a new column which displays a property of a parent document.
I'm asking a solution to access to a parent document data in such widget.
I' ve tried to get the parent data using a function that call the operation "Document.getParent" and return the property I need.
In fact, I've added a new column that calls this function :
[[_getProperty(item)]]
function I used :
_getProperty: function(item) {
this.currentItemId = item.uid;
if (this.currentItemId != null && this.currentItemId != undefined) {
this.$.fetchDocumentOperation
.execute()
.then(function(response) {
this.input = response;
if (this.input != null && this.input != undefined) {
this.$.getParentOperation.execute().then(function(response2) {
console.log(response2.properties["xpath"]);
return response2.properties["xpath"];
}.bind(this))
.catch(function(error) {
console.log("error:" + error);
}.bind(this));
}
}.bind(this))
.catch(function(error) {
console.log("error:" + error);
}.bind(this));
By this solution I was able to display the property I need in console but it's not displayed in interface.