\r\n```\r\n\r\nEverything is working fine, the Polymer and the widget's params properties are updated when a parent is selected in the \"filter\" widget, BUT the operation is always called with the first specified parameters, i.e. the hard-coded value in the Polymer properties, no matter how many times it is modified... Weird right ?\r\n\r\nAny help welcome !\r\nHave a good day\r\n\r\n", "htmlContent" : "

Hi,

\n

This is a follow-up of this question, I am creating a new one because I'm trying a different approach. You should read it to have the first part of the story.

\n

In short : I've got a document suggestion widget in the creation form of an “index” document which will summarize all the documents for a given project. This widget searches for documents by calling a custom operation. This custom operation has a “parentsIds” parameter which serves as a filter, so that you don't have to scroll through all documents on the Nuxeo instance, but only the ones that are related to the project.

\n

At first I tried to pass the id of the “index” document being created so I could get its parent (that was the first question if you haven't read it), but the document does not have an id yet in the creation form, so I added another document suggestion widget to select folders in which the second widget is going to search.

\n

This new widget has a valueChanged listener updating the params.

\n

Here are the two widgets :

\n
<nuxeo-document-suggestion  value=\"\"\n                            label=\"[[i18n('manufacturing_summary.documentsLocations')]]\"\n                            multiple=\"true\"\n                            min-chars=\"0\"\n                            role=\"widget\"\n                            placeholder=\"[[i18n('dublincoreEdit.directorySuggestion.placeholder')]]\"\n                            operation=\"SearchHWProjects\"\n                            on-value-changed=\"_documentsLocationsUpdated\"\n></nuxeo-document-suggestion>\n\n<nuxeo-document-suggestion  id=\"documentSuggestionWidget\"\n                            value=\"{{document.properties.mfs:documents}}\"\n                            label=\"[[i18n('manufacturing_summary.documents')]]\"\n                            multiple=\"true\"\n                            min-chars=\"0\"\n                            role=\"widget\"\n                            placeholder=\"[[i18n('dublincoreEdit.directorySuggestion.placeholder')]]\"\n                            operation=\"SearchDocuments\"\n                            params=\"[[params]]\"\n></nuxeo-document-suggestion>\n
\n

and the corresponding script :

\n
<script>\n    Polymer({\n        is: 'nuxeo-manufacturing_summary-create-layout',\n        behaviors: [Nuxeo.LayoutBehavior],\n        properties: {\n            /**\n             * @doctype manufacturing_summary\n             */\n            document: Object,\n\n            params: {\n                type: Object,\n                value: {'doctype': 'hwp_document', 'parentsIds': ''},\n            }\n        },\n\n        _documentsLocationsUpdated: function (event) {\n            if (event && event.detail && event.detail.value) {\n                this.params.parentsIds = JSON.stringify(event.detail.value);\n            }\n        },\n    });\n</script>\n
\n

Everything is working fine, the Polymer and the widget's params properties are updated when a parent is selected in the “filter” widget, BUT the operation is always called with the first specified parameters, i.e. the hard-coded value in the Polymer properties, no matter how many times it is modified… Weird right ?

\n

Any help welcome ! Have a good day

" } ] }; Versioning.getActiveVersion = function() { var versions = this.versions; for (var i=0,len=versions.length;i

Select a revision to compare with:
Side by side diff