Studio-side
- in SETTING / Application Definition
- in Packages to install ensure Nuxeo Web UI and Nuxeo DAM are present
- save the project
- create a custom document type named MyCustomVideo inheriting from Video
- in Designer configure the view layout with the following code:
<!-- `nuxeo-mycustomvideo-view-layout` @group Nuxeo UI @element nuxeo-mycustomvideo-view-layout --> <dom-module id="nuxeo-mycustomvideo-view-layout"> <template> <style> *[role=widget] { padding: 5px; } </style> <nuxeo-document-viewer role="widget" document="[[document]]"></nuxeo-document-viewer> <nuxeo-document-attachments role="widget" document="[[document]]"></nuxeo-document-attachments> </template> <script> Polymer({ is: 'nuxeo-mycustomvideo-view-layout', behaviors: [Nuxeo.LayoutBehavior], properties: { /** * @doctype MyCustomVideo */ document: { type: Object, }, } }); </script> </dom-module>
- save the project
Server-side
- install nuxeo 9.10 (not with a later version)
- install nuxeo-web-ui and nuxeo-dam addons
- start the server
- sync the project
- create a workspace
- in the workspace create a video document with a main attachment (a video of course)
- on the right panel attach a 2nd video
- on the right panel attach a 3rd video
- wait for the preview to be generated
- click the preview button (the eye) for the main video
- observe it is working fine
- click the preview button (the eye) for the 2nd video
- observe the preview displayed is the one for the 1st video
- click the preview button (the eye) for the 3rd video
- observe the preview displayed is the one for the 1st video
Server-side (bis) - retry the same scenario with Nuxeo 10.10 or master
- observe each preview is correctly displayed
Expected behavior: each preview button should trigger the display of the right preview and not the one from the main blob.
Note: This works fine with 10.10 and later versions, thus affecting only 9.10. The code has changed between 9.10
<template is="dom-repeat" items="[[document.properties.files:files]]"> <nuxeo-document-blob document="[[document]]" xpath="files:files/[[index]]/file"></nuxeo-document-blob> </template>
<template is="dom-repeat" items="[[_computeFiles(document.*, xpath)]]"> <nuxeo-document-blob document="[[document]]" xpath="[[_computeBlobXpath(xpath, index)]]"></nuxeo-document-blob> </template>
- is related to
-
ELEMENTS-1018 Fix NullPointerException when previewing a folder
- Resolved