Overriding Nuxeo WebUI elements


I'm wondering if I'm missing some info on how to override existing Web UI elements via Nuxeo Studio. After reading https://doc.nuxeo.com/910/nxdoc/web-ui-deployment/ I tried overriding some Web UI components.

For example I tried to override the nuxeo-document-create-popup element (https://github.com/nuxeo/nuxeo-web-ui/blob/release-9.10-HF01/elements/nuxeo-document-create-popup/nuxeo-document-create-popup.html)

I've defined an XML extension as follows:

<extension target="org.nuxeo.ecm.platform.WebResources" point="resources">
    <resource name="nuxeo-document-create-popup.html" type="import" shrinkable="false">
<extension target="org.nuxeo.ecm.platform.WebResources" point="bundles">
    <bundle name="web-ui">
        <resources append="true">

And put my customized html in UI/elements/nuxeo-document-create-popup/nuxeo-doucment-create-popup.html :

type an image title

When I am deploying my bundle, there are two problems:

1) If I remove the Polymer script from my custom HTML - the changes of HTML template are not taken into account, which was not the case on Nuxeo 8.10 - we were able to override only the HTML template part of the Web UI element.

2) If I do not remove the Polymer script from the element, the customized element won't be loaded because the native WebUI element with the same ID is already registered. We can observe the following error:

Failed to execute 'define' on 'CustomElementRegistry': this name has already been used with this registry

which is rather logical. What I do not understand - we have a similar extension for nuxeo-browser.html file, in which we forgot to remove the Polymer code, but the extension works perfectly, so now I am confused.

Any suggestions on what did we do wrong ?

0 votes

0 answers