|
| Description: |
*Steps to reproduce:* # Create a new page with content {code:java} {{velocity}}$xwiki.jsx.use($doc.getDocumentReference(), {'parameter': 'My Custom Value'}){{/velocity}} {code}
# Create a JSX with "On this page" scope, "Parse content" set to "Yes", "Caching policy" set to "No Caching" and the following code: {code:javascript} function doSomething() { document.getElementById('xwikicontent')?.append($jsontool.serialize("Parameter value: $!request.parameter")); }if (document.readyState === "loading") { // Loading hasn't finished yet document.addEventListener("DOMContentLoaded", doSomething); } else { // `DOMContentLoaded` has already fired doSomething(); }{code}
# On the same page, create a UIX object with executed content "Hello world!", extension point ID "org.xwiki.plaftorm.template.docextra", "Extension ID" "my.example.docextra", Extension Scope "Current Wiki" and the following parameters: {code:java} show=true title=My Tab name=myTab order=1000 {code} # View the page and click on "My Tab" below the document
Instead of following these steps, the attached XAR can be imported, then just the last step needs to be done.
*Expected result:*
The content contains "Parameter value: My Custom Value".
*Actual result:*
The content contains the expected results before clicking on "My Tab", but afterwards it contains "Parameter value: My Custom ValueParameter value: "
This shows that the JSX has been executed twice. This doesn't happen with other docextra tabs that also load JSX like the attachments tab because it's using different code for triggering the loading of JSX. |
| Attachment: |
Page+with+UIX.WebHome.xar |
|