Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-13894

Allow rendering an UIX in an isolated script context

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 8.4
    • Fix Version/s: None
    • Component/s: UI Extension
    • Labels:
      None
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      Currently, UIX are being rendered in the same script context as the main document.

      A side effect of this is that, an UIX could override or initialize too early the same velocity variable names that are used in the document content (e.x. in a sheet) and, as a result, it could impact the way the document is rendered, just because the UIX happens to be rendered before the document`s content (e.g. in a menu or in the header).

      It would be very useful if an UIX could specify if it should be rendered using the global/shared script context or if it should use an isolated (cloned) script context, that would prevent it from altering the global one.

      IMO, rendering in isolation should be the default and an UIX developer could change it, only if he really needs to work with the global scope (since there might still be valid cases).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              enygma Eduard Moraru
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: