Uploaded image for project: 'Magnolia Javascript Models'
  1. Magnolia Javascript Models
  2. JSMODELS-46

Backend live actions - jsAction ValueContext handling causes reduced functionality

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Neutral
    • None
    • None
    • None

    Description

      While trying to use the javascript actions for the magnolia in order to create some integrations we run upon the issue that info.magnolia.module.backendlive.actions.JavascriptAction binds to the content variable the unwrapped content of ValueContext<?> item, in fact the method getSingleOrThrow is used which is causing issues in the following scenarios

      1. It fails to instantiate on the root level of a workspace if I want to create a dialog to do something without having a node selected
      2. By unwrapping the item the dialog context and functionality is lost so each action has to be split in two parts (create with a simple dialog or app/publish to external system)

      On a first look passing the ValueContext<?> item in the script whatever that may be would increase the use cases for jsActions exponentially 

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              srhodes Scot Rhodes
              asyrmas Andreas Syrmas
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Checklists

                  Task DoD