Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-5662

Empower developer with ability to apply operations on commited / moved / renamed node in the datasource

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Won't Do
    • Neutral
    • None
    • None
    • None
    • None

    Description

      Use Case

      Apply operations to node that is committed / moved / renamed by JcrDatasource.

      Applying the Use Case

      This use case comes from the Content Tags module, where we want to scan saved node for mgnl:tags property so can we can create new tags entered by the user.

      Having such way of altering the committed node, developers do not need to define custom commit action for each dialog or detail subApp, that allows to enter tags using TokenField.

      Content Tags is handling this by extending the JcrDataSource, however it is quite cumbersome:

      • one has to define new impl in the module descriptor and has to be in admincentral scope (if defined datasource-jcr scope, all other impls from ui-framework-jcr are trashed)
      • it is not flexible because only one impl can exist
      • seems too heavy to extend JcrDataSource because of adding tiny piece of functionality

      Possible solution could be to introduce commit / move / remove listeners – something like Vaadin's com.vaadin.flow.component.HasValue.ValueChangeListener and collect them using @Multibinding (or some other technique) so they don't need to be explicitly configured on the datasource definition.

       

      This functionality cannot be supplied by JCR's observation mechanism, as it would trigger for every node change in every workspace and would be very performance heavy.

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              jsimak Jaroslav Simak
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Task DoD