Uploaded image for project: 'Suggestion Box'
  1. Suggestion Box
  2. SUGGEST-190

Sorting and Delegating Transformers

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Accepted
    • Priority: Neutral
    • Resolution: Unresolved
    • Labels:
      None

      Description

      The documentation starts out with recommending the delegating transformers: "The delegating transformers classes should be your first choice since they are the most versatile." - however, as delegating transformers do not offer sorting, they lack a feature that is (or at least, for many, might be) an essential feature to have. Further down on this documentation page you'll find: "It is not possible to change the order of the fields by using the Delegating*Transformer classes. These classes only delegate to other independent transformer classes which do not know about each other. The new order of the fields would not be kept after saving the change.". However, I can't see why delegating transformers are not allowing sorting, at minimum at row-level? I get why reordering of fields in a row might be particularly tricky - that's not what is needed either.

      It would make sense to be able to sort the rows - on a "top-level row node" of the delegating transformer kind of way (flights0 and flights1 in the screenshot of how data is stored in the JCR just above). The components/fields and content inside a row node are just child nodes attached to it - so they should follow along nicely when moved (re-ordered) in the JCR?

      A use-case scenario would be a multivalue field for an image carousel. Each row having link, image, description-text and alt-text fields on it. The content-editors might start out with 5 images in the carousel and later wish to add two new images and do a reordering. As is now; You'll need to delete the content, and re-add it from scratch in the order you want.

      Please consider adding row-level sorting on delegating transformers as arrow up/down buttons next to the trashcan delete button for the row.

      Thanks!

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            mfosgerau Michael Fosgerau
            Votes:
            5 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated: