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

ComboBox field with optionListDatasource doesn't work as filterComponent

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Neutral
    • None
    • 6.2.16
    • None
    • None

    Description

      Steps to reproduce

      1. use attached tours.yaml as hotfix for /tours/app/tours.yaml resource
      2. open Tours app and select Featured option in comboBox filter

      Expected results

      Only tours with isFeatured flag are shown in grid

      Actual results

      Nothing is shown

      Workaround

      use custom ColumnDefinition class (see Resource app for example) or use enumDatasource with custom enumeration class

      Development notes

      there are two places where it can be fixed in ui codebase.

      option 1) JcrQueryBuilder#withPropertyFilter:

      final String value = (filterEntryValue instanceof Node) ? ((Node) filterEntryValue).getIdentifier() :
                             (filterEntryValue instanceof Option) ? ((Option) filterEntryValue).getValue() : filterEntryValue.toString().toLowerCase();

      or (cleaner) option 2) provide #toString impl in info.magnolia.ui.datasource.optionlist.Option:

      @Override
      public String toString() {
        return getValue();
      }

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                asiska Adam Siska
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD