[MGNLUI-3893] Filtering mode in select fields does not work Created: 26/May/16  Updated: 09/Feb/17  Resolved: 03/Jul/16

Status: Closed
Project: Magnolia UI
Component/s: dialogs
Affects Version/s: 5.3.14, 5.4.6
Fix Version/s: 5.3.15, 5.4.8, 5.5

Type: Bug Priority: Major
Reporter: Frank Sommer Assignee: Oanh Thai Hoang
Resolution: Fixed Votes: 1
Labels: devwl, support
Remaining Estimate: 0d
Time Spent: 3d
Original Estimate: 5d
Environment:

Firefox, Safari, Chrome


Attachments: XML File config.modules.pages.dialogs.editPage.form.tabs.tabPage.fields.select.xml     PNG File screenshot-1.png    
Issue Links:
duplicate
duplicates MGNLUI-2841 Let filteringMode be configured on Se... Closed
relation
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Release notes required:
Yes
Documentation update required:
Yes
Date of First Response:
Sprint: Saigon 51
Story Points: 8

 Description   

A JCR configured select field does not work with filtering. I attach my select field configuration as bootstrap file config.modules.pages.dialogs.editPage.form.tabs.tabPage.fields.select.xml.

Steps to reproduce

  1. Go to https://demoauthor.magnolia-cms.com/.magnolia/admincentral#app:configuration:browser;/modules/pages/dialogs/editPage/form/tabs/tabPage/fields:treeview:
  2. Add a select field with filtering, described here https://documentation.magnolia-cms.com/display/DOCS/Select+field
  3. Open https://demoauthor.magnolia-cms.com/.magnolia/admincentral#app:pages:;/sportstation:treeview: and click "Rename page"
    1. In the select field you can type, but nothings happens, no filtering (see screenshot-1.png)

Solution

  1. Introduce new setter SelectFieldDefinition#setFilteringMode(FilteringMode)
  2. Provide documentation for SelectFieldDefinition#filteringMode and SelectFieldDefinition#getFilteringMode


 Comments   
Comment by Ngoc Nguyenthanh [ 30/Jun/16 ]
What happened?
Inconsistency of get & set method of filteringMode configuration variable is the root cause.
  • SelectFieldDefinition#setFilteringMode(int) accept an integer value.
  • SelectFieldDefinition#getFilteringMode return a FilteringMode
  • Node2Bean mechanism can not get write method of filteringMode configuration variable then it led to the issue.
Solution
  • Introduce new set method SelectFieldDefinition#setFilteringMode(com.vaadin.shared.ui.combobox.FilteringMode)
Actions
  • Write new set method, mark as deprecated to old set method.
  • Use new set method in related classes that use the old set method directly.
  • Write an update task in order to convert value of filteringMode from integer to appropriate value.
  • Update documentation: https://documentation.magnolia-cms.com/display/DOCS/Select+field
    filteringMode accept 3 values: OFF, CONTAINS, STARTSWITH instead of integer value.
Comment by Mikaël Geljić [ 01/Jul/16 ]
  • First reminded myself that one has to configure a pageLength as well to turn on filteringMode
  • Even then—correct me if I'm wrong—configuring filteringMode with one of those int number never worked at all. So there's no backwards compatibility to preserve, nor upgrade to make.
  • BTW, for completeness, enum configuration is case-insensitive too
Generated at Mon Feb 12 09:11:10 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.