jmix icon indicating copy to clipboard operation
jmix copied to clipboard

Dynamic attribute options are not recalculated after dependent attribute is changed

Open Flaurite opened this issue 3 years ago • 0 comments

Description

Demo project contains "User category" category of "DynamicAttributes" that contains two attributes:

  • type (Enum);
  • bonus (String)

Bonus depends on "type" and should reload its options according to the documentation: calculated-values-and-options.

When changing the value of one of these attributes, either the script for calculating the attribute value or the script for calculating the list of possible values will be recalculated

Investigation notes See:

  • DynAttrComponentGenerationStrategy#setComboBoxOptionsLoader();
  • DynAttrComponentGenerationStrategy#setValuesPickerOptionsLoader();

dependsOnAttributeCodes contains attribute names with "plus" but e.getProperty() return name without it.

Steps to reproduce

  1. Download demo project: demo.zip

  2. Launch the app

  3. Got to Users -> Edit admin

  4. Select any value from "type".

  5. Try to select value for "bonus"

ER Options should be loaded.

AR Empty dropdown list.

Flaurite avatar Jul 19 '22 06:07 Flaurite