jmix
jmix copied to clipboard
Dynamic attribute options are not recalculated after dependent attribute is changed
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
-
Download demo project: demo.zip
-
Launch the app
-
Got to Users -> Edit admin
-
Select any value from "type".
-
Try to select value for "bonus"
ER Options should be loaded.
AR Empty dropdown list.