When trying to bind an HTML element to an entity property path, a java.lang.IllegalArgumentException is thrown. The issue seems to be related to the recent implementation that enables data binding on HTML components, but does not currently support property paths.
Steps To Reproduce
Create a project using Jmix version 2.4.0-SNAPSHOT.
Attempt to bind an HTML element to a nested property path, e.g.:
java.lang.IllegalArgumentException: Can't find getter for property 'turbine.manufacturer' at class io.jmix.windturbines.entity.inspection.Inspection
at io.jmix.core.metamodel.model.utils.MethodsCache.getGetter(MethodsCache.java:203) ~[jmix-core-2.4.999-SNAPSHOT.jar:na]
at io.jmix.core.entity.BaseEntityEntry.getAttributeValue(BaseEntityEntry.java:85) ~[jmix-core-2.4.999-SNAPSHOT.jar:na]
at io.jmix.flowui.data.binding.impl.HtmlContainerReadonlyDataBindingImpl.lambda$bind$2(HtmlContainerReadonlyDataBindingImpl.java:101) ~[jmix-flowui-2.4.999-SNAPSHOT.jar:na]
Expected Behavior
The data binding should support entity property paths similarly to how it’s handled in other components, like the DataGrid. The expected behavior is that the property path turbine.manufacturer should be correctly resolved and bound without throwing an exception.
Environment
Jmix version: 2.4.0-SNAPSHOT
Bug Description
When trying to bind an HTML element to an entity property path, a
java.lang.IllegalArgumentException
is thrown. The issue seems to be related to the recent implementation that enables data binding on HTML components, but does not currently support property paths.Steps To Reproduce
Attempt to bind an HTML element to a nested property path, e.g.:
Current Behavior
The application throws the following exception:
Expected Behavior
The data binding should support entity property paths similarly to how it’s handled in other components, like the DataGrid. The expected behavior is that the property path turbine.manufacturer should be correctly resolved and bound without throwing an exception.