jmix
jmix copied to clipboard
EntityValueAccessException thrown while opening screen with manually added dynamic attribute
Description
Jmix: 1.3.2
Demo project contains configured Category for User entity and includes one attribute: +cats-cat-name.
User edit/browse contains <loader dynamicAttributes="true"/>
Demo project: trdynattr.zip
Steps to reproduce
Case 1.
- Download demo project above.
- Open user browse screen.
AR
io.jmix.core.EntityValueAccessException: Dynamic attributes should be loaded explicitly
at io.jmix.dynattr.DynamicAttributesState.getAttributeValue(DynamicAttributesState.java:59)
at io.jmix.core.entity.BaseEntityEntry.getAttributeValue(BaseEntityEntry.java:81)
at io.jmix.core.entity.EntityValues.getValue(EntityValues.java:100)
at io.jmix.core.entity.EntityValues.getValueEx(EntityValues.java:131)
at io.jmix.ui.component.data.table.ContainerTableItems.getItemValue(ContainerTableItems.java:116)
at io.jmix.ui.component.table.TableItemWrapper.getPropertyValue(TableItemWrapper.java:81)
at io.jmix.ui.component.table.TableItemPropertyWrapper.getValue(TableItemPropertyWrapper.java:37)
at io.jmix.ui.component.impl.AbstractTable.formatCellValue(AbstractTable.java:1243)
at io.jmix.ui.widget.JmixTable.formatPropertyValue(JmixTable.java:345)
at io.jmix.ui.widget.JmixTable.getPropertyValue(JmixTable.java:260)
at com.vaadin.v7.ui.Table.parseItemIdToCells(Table.java:2396)
at com.vaadin.v7.ui.Table.getVisibleCellsNoCache(Table.java:2240)
at com.vaadin.v7.ui.Table.refreshRenderedCells(Table.java:1783)
at io.jmix.ui.widget.JmixGroupTable.refreshRenderedCells(JmixGroupTable.java:736)
at com.vaadin.v7.ui.Table.attach(Table.java:4338)
Case 2
- Download the same project above
- In user browse delete column with dynamic attribute:
<column id="+cats-cat-name"/> - Try to save some value in dynamic attribute field.
- Edit this entity instance again.
AR Field with Dynamic Attribute is empty.
Note All these cases are not reproduced if you configure Dynamic Attribute Visibility for User edit/browse screens.