Closed GlebDurygin closed 2 years ago
failed at Navigating to filtered-tab gives NullPointerException error, after importing FilterConfiguration from ZIP archive TC:
ER: Configuration successfully imported from both files and filter-preset is visible in the Users tab AR: NullPointerException error when importing from ZIP file and navigating to the Users tab
stacktrace in attachments stacktrace8.txt
Verified on platform version 1.2.0-RC1
Forum topic: https://forum.jmix.ru/t/ne-rabotaet-eksport-konfiguraczii-filtrov-v-inspektore-sushhnostej/247
Solution
EntityAttributeSerializationExtension
An extension point (class EntityAttributeSerializationExtension) has been added to the mechanism for serializing and deserializing an entity to JSON, which is implemented in the
EntitySerialization
bean. The user can use this extension point to define their own logic for serializing and deserializing the entity attribute value to JSON. The desired extension is selected using theEntityAttributeSerializationExtension#supports(MetaProperty)
method.For the filter configuration, its own implementation of the extension was created (see
FilterConditionAttributeSerializationExtension
). The user can override this behavior by creating an extension as a bean and setting it to a higher order than theFilterConditionAttributeSerializationExtension
.EntityAttributeImportExtension
An extension point (class EntityAttributeImportExtension) has been added to the entity import mechanism, which is implemented in the
EntityImportExport
bean. The user can use this extension point to define their own logic for importing the entity attribute value. The desired extension is selected using theEntityAttributeImportExtension#supports(MetaProperty)
method.For the filter configuration, its own implementation of the extension was created (see
FilterConditionAttributeImportExtension
). The user can override this behavior by creating an extension as a bean and setting it to a higher order than theFilterConditionAttributeImportExtension
.QA
Check that user can import and export FilterConfiguration