You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unserializable component cannot be used as transient. Even if that would make serialization phase work, it would produce another problem. When deserialization is done, there would be null-entry in component hierarchy and that would produce NPE at some phase and things break. This is also why just blacklisting unserializable component in serialization by some other means wont work as is either.
Unserializable components do exists for various reasons. Spreadsheet is a good example in our framework: vaadin/flow-components#6612 Other potential candidates can be probably found from Directory add-ons.
As the problem is more generic than Spreadsheet. We could create UnserializableComponentWrapper, and add that as utility to KubernetesKit. UnserializableComponentWrapper would be a component itself. It would necessitate that there will be one wrapping div element in DOM as Composite wont allow wrapped component to change on the fly. Wrapper could have two lambda's as API. The other lambda would be "custom serializer", which would store part of the component state what is serializable. E.g. in case of Spreadsheet, you cannot serialize Workbook, but Workbook has API to get the Excel file, so you could get that as byte array. So that is serializable. The other API will generate a new component instance, e.g. Spreadsheet in this case, and there you could use the part of the state that was serializable. E.g. in this case you can get the bytearray back and set it to Workbook as Excel file.
The text was updated successfully, but these errors were encountered:
Unserializable component cannot be used as transient. Even if that would make serialization phase work, it would produce another problem. When deserialization is done, there would be null-entry in component hierarchy and that would produce NPE at some phase and things break. This is also why just blacklisting unserializable component in serialization by some other means wont work as is either.
Unserializable components do exists for various reasons. Spreadsheet is a good example in our framework: vaadin/flow-components#6612 Other potential candidates can be probably found from Directory add-ons.
As the problem is more generic than Spreadsheet. We could create UnserializableComponentWrapper, and add that as utility to KubernetesKit. UnserializableComponentWrapper would be a component itself. It would necessitate that there will be one wrapping div element in DOM as Composite wont allow wrapped component to change on the fly. Wrapper could have two lambda's as API. The other lambda would be "custom serializer", which would store part of the component state what is serializable. E.g. in case of Spreadsheet, you cannot serialize Workbook, but Workbook has API to get the Excel file, so you could get that as byte array. So that is serializable. The other API will generate a new component instance, e.g. Spreadsheet in this case, and there you could use the part of the state that was serializable. E.g. in this case you can get the bytearray back and set it to Workbook as Excel file.
The text was updated successfully, but these errors were encountered: