New & Noteworthy
Buttons and Arbitrary UI Elements in Section Headers
Using the annotation @SectionHeader, any UI element can now be added to a section’s header instead of its content area. This should be used instead of a button PMO returned from
SidebarLayout got a
SelectionListener to get an event when the selected sidebar sheet changes. To identify the selected sidebar sheet
for example when the selected sheet is referenced by a URL parameter, the sidebar sheets now have an optional ID. The ID is derived from name if it
was not specified explicitly but it is recommended to make it explicit.
SidebarSheet is still the recommended way to trigger an update when the sheet gets selected. This way it remains self-contained (the layout does not need to know how to update the sheet). To make the instantiation more flexible, the
UiUpdateObserver could now be specified after constructor using a setter.
Bindings are held in WeakReferences
Bindings used to be removed only when explicitly calling
BindingContext#removeBindings…, or in case of tables, when a
DetachEvent was received. The downside was that bindings were either not removed properly which led to a potential memory leak, or in case of tables they might get removed but added again when vaadin recycled a component and re-attached a previously detached one. This was causing duplicated listeners.
With linkki 1.2 the
BindingContext only holds weak references to
Bindings while there is only one hard reference from the
Component to the
Binding. This allows the GC to effectively clean up any unused Components together with their `Bindings`.
The new method
ComponentWrapper#registerBinding(Binding) creates the hard reference from a component to their
Binding. The method
BindingContext#add(Binding) has therefore been deprecated and replaced with the new signature
The new behavior also has a critical disadvantage: In tables, the binding was removed immediately with the component’s detach event. Accordingly, there was no call of a
New Widgetset Allows Flexible Date Entry
Empty Selection for Empty Combo Box
getAllowedValues() method of a dynamic
@UiComboBox returns an empty list, an empty selection is now automatically allowed on the resulting Vaadin component, even if null wouldn’t normally be allowed. Otherwise it would not be possible to clear the currently selected value when all previously available values are removed.
ExceptionPropertyDispatcher Throws IllegalStateException if Model Object Is
If the model object is null and no getter method is provided in the PMO to handle a null model object, the caller previously received an
IllegalArgumentException stating "Cannot convert presentation type class … to model type void". This message is now improved,
ExceptionPropertyDispatcher now throws an
IllegalStateException instead of returning
void when there is no model object, so that the resulting error is easier to track.
Incubator Project & Nested PMOs
The new incubator module offers access to features in development, such as nested PMOs.
APT Exception Handling for Aspect Definitions
Exceptions thrown when APT calls the
createAspect method of aspect definition no longer abort the build. Instead, an ASPECT_CREATION_FAILED warning is now emitted.
Update Vaadin to 8.10.4
linkki now uses Vaadin version 8.10.4 to include the latest bug fixes and patches.
Error markers in table cells are now kept when switching tabs
SidebarSheetshowed old content before updating it
Datepicker in tables was too wide for the cell