@WebServlet(asyncSupported = true, urlPatterns = "/sample/*")
public class SampleServlet extends VaadinServlet {
}
Release Notes
Version 2.1.3
Bugfixes
-
Fix warning and info notifications not being closeable when the respective duration is set to 0 or below. The notifications will now have a close button, like error notifications.
-
Fields for which Vaadin does not support validation (components not implementing
HasValidation
, e.g. buttons) now have the HTML attributesinvalid
andseverity
set by linkki to allow custom styling via CSS. The message text is not displayed.
Version 2.1.2
Bugfixes
-
Fix icon size for
LinkkiText
andLinkkiAnchor
Version 2.1.1
Bugfixes
-
IpsPropertyDispatcher
now handles empty value sets correctly -
Fix disabled state of checkboxes
-
LinkkiTabLayout
no longer initializes content of tabs when removing them -
BindingContext#modelChanged
was called when creating a table. This accidentally triggered amodelChangeHandler
when setting up the UI. -
Fix
@UILink
and@UILabel
with icons in combination with custom style names added by@BindStyleNames
. Style classlinkki-has-icon
is not used anymore and will be removed in a later version.
Version 2.1.0
New features and improvements
Update to Vaadin 23.1
Vaadin has been updated to include the latest bugfixes and features. This requires the following change:
In JEE applications, servlets that use a URL pattern different from /*
must also include /VAADIN/*
.
@WebServlet(asyncSupported = true, urlPatterns = { "/sample/*", "/VAADIN/*" })
public class SampleServlet extends VaadinServlet {
}
IpsPropertyDispatcher
uses available values defined in Faktor-IPS model
It is now possible to automatically limit the available values of fields such as @UIComboBox
or @UIRadioButtons
to the available values defined in the Faktor-IPS model.
The behaviour of the IpsPropertyDispatcher
has been changed for AvailableValuesType#ENUM_VALUES_INCL_NULL
and AvailableValuesType#ENUM_VALUES_EXCL_NULL
. Note that one of these values is usually the default.
Without IpsPropertyDispatcher | Old behavior of IpsPropertyDispatcher | New behavior of IpsPropertyDispatcher | |
---|---|---|---|
ENUM_VALUES_INCL_NULL, ENUM_VALUES_EXCL_NULL |
Only supported for enums and Boolean, all defined values are used |
Same as without IpsPropertyDispatcher |
|
DYNAMIC |
Uses values returned by the corresponding PMO method |
Same as without IpsPropertyDispatcher |
Same as without IpsPropertyDispatcher |
NO_VALUES |
No values |
Same as without IpsPropertyDispatcher |
Same as without IpsPropertyDispatcher |
Enhanced update handling in BindingContext
Update handling in BindingContext
has been improved: now it is possible to add an afterModelChangedHandler
that is applied when changes are written to the model on BindingContext#modelChanged()
before any UI update has been triggered.
In addition, a new method BindingContext#updateUi()
has been introduced to trigger update events that are not related to model changes.
If BindingContext#modelChanged() is called manually, check if this is still correct thus it is only needed when changes have been written to the model
(e.g. after submitting a change in a dialog). Else if only the UI should be updated, call BindingContext#updateUi() instead. In this case, afterModelChangedHandler will not be called.
|
For further information see BindingContext
or Using BindingContext
update handler.
Add BindingContextBuilder
A BindingContextBuilder
has been added to create a `BindingContext
`.
Thus, the following constructors have been deprecated:
-
public BindingContext(String, PropertyBehaviorProvider, Handler)
-
public BindingContext(String, PropertyBehaviorProvider, PropertyDispatcherFactory, Handler)
Additionally, a new constructor has been introduced for subclassing:
protected BindingContext(String, PropertyBehaviorProvider, PropertyDispatcherFactory, Handler, Handler)
Additional Behavior in BindReadOnlyBehavior
displays buttons only in read-only mode
The @BindReadOnlyBehavior
annotation has been extended by the option INVISIBLE_IF WRITABLE
.
With this option, it is now possible to show buttons only in read-only mode.
For more information see chapter @BindReadOnlyBehavior
.
Collapsible columns
With Vaadin 8, the property collapsible
in the annotation @UITableColumn
could be used to create a menu with which the user can toggle the visibility of a column. This menu was only visible on hover, and appeared on the right top corner of the table.
As the reimplemented table in Vaadin Flow dropped support for the feature, the support of the collapsible
property of @UITableColumn
was also reduced. In the previous version, only the option INITIALLY_COLLAPSED
had an effect. Any column with this option was simply not visible at all.
With this version, the feature of collapsible columns is supported again in linkki, however only for tables created inside of a section using @UISection
. The new column selection menu is now always visible, greatly improving the usability of this feature.
Sortable columns
Table columns created using @UITableColumn
can now be made sortable using the property sortable
. The type of the column value must implement Comparable
, which defines the order in which the values are sorted.
Note that model bindings cannot be used with sortable columns, a getter method must be used instead.
For more information, see "@UITableColumn".
UIDateTimeField
A new annotation, @UIDateTimeField
, has been added for selecting both a date and a time. @UIDateTimeField
has all the properties of UIDateField
and the property step
for setting the time interval in the time picker overlay.
For more information, see "@UIDateTimeField".
Dynamic item captions in combo boxes
Sometimes, the caption of an item in a combo box can change even if the item itself remains the same. To support this, a combo box used to not only update on item changes, but also checks the captions and update the items if any caption has changed. This additional check makes combo box less responsive to user interaction, especially if the combo box has many available values.
Considering the fact that the above mentioned feature is only required in relative rare cases, we decided to drop this feature for @UIComboBox by default. Combo boxes that require this feature can use the new annotation BindComboBoxDynamicItemCaption . This annotation would update all items including their captions upon changes.
|
Java version compatibility changes
linkki 2.1.0 is compatible with Java 17 and 11, but support for Java 8 has been dropped. Please upgrade if necessary.
Bugfixes
-
Reselecting a table row should not unselect the row
-
Empty
UILabel
columns with a small width no longer display dots (…) in Mozilla Firefox -
UILink
do not show label above the link -
Removing values from a
UIComboBox
that does not allow null should not be possible. -
UIIntegerField
now allows the thousand separator character (e.g. comma when locale is English) to be entered. -
Disabled validation on read-only fields: Read only fields will no longer be marked with validation messages.
-
Column visibility can be set using
GridSection#setColumnVisible(String columnKey, boolean visible)
even afterGridSection
has already been created. This will also update the checked state of the correspondingMenuItem
correctly. Note, that setting the visibility byGrid#getColumnByKey()
still works, but this will not update the checked state of itsMenuItem
! -
@UIYesNoComboBox no longer throws an exception when using Boolean, values can now be properly selected and cleared (corresponds to
null
)