Release Notes
Version 2.0.1
Bugfixes
-
Fixed right-alignment of text inside tables
Version 2.0.0
New features and improvements
DialogErrorHandler now adds error parameter to URL
DialogErrorHandler
now adds an error query parameter to the URL before redirecting. See also documentation for DialogErrorHandler.
Rework of layout options in UISection
Changes |
Description |
|
Used in |
|
|
|
|
|
New |
UITextField and UITextArea will now take up all available space by default. This can be changed by setting width="" . UITextField and UITextArea then will take up the same space as all other components.
|
For more information see UISection.
Due to the rework, following refactorings have been made
Changes |
Description |
|
Has been removed and replaced by |
|
Has been removed. |
|
New concrete class. Replacement for |
|
Deprecated. Use |
|
Deprecated. Use |
Furthermore, the new LinkkiSection
is no longer a instance of VerticalLayout
. This also means that several methods that have been transitively provided by VerticalLayout
are no longer available.
Most prominently, the methods to add child components are removed as these were not intended to be a part of the public API. Instead, LinkkiSection
offers methods to retrieve the content. From there, you can add children to the content.
These changes also results in changes of the HTML structure of sections which are now furthermore linkki-section
instead of vaadin-vertical-layouts
. This must be considered when using selectors in UI tests or CSS styling.
Multi-column support moved to @UIFormSection
Support of multi-column layout with @UISection
is deprecated as it does not make sense with all layout options. Instead, @UIFormSection
now supports the same functionality. See also documentation for @UIFormSection.
New annotation properties on @UIHorizontalLayout/UIVerticalLayout
New properties padding()
and spacing()
can be configured on the annotations @UIHorizontalLayout
and @UIVerticalLayout
. For more information see JavaDoc.
New aspect annotation: @BindSuffix
A new aspect @BindSuffix
has been introduced. With the aspect, a suffix can be added to input elements to display for example units or currencies. See documentation of @BindSuffix for more information.
New aspect annotation: @BindPlaceholder
A new aspect @BindPlaceholder
has been introduced. With the aspect, a placeholder can be added to UI elements to display a text, while the UI element is empty.
If applied to a table PMO, the given placeholder text will be shown if the table has no items. To hide an empty table without showing any replacement text, you can provide an empty String
(""
) as placeholder value with PlaceholderType#STATIC
. In both cases, table header and footer will also be hidden. See @BindPlaceholder
and Using @BindPlaceholder
on table PMOs for more information.
Placeholder is not supported for sections yet. However, you could create a @UILabel with a dynamic visible binding and add the CSS class LinkkiTheme.PLACEHOLDER_LABEL
.
New aspect annotation: @BindComboBoxItemStyle and property UIComboBox#textAlign
A new aspect @BindComboBoxItemStyle
has been introduced. It can be used in conjunction with @UIComboBox
to style items in the combo box popup menu.
Also, a new property textAlign
has been added to @UIComboBox
.
Creation of dialogs using PMOs with arbitrary layout annotation
Until now, the PmoBasedDialogFactory
only supported creating a dialog for PMOs annotated with either @UISection
, @UIFormSection
or without any layout annotation. With this change, PMOs that are passed to PmoBasedDialogFactory
must be annotated with a layout annotation. PMOs without any layout annotation are no longer supported and will result in an IllegalArgumentException
. To avoid this, annotate existing PMOs with a layout annotation.
For more information refer to Dialogs.
Text alignment inside table columns
Using the new textAlign
attribute of @UITableColumn
, text alignment inside the table column can be modified. This also affects text alignment of the header, footer and components that support it.
The old way of right-aligning text using a CSS class (styleNames = LinkkiApplicationTheme.TEXT_RIGHT_ALIGNED
) should no longer be used for this purpose. The style LinkkiApplicationTheme.GRID_FOOTER_SUM
has been deprecated in favor of LinkkiApplicationTheme.GRID_FOOTER_BOLD
, which can be combined with textAlign = TextAlignment.END
to achieve the same look.
LinkkiApplicationTheme.SCROLLABLE removed
LinkkiApplicationTheme.SCROLLABLE
has been removed without any replacement. This style only worked for dialogs and is now directly set in the dialog component itself.
If the overflow behavior has to be set to auto, consider using ComponentStyles.setOverflowAuto
instead.
Label für @UILabel
Prior to this version, the label of @UILabel
could only be displayed in @UISection
when labels are displayed aside of the component. Now the label is also supported with other layout annotations such as @UIVerticalLayout
or @UISection
with layout = VERTICAL
. The label is then displayed on top of the component.
To make this feature possible, LinkkiText
now creates a web component with the tag linkki-text
. Therefore, existing stylings that are made on @UILabel
by adding style names may need to be adjusted. Similarly, selectors in UI tests related to LinkkiText
may also need to be adjusted.
As a side-effect of this change, @BindSuffix
can now be used with @UILabel
to e.g. add icons at the end of the label.
ID for ApplicationMenuItems
It is now possible to set IDs for ApplicationMenuItems
. All constructors of ApplicationMenuItemDefinition
were extended with a parameter for the ID. The old constructors have been deprecated. If they are still used the ID is derived from the name of the ApplicationMenuItem
and converted to an appropriate format with the prefix appmenu-
(see documentation).
Additionally the right menu and its items have been enriched with IDs:
|
the right menu bar |
|
the help menu within the right menu bar |
|
the info submenu within the help menu |
|
the theme variant submenu within the help menu |
Introduction of linkki theme
The theme "linkki"
must now be used for all applications. This is done by adding the annotation @Theme("linkki")
on a class that implements AppShellConfigurator
. If an existing custom theme is used, it must extend from the linkki theme. Detailed instructions are provided in the chapter "Styling".
The class org.linkki.core.defaults.style.LinkkiTheme
was moved to org.linkki.core.ui.theme.LinkkiTheme
and
contains the new theme name, variant names and relevant css class names.
New variants are also introduced along with the linkki theme. ApplicationConfig
is extended with a getDefaultVariants
method accordingly to determine which variants should be set initially. If not overriden, the compact variant is applied.
In addition, it is also possible to toggle the theme variants at runtime. To make this more convenient, a variant toggle menu item can be built into the application menu, for example in a user or setting menu.
Disabled browser autocomplete for all default fields
Since linkki was created primarily for business applications, the autocomplete feature of the browser is rather undesirable and was often disabled in the customer projects. Therefore with linkki 2.0 the autocomplete is disabled on all default fields.
Vaadin 8 modules removed
linkki 2.0.0 does not support Vaadin 8 anymore. Thus, all Vaadin 8 modules are now removed.
In addition, following deprecated classes and methods are also removed:
Removals |
Description |
Class |
Not used anymore. |
Class |
Not used anymore. |
Class |
Deprecated since Jan. 23rd 2019. |
Class |
Deprecated since 2019-02-26. Use the static |
Static inner class |
Deprecated since 1.1. Use |
Class |
Deprecated since 1.4.0 because this concept was replaced. The new concept described in Creating a custom UI element. |
Class |
Deprecated since 1.4.0 because this concept was replaced. The new concept described in Creating a custom UI element. |
Class |
Deprecated since 1.4.0 because this concept was replaced. The new concept described in Creating a custom UI element. |
Static inner class |
Deprecated since 1.1 it is replaced by |
Method |
Deprecated. Use |
Class |
Deprecated since 1.5.0 as it is not used internally anymore. |
Class |
Deprecated since 1.5.0 as it is not used internally anymore. |
Class |
Deprecated since 1.5.0 as it is not used internally anymore. |
Class |
Deprecated since 1.5.0 as it is not used internally anymore. |
Method |
Not used anymore. |
Method |
Not used anymore. |
Method |
Deprecated since August 1st, 2018. Use |
Method |
Deprecated since August 1st, 2018. Use |
Method |
Deprecated since 1.2. Use |
Method |
Deprecated since 1.1. Use |
Constant |
Deprecated since February 18th 2019. |
Method |
Deprecated since 1.1. Use |
Constant |
Deprecated since February 18th 2019. |
Constructor |
Deprecated. Use |
Constructor |
Deprecated. Use |
Constructor |
Deprecated. Use |
Constructor |
Deprecated. Use |
Constructor |
Deprecated. Use |
Method |
Deprecated. The invalid object property string was a concatenation of simple class name and property name. That was a very technical view of an invalid object property and should not be used for describing a property for the end user. If you need this representation consider to write your own utility method for this conversion. |
Method |
Deprecated since February 18th 2019. Use |
Method |
Deprecated. Use |
Method |
Deprecated. Use |
Static method |
Deprecated. Call |
Method |
Deprecated since May 6th, 2019. Call |
Method |
Deprecated since May 6th, 2019. Call |
Method |
Deprecated since May 6th, 2019. Call |
Method |
Deprecated since May 6th, 2019. Call |
Method |
Deprecated since June 7th, 2019. Use |
Method |
Deprecated since June 7th, 2019. Use |
Method |
Deprecated since January 2019. Instead of overwriting this method, provide a |
Bugfixes
-
Fixed default behaviour for
@UIDateField
: The calendar overlay is not opened by default. If@UIDateField
is focused and a date is entered, pressing tab results in focusing the next component. -
@UIDateField now shows German labels and Monday as the first weekday when the UI locale is German.
-
Until now, converters were only found in the
LinkkiConverterRegistry
for the exact matching class. This led e.g. in the case ofDecimal
to the fact that the subclassDecimalNull
was not formatted correctly.LinkkiConverterRegistry
now picks the most specificConverter
. IfFormattedDecimalFieldToStringConverter()
is added toLinkkiConverterRegistry
, it avoids printing DecimalNull on a@UILabel
when theDecimal
value is empty. -
The
OkCancelDialog
OK and Cancel handlers are now triggered only once for a user action. It was possible to trigger them both or twice by pressing the Enter key when the OK or Cancel button was focused. -
ComponentStyles.setFormItemLabelWidth()
can now add a label width to UI elements. -
The
Services
class is now thread safe by usingConcurrentHashMap
instead ofHashMap
. -
TreeGrid
now updates its child nodes correctly and collapses if no children are available.