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
Table 1. Changes section layouts

Changes

Description

SectionLayout.COLUMN

Used in UISection. Deprecated. Use SectionLayout.FORM instead.

SectionLayout.FORM

SectionLayout that displays section elements stacked in a column. Labels are displayed on the left of the components.

SectionLayout.HORIONTAL

SectionLayout that displays section elements next to each other in a row. Labels are displayed on top of the components.

SectionLayout.VERTICAL

New SectionLayout that displays section elements stacked in a column. Labels are displayed on top of the component.

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

Table 2. Overview API changes in AbstractSection

Changes

Description

AbstractSection

Has been removed and replaced by LinkkiSection.

HorizontalSection

Has been removed. BaseSection is directly used instead.

LinkkiSection

New concrete class. Replacement for AbstractSection. Corresponding code has been moved.

BaseSection.getSectionContent()

Deprecated. Use BaseSection.getContentWrapper() instead.

GridSection.getSectionContent()

Deprecated. Use getGrid() instead.

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:

appmenu-right

the right menu bar

appmenu-help

the help menu within the right menu bar

appmenu-info

the info submenu within the help menu

appmenu-theme

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:

Table 3. Overview

Removals

Description

Class org.linkki.core.defaults.columnbased.ColumnBasedComponentCreator

Not used anymore.

Class org.linkki.core.defaults.columnbased.ColumnBasedComponentFactory

Not used anymore.

Class org.linkki.core.binding.dispatcher.reflection.PropertyNamingConvention

Deprecated since Jan. 23rd 2019.

Class org.linkki.util.DateFormatRegistry

Deprecated since 2019-02-26. Use the static org.linkki.util.DateFormats instead.

Static inner class org.linkki.core.defaults.ui.element.ItemCaptionProvider.IdAndNameCaptionProvider

Deprecated since 1.1. Use org.linkki.ips.ui.element.IdAndNameCaptionProvider instead.

Class org.linkki.core.uicreation.BindingDefinitionComponentDefinition

Deprecated since 1.4.0 because this concept was replaced. The new concept described in Creating a custom UI element.

Class org.linkki.core.binding.descriptor.bindingdefinition.annotation.LinkkiBindingDefinition

Deprecated since 1.4.0 because this concept was replaced. The new concept described in Creating a custom UI element.

Class org.linkki.core.binding.descriptor.bindingdefinition.BindingDefinition

Deprecated since 1.4.0 because this concept was replaced. The new concept described in Creating a custom UI element.

Static inner class org.linkki.core.binding.descriptor.UIElementAnnotationReader.ModelObjectAnnotationException

Deprecated since 1.1 it is replaced by org.linkki.core.binding.descriptor.modelobject.ModelObjects.ModelObjectAnnotationException.

Method org.linkki.core.binding.descriptor.UIElementAnnotationReader.hasModelObjectAnnotation(Object, String)

Deprecated. Use org.linkki.core.binding.descriptor.modelobject.ModelObjects.isAccessible(Object, String) instead .

Class org.linkki.core.defaults.formatters.TemporalAccessorFormatter<T>

Deprecated since 1.5.0 as it is not used internally anymore.

Class org.linkki.core.defaults.formatters.LocalDateTimeFormatter

Deprecated since 1.5.0 as it is not used internally anymore.

Class org.linkki.core.defaults.formatters.LocalDateFormatter

Deprecated since 1.5.0 as it is not used internally anymore.

Class org.linkki.core.defaults.formatters.Formatter<T>

Deprecated since 1.5.0 as it is not used internally anymore.

Method org.linkki.core.uicreation.PositionAnnotationReader.getDeprecatedPosition(AnnotatedElement)

Not used anymore.

Method org.linkki.core.uicreation.PositionAnnotationReader.getDeprecatedPosition(Annotation)

Not used anymore.

Method org.linkki.core.binding.BindingContext.updateUI()

Deprecated since August 1st, 2018. Use org.linkki.core.binding.BindingContex.modelChanged() or org.linkki.core.binding.BindingContex.uiUpdated() instead.

Method org.linkki.core.binding.BindingContext.updateMessages(MessageList)

Deprecated since August 1st, 2018. Use org.linkki.core.binding.BindingContex.displayMessages(MessageList) instead.

Method org.linkki.core.binding.BindingContext.add(Binding)

Deprecated since 1.2. Use org.linkki.core.binding.BindingContext.add(Binding, ComponentWrapper) instead.

Method org.linkki.core.binding.descriptor.UIElementAnnotationReader.getModelObjectSupplier(Object, String)

Deprecated since 1.1. Use org.linkki.core.binding.descriptor.modelobject.ModelObjects.supplierFor(Object, String) instead.

Constant org.linkki.core.defaults.style.LinkkiTheme.SPACING_HORIZONTAL_SECTION

Deprecated since February 18th 2019.

Method org.linkki.core.binding.descriptor.UIElementAnnotationReader.getModelObjectSupplier(Object, String)

Deprecated since 1.1. Use org.linkki.core.binding.descriptor.modelobject.ModelObjects.supplierFor(Object, String) instead.

Constant org.linkki.core.defaults.style.LinkkiTheme.SPACING_HORIZONTAL_SECTION

Deprecated since February 18th 2019.

Constructor org.linkki.framework.ui.dialogs.OkCancelDialog.OkCancelDialog(String)

Deprecated. Use org.linkki.framework.ui.dialogs.OkCancelDialog.Builder instead.

Constructor org.linkki.framework.ui.dialogs.OkCancelDialog.OkCancelDialog(String, Handler)

Deprecated. Use org.linkki.framework.ui.dialogs.OkCancelDialog.Builder instead.

Constructor org.linkki.framework.ui.dialogs.OkCancelDialog.OkCancelDialog(String, Handler, ButtonOption)

Deprecated. Use org.linkki.framework.ui.dialogs.OkCancelDialog.Builder instead.

Constructor org.linkki.framework.ui.dialogs.OkCancelDialog.OkCancelDialog(String, Component, Handler, ButtonOption)

Deprecated. Use org.linkki.framework.ui.dialogs.OkCancelDialog.Builder instead.

Constructor org.linkki.framework.ui.dialogs.ConfirmationDialog.ConfirmationDialog(String, Component, Handler)

Deprecated. Use org.linkki.framework.ui.dialogs.ConfirmationDialog.ConfirmationDialog(String, Handler, Component…​) instead.

Method org.linkki.framework.ui.component.MessageUiComponents.getInvalidObjectPropertiesAsString(Message)

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 org.linkki.core.uicreation.UiCreator.createComponent(Object, BindingContext, Function<Class<?>, Optional<LinkkiComponentDefinition>>, Function<Class<?>, Optional<LinkkiLayoutDefinition>>)

Deprecated since February 18th 2019. Use org.linkki.core.uicreation.UiCreator.createComponent(Object, BindingContext, LinkkiComponentDefinition, Optional<LinkkiLayoutDefinition>) instead.

Method org.linkki.framework.ui.dialogs.PmoBasedDialogFactory.newOkCancelDialog(String, Object, Handler)

Deprecated. Use org.linkki.framework.ui.dialogs.PmoBasedDialogFactory.newOkCancelDialog(String, Handler, Object…​) instead.

Method org.linkki.framework.ui.dialogs.PmoBasedDialogFactory.openOkCancelDialog(String, Object, Handler)

Deprecated. Use org.linkki.framework.ui.dialogs.PmoBasedDialogFactory.openOkCancelDialog(String, Handler, Handler, Object…​) instead.

Static method org.linkki.framework.ui.dialogs.PmoBasedDialogFactory.open(OkCancelDialog)

Deprecated. Call org.linkki.framework.ui.dialogs.OkCancelDialog.open() instead.

Method org.linkki.core.binding.manager.BindingManager.getExistingContext(Class<?>)

Deprecated since May 6th, 2019. Call org.linkki.core.binding.manager.BindingManager.getContext(Class<?>) instead.

Method org.linkki.core.binding.manager.BindingManager.getExistingContextOrStartNewOne(Class<?>)

Deprecated since May 6th, 2019. Call org.linkki.core.binding.manager.BindingManager.getContext(Class<?>) instead.

Method org.linkki.core.binding.manager.BindingManager.getExistingContext(String)

Deprecated since May 6th, 2019. Call org.linkki.core.binding.manager.BindingManager.getContext(String) instead.

Method org.linkki.core.binding.manager.BindingManager.getExistingContextOrStartNewOne(String)

Deprecated since May 6th, 2019. Call org.linkki.core.binding.manager.BindingManager.getContext(String) instead.

Method org.linkki.core.binding.manager.BindingManager.startNewContext(Class<?>)

Deprecated since June 7th, 2019. Use org.linkki.core.binding.manager.BindingManager.getContext(Class<?>) instead.

Method org.linkki.core.binding.manager.BindingManager.startNewContext(String)

Deprecated since June 7th, 2019. Use org.linkki.core.binding.manager.BindingManager.getContext(String) instead.

Method org.linkki.core.binding.BindingContext.createDispatcherChain(Object, BindingDescriptor)

Deprecated since January 2019. Instead of overwriting this method, provide a PropertyDispatcherFactory to BindingContext(String, PropertyBehaviorProvider, PropertyDispatcherFactory, Handler).

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 of Decimal to the fact that the subclass DecimalNull was not formatted correctly. LinkkiConverterRegistry now picks the most specific Converter. If FormattedDecimalFieldToStringConverter() is added to LinkkiConverterRegistry, it avoids printing DecimalNull on a @UILabel when the Decimal 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 using ConcurrentHashMap instead of HashMap.

  • TreeGrid now updates its child nodes correctly and collapses if no children are available.