summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--WebContent/VAADIN/themes/valo/components/_valo-menu.scss2
-rw-r--r--WebContent/release-notes.html54
-rw-r--r--buildhelpers/src/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java2
-rw-r--r--client-compiler/build.xml15
-rw-r--r--client-compiler/ivy.xml7
-rw-r--r--client-compiler/src/com/vaadin/tools/CvalChecker.java13
-rw-r--r--client-compiler/tests/src/com/vaadin/tools/CvalCheckerTest.java27
-rw-r--r--client/src/com/vaadin/client/ApplicationConfiguration.java4
-rw-r--r--client/src/com/vaadin/client/ApplicationConnection.java1
-rw-r--r--client/src/com/vaadin/client/Util.java2
-rw-r--r--client/src/com/vaadin/client/VCaption.java81
-rw-r--r--client/src/com/vaadin/client/communication/AtmospherePushConnection.java5
-rw-r--r--client/src/com/vaadin/client/componentlocator/ComponentLocator.java2
-rw-r--r--client/src/com/vaadin/client/ui/VMenuBar.java1
-rw-r--r--client/src/com/vaadin/client/ui/VOverlay.java1
-rw-r--r--client/src/com/vaadin/client/ui/VTabsheet.java4
-rw-r--r--client/src/com/vaadin/client/ui/VWindow.java9
-rw-r--r--client/src/com/vaadin/client/ui/button/ButtonConnector.java10
-rw-r--r--client/src/com/vaadin/client/ui/checkbox/CheckBoxConnector.java4
-rw-r--r--client/src/com/vaadin/client/ui/colorpicker/ColorPickerAreaConnector.java7
-rw-r--r--client/src/com/vaadin/client/ui/colorpicker/ColorPickerConnector.java2
-rw-r--r--client/src/com/vaadin/client/ui/form/FormConnector.java3
-rw-r--r--client/src/com/vaadin/client/ui/gridlayout/GridLayoutConnector.java1
-rw-r--r--client/src/com/vaadin/client/ui/link/LinkConnector.java3
-rw-r--r--client/src/com/vaadin/client/ui/nativebutton/NativeButtonConnector.java7
-rw-r--r--client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java2
-rw-r--r--client/src/com/vaadin/client/ui/orderedlayout/Slot.java36
-rw-r--r--client/src/com/vaadin/client/ui/textfield/TextFieldConnector.java15
-rw-r--r--common.xml4
-rw-r--r--push/build.xml2
-rw-r--r--push/ivy.xml4
-rw-r--r--server/ivy.xml2
-rw-r--r--server/src/com/vaadin/annotations/DesignRoot.java41
-rw-r--r--server/src/com/vaadin/annotations/Viewport.java47
-rw-r--r--server/src/com/vaadin/annotations/ViewportGeneratorClass.java54
-rw-r--r--server/src/com/vaadin/data/fieldgroup/DefaultFieldGroupFieldFactory.java7
-rw-r--r--server/src/com/vaadin/data/fieldgroup/FieldGroup.java2
-rw-r--r--server/src/com/vaadin/data/util/AbstractInMemoryContainer.java10
-rw-r--r--server/src/com/vaadin/data/util/BeanItem.java2
-rw-r--r--server/src/com/vaadin/data/util/BeanUtil.java2
-rw-r--r--server/src/com/vaadin/data/util/converter/StringToBigIntegerConverter.java2
-rw-r--r--server/src/com/vaadin/data/util/converter/StringToByteConverter.java2
-rw-r--r--server/src/com/vaadin/data/util/converter/StringToEnumConverter.java2
-rw-r--r--server/src/com/vaadin/data/util/converter/StringToShortConverter.java2
-rw-r--r--server/src/com/vaadin/data/validator/BigDecimalRangeValidator.java2
-rw-r--r--server/src/com/vaadin/data/validator/BigIntegerRangeValidator.java2
-rw-r--r--server/src/com/vaadin/data/validator/ByteRangeValidator.java2
-rw-r--r--server/src/com/vaadin/data/validator/FloatRangeValidator.java2
-rw-r--r--server/src/com/vaadin/data/validator/LongRangeValidator.java2
-rw-r--r--server/src/com/vaadin/data/validator/ShortRangeValidator.java2
-rw-r--r--server/src/com/vaadin/server/AbstractDeploymentConfiguration.java2
-rw-r--r--server/src/com/vaadin/server/AbstractExtension.java2
-rw-r--r--server/src/com/vaadin/server/AbstractJavaScriptExtension.java2
-rw-r--r--server/src/com/vaadin/server/BootstrapHandler.java54
-rw-r--r--server/src/com/vaadin/server/BrowserWindowOpener.java8
-rw-r--r--server/src/com/vaadin/server/Constants.java2
-rw-r--r--server/src/com/vaadin/server/DeploymentConfiguration.java10
-rw-r--r--server/src/com/vaadin/server/SizeWithUnit.java127
-rw-r--r--server/src/com/vaadin/server/VaadinPortletResponse.java5
-rw-r--r--server/src/com/vaadin/server/VaadinServiceClassLoaderUtil.java2
-rw-r--r--server/src/com/vaadin/server/ViewportGenerator.java38
-rw-r--r--server/src/com/vaadin/server/communication/PushRequestHandler.java83
-rw-r--r--server/src/com/vaadin/ui/AbsoluteLayout.java107
-rw-r--r--server/src/com/vaadin/ui/AbstractColorPicker.java8
-rw-r--r--server/src/com/vaadin/ui/AbstractComponent.java471
-rw-r--r--server/src/com/vaadin/ui/AbstractField.java57
-rw-r--r--server/src/com/vaadin/ui/AbstractOrderedLayout.java125
-rw-r--r--server/src/com/vaadin/ui/AbstractSelect.java2
-rw-r--r--server/src/com/vaadin/ui/AbstractSingleComponentContainer.java52
-rw-r--r--server/src/com/vaadin/ui/AbstractSplitPanel.java130
-rw-r--r--server/src/com/vaadin/ui/AbstractTextField.java53
-rw-r--r--server/src/com/vaadin/ui/Button.java90
-rw-r--r--server/src/com/vaadin/ui/Calendar.java2
-rw-r--r--server/src/com/vaadin/ui/CheckBox.java61
-rw-r--r--server/src/com/vaadin/ui/Component.java41
-rw-r--r--server/src/com/vaadin/ui/CssLayout.java42
-rw-r--r--server/src/com/vaadin/ui/Field.java4
-rw-r--r--server/src/com/vaadin/ui/Label.java57
-rw-r--r--server/src/com/vaadin/ui/Panel.java22
-rw-r--r--server/src/com/vaadin/ui/PasswordField.java37
-rw-r--r--server/src/com/vaadin/ui/TabSheet.java177
-rw-r--r--server/src/com/vaadin/ui/TextArea.java26
-rw-r--r--server/src/com/vaadin/ui/TextField.java37
-rw-r--r--server/src/com/vaadin/ui/declarative/Design.java481
-rw-r--r--server/src/com/vaadin/ui/declarative/DesignAttributeHandler.java715
-rw-r--r--server/src/com/vaadin/ui/declarative/DesignContext.java719
-rw-r--r--server/src/com/vaadin/ui/declarative/DesignException.java39
-rw-r--r--server/src/com/vaadin/ui/declarative/FieldBinder.java265
-rw-r--r--server/src/com/vaadin/ui/declarative/FieldBindingException.java34
-rw-r--r--server/src/com/vaadin/ui/themes/ValoTheme.java25
-rw-r--r--server/src/com/vaadin/util/ReflectTools.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/DesignReadInConstructor.html5
-rw-r--r--server/tests/src/com/vaadin/tests/design/DesignReadInConstructor.java31
-rw-r--r--server/tests/src/com/vaadin/tests/design/DesignReadInConstructorTest.java77
-rw-r--r--server/tests/src/com/vaadin/tests/design/DesignTest.java135
-rw-r--r--server/tests/src/com/vaadin/tests/design/InvalidLayoutTemplate.java58
-rw-r--r--server/tests/src/com/vaadin/tests/design/LayoutTemplate.java52
-rw-r--r--server/tests/src/com/vaadin/tests/design/ParseAllSupportedComponentsTest.java47
-rw-r--r--server/tests/src/com/vaadin/tests/design/ParseLayoutTest.java223
-rw-r--r--server/tests/src/com/vaadin/tests/design/TestLocale.java176
-rw-r--r--server/tests/src/com/vaadin/tests/design/all-components.html110
-rw-r--r--server/tests/src/com/vaadin/tests/design/designroot/DesignRootTest.java54
-rw-r--r--server/tests/src/com/vaadin/tests/design/designroot/DesignWithAnnotation.java37
-rw-r--r--server/tests/src/com/vaadin/tests/design/designroot/DesignWithEmptyAnnotation.html5
-rw-r--r--server/tests/src/com/vaadin/tests/design/designroot/DesignWithEmptyAnnotation.java37
-rw-r--r--server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithAnnotation.java31
-rw-r--r--server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotation.java50
-rw-r--r--server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotationUI.java32
-rw-r--r--server/tests/src/com/vaadin/tests/design/duplicate-ids.html4
-rw-r--r--server/tests/src/com/vaadin/tests/design/duplicate-local-ids.html4
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/MyChildDesign.java40
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/MyChildDesignCustomComponent.java25
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/MyDesignRoot.java38
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/MyExtendedChildDesign.java25
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/TestNestedCustomLayouts.java80
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/TestReadNestedTemplates.java62
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/TestWriteNestedTemplates.java89
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomAbsoluteLayout.java31
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomAccordion.java31
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomCssLayout.java31
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomFormLayout.java31
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomGridLayout.java31
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalLayout.java31
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalSplitPanel.java31
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomPanel.java31
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomTabSheet.java31
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomVerticalLayout.java31
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomVerticalSplitPanel.java31
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/mychilddesign.html12
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/mydesignroot.html10
-rw-r--r--server/tests/src/com/vaadin/tests/design/testFile.html19
-rw-r--r--server/tests/src/com/vaadin/tests/design/verticallayout-one-child.html3
-rw-r--r--server/tests/src/com/vaadin/tests/design/verticallayout-two-children.html4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestReadDesign.java110
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestWriteDesign.java100
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestReadDesign.java256
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestWriteDesign.java281
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractfield/TestReadDesign.java71
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractfield/TestWriteDesign.java77
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestReadDesign.java119
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestWriteDesign.java148
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/TestReadDesign.java158
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/TestWriteDesign.java151
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstracttextfield/TestReadDesign.java73
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstracttextfield/TestWriteDesign.java73
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/button/TestReadDesign.java129
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/button/TestWriteDesign.java103
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/checkbox/TestReadDesign.java67
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/checkbox/TestWriteDesign.java57
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/csslayout/TestReadDesign.java74
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/csslayout/TestWriteDesign.java78
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/label/TestReadDesign.java102
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/label/TestWriteDesign.java126
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/panel/TestReadDesign.java98
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/panel/TestWriteDesign.java71
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/tabsheet/TestReadDesign.java132
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/tabsheet/TestWriteDesign.java109
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/textarea/TestReadDesign.java59
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/textarea/TestWriteDesign.java60
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/textfield/TestReadDesign.java59
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/textfield/TestWriteDesign.java59
-rw-r--r--server/tests/src/com/vaadin/ui/CheckBoxTest.java48
-rw-r--r--shared/src/com/vaadin/shared/AbstractComponentState.java1
-rw-r--r--shared/src/com/vaadin/shared/ui/button/ButtonState.java4
-rw-r--r--shared/src/com/vaadin/shared/ui/colorpicker/ColorPickerState.java1
-rw-r--r--uitest/integration_tests.xml29
-rw-r--r--uitest/src/com/vaadin/tests/components/checkbox/CheckBoxNullValue.html77
-rw-r--r--uitest/src/com/vaadin/tests/components/checkbox/CheckBoxNullValueTest.java64
-rw-r--r--uitest/src/com/vaadin/tests/components/textfield/AlternatingTextFields.java106
-rw-r--r--uitest/src/com/vaadin/tests/components/textfield/AlternatingTextFieldsTest.java212
-rw-r--r--uitest/src/com/vaadin/tests/components/ui/DynamicViewport.java43
-rw-r--r--uitest/src/com/vaadin/tests/components/ui/DynamicViewportEmptyTest.java52
-rw-r--r--uitest/src/com/vaadin/tests/components/ui/DynamicViewportTest.java37
-rw-r--r--uitest/src/com/vaadin/tests/components/ui/InvalidViewport.java36
-rw-r--r--uitest/src/com/vaadin/tests/components/ui/InvalidViewportTest.java36
-rw-r--r--uitest/src/com/vaadin/tests/components/ui/StaticViewport.java31
-rw-r--r--uitest/src/com/vaadin/tests/components/ui/StaticViewportTest.java37
-rw-r--r--uitest/src/com/vaadin/tests/components/ui/UnnecessaryPaddingInResponsiveUI.java79
-rw-r--r--uitest/src/com/vaadin/tests/components/ui/UnnecessaryPaddingInResponsiveUITest.java47
-rw-r--r--uitest/src/com/vaadin/tests/declarative/DeclarativeEditor.java133
-rw-r--r--uitest/src/com/vaadin/tests/declarative/DeclarativeEditorInitial.html23
-rw-r--r--uitest/src/com/vaadin/tests/declarative/Potus.java107
-rw-r--r--uitest/src/com/vaadin/tests/declarative/PotusCrud.html14
-rw-r--r--uitest/src/com/vaadin/tests/declarative/PotusCrud.java124
-rw-r--r--uitest/src/com/vaadin/tests/declarative/PotusCrudUI.java34
-rw-r--r--uitest/src/com/vaadin/tests/declarative/PotusForm.html16
-rw-r--r--uitest/src/com/vaadin/tests/declarative/PotusForm.java51
-rw-r--r--uitest/src/com/vaadin/tests/layouts/CaptionsInLayouts.java9
-rw-r--r--uitest/src/com/vaadin/tests/layouts/HtmlInCaption.java159
-rw-r--r--uitest/src/com/vaadin/tests/push/TrackMessageSizeUI.java3
-rw-r--r--uitest/tb2/com/vaadin/tests/VerifyBrowserVersion.html (renamed from uitest/src/com/vaadin/tests/VerifyBrowserVersion.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/application/DeploymentConfigurationTest.html (renamed from uitest/src/com/vaadin/tests/application/DeploymentConfigurationTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/application/DetachOldUIOnReload.html (renamed from uitest/src/com/vaadin/tests/application/DetachOldUIOnReload.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/application/ErrorInUnloadEvent.html (renamed from uitest/src/com/vaadin/tests/application/ErrorInUnloadEvent.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/application/RefreshFragmentChange.html (renamed from uitest/src/com/vaadin/tests/application/RefreshFragmentChange.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/application/RefreshStatePreserve.html (renamed from uitest/src/com/vaadin/tests/application/RefreshStatePreserve.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/application/RefreshStatePreserveTitle.html (renamed from uitest/src/com/vaadin/tests/application/RefreshStatePreserveTitle.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/application/TerminalErrorNotification.html (renamed from uitest/src/com/vaadin/tests/application/TerminalErrorNotification.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/application/ThreadLocalInstances.html (renamed from uitest/src/com/vaadin/tests/application/ThreadLocalInstances.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/application/VaadinSessionAttribute.html (renamed from uitest/src/com/vaadin/tests/application/VaadinSessionAttribute.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/application/WebBrowserSizeTest.html (renamed from uitest/src/com/vaadin/tests/application/WebBrowserSizeTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/application/WebBrowserTest.html (renamed from uitest/src/com/vaadin/tests/application/WebBrowserTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/applicationcontext/ChangeSessionId.html (renamed from uitest/src/com/vaadin/tests/applicationcontext/ChangeSessionId.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/applicationcontext/CloseSession.html (renamed from uitest/src/com/vaadin/tests/applicationcontext/CloseSession.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/applicationcontext/RpcForClosedUI.html (renamed from uitest/src/com/vaadin/tests/applicationcontext/RpcForClosedUI.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/applicationservlet/MultipleServletConfiguration.html (renamed from uitest/src/com/vaadin/tests/applicationservlet/MultipleServletConfiguration.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/applicationservlet/SystemMessagesTest.html (renamed from uitest/src/com/vaadin/tests/applicationservlet/SystemMessagesTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/browserfeatures/FullHeightScrollbar.html (renamed from uitest/src/com/vaadin/tests/browserfeatures/FullHeightScrollbar.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/browserfeatures/WebkitScrollbarTest.html (renamed from uitest/src/com/vaadin/tests/browserfeatures/WebkitScrollbarTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/componentlocator/TestDetachedNotPresent.html (renamed from uitest/src/com/vaadin/tests/componentlocator/TestDetachedNotPresent.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/AddRemoveSetStyleNamesTest.html (renamed from uitest/src/com/vaadin/tests/components/AddRemoveSetStyleNamesTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/AddressFormExample.html (renamed from uitest/src/com/vaadin/tests/components/AddressFormExample.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/DisableEnableCascade.html (renamed from uitest/src/com/vaadin/tests/components/DisableEnableCascade.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/DisableEnableCascadeStyles.html (renamed from uitest/src/com/vaadin/tests/components/DisableEnableCascadeStyles.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/ErrorMessages.html (renamed from uitest/src/com/vaadin/tests/components/ErrorMessages.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/FileDownloaderTest.html (renamed from uitest/src/com/vaadin/tests/components/FileDownloaderTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/HierarchyChangeForRemovedComponentContainers.html (renamed from uitest/src/com/vaadin/tests/components/HierarchyChangeForRemovedComponentContainers.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/LayoutAttachListenerInfo.html (renamed from uitest/src/com/vaadin/tests/components/LayoutAttachListenerInfo.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/OutOfSyncTest.html (renamed from uitest/src/com/vaadin/tests/components/OutOfSyncTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/TooltipsOnScrollingWindow.html (renamed from uitest/src/com/vaadin/tests/components/TooltipsOnScrollingWindow.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutClipping.html (renamed from uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutClipping.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutCorrectPositioningOfHiddenField.html (renamed from uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutCorrectPositioningOfHiddenField.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutPrimaryStylename.html (renamed from uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutPrimaryStylename.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutResizing.html (renamed from uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutResizing.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutWrapperStyles.html (renamed from uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutWrapperStyles.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/absolutelayout/MoveComponentFromAbsoluteLayoutToInnerLayout.html (renamed from uitest/src/com/vaadin/tests/components/absolutelayout/MoveComponentFromAbsoluteLayoutToInnerLayout.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/abstractcomponent/EnableState.html (renamed from uitest/src/com/vaadin/tests/components/abstractcomponent/EnableState.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/abstractcomponent/RemSizeUnitTest.html (renamed from uitest/src/com/vaadin/tests/components/abstractcomponent/RemSizeUnitTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/abstractcomponent/TooltipTests.html (renamed from uitest/src/com/vaadin/tests/components/abstractcomponent/TooltipTests.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/abstractcomponent/UseStateFromHierarchy.html (renamed from uitest/src/com/vaadin/tests/components/abstractcomponent/UseStateFromHierarchy.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/abstractembedded/EmbeddedWithNullSource.html (renamed from uitest/src/com/vaadin/tests/components/abstractembedded/EmbeddedWithNullSource.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/abstractfield/AbstractFieldCommitWithInvalidValues.html (renamed from uitest/src/com/vaadin/tests/components/abstractfield/AbstractFieldCommitWithInvalidValues.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/abstractfield/AbstractFieldDataSourceReadOnly.html (renamed from uitest/src/com/vaadin/tests/components/abstractfield/AbstractFieldDataSourceReadOnly.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/abstractfield/RequiredIndicatorForFieldsWithoutCaption.html (renamed from uitest/src/com/vaadin/tests/components/abstractfield/RequiredIndicatorForFieldsWithoutCaption.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/accordion/AccordionInactiveTabSize.html (renamed from uitest/src/com/vaadin/tests/components/accordion/AccordionInactiveTabSize.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/accordion/AccordionPrimaryStylenames.html (renamed from uitest/src/com/vaadin/tests/components/accordion/AccordionPrimaryStylenames.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/accordion/AccordionTabStylenames.html (renamed from uitest/src/com/vaadin/tests/components/accordion/AccordionTabStylenames.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/accordion/AccordionTheme.html (renamed from uitest/src/com/vaadin/tests/components/accordion/AccordionTheme.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/accordion/RemoveTabs.html (renamed from uitest/src/com/vaadin/tests/components/accordion/RemoveTabs.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/beanitemcontainer/BeanItemContainerNullValues.html (renamed from uitest/src/com/vaadin/tests/components/beanitemcontainer/BeanItemContainerNullValues.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/beanitemcontainer/TestBeanItemContainerUsage.html (renamed from uitest/src/com/vaadin/tests/components/beanitemcontainer/TestBeanItemContainerUsage.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/browserframe/BrowserFrameIsVisible.html (renamed from uitest/src/com/vaadin/tests/components/browserframe/BrowserFrameIsVisible.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/button/ButtonDisableEnableOnClick.html (renamed from uitest/src/com/vaadin/tests/components/button/ButtonDisableEnableOnClick.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/button/ButtonDisableOnClick.html (renamed from uitest/src/com/vaadin/tests/components/button/ButtonDisableOnClick.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/button/ButtonEnterWithWindowShortcut.html (renamed from uitest/src/com/vaadin/tests/components/button/ButtonEnterWithWindowShortcut.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/button/ButtonHtml.html (renamed from uitest/src/com/vaadin/tests/components/button/ButtonHtml.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/button/ButtonToggleIcons.html (renamed from uitest/src/com/vaadin/tests/components/button/ButtonToggleIcons.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/button/ButtonUpdateAltText.html (renamed from uitest/src/com/vaadin/tests/components/button/ButtonUpdateAltText.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/button/ButtonWithShortcutNotRendered.html (renamed from uitest/src/com/vaadin/tests/components/button/ButtonWithShortcutNotRendered.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/button/Buttons-chameleon.html (renamed from uitest/src/com/vaadin/tests/components/button/Buttons-chameleon.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/button/Buttons-reindeer.html (renamed from uitest/src/com/vaadin/tests/components/button/Buttons-reindeer.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/button/Buttons-runo.html (renamed from uitest/src/com/vaadin/tests/components/button/Buttons-runo.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/button/ButtonsAndIcons-chameleon.html (renamed from uitest/src/com/vaadin/tests/components/button/ButtonsAndIcons-chameleon.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/button/ButtonsAndIcons-reindeer.html (renamed from uitest/src/com/vaadin/tests/components/button/ButtonsAndIcons-reindeer.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/button/ButtonsAndIcons-runo.html (renamed from uitest/src/com/vaadin/tests/components/button/ButtonsAndIcons-runo.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/button/ButtonsInHorizontalLayout.html (renamed from uitest/src/com/vaadin/tests/components/button/ButtonsInHorizontalLayout.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/button/ButtonsWaiAria.html (renamed from uitest/src/com/vaadin/tests/components/button/ButtonsWaiAria.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/button/DisabledButtons.html (renamed from uitest/src/com/vaadin/tests/components/button/DisabledButtons.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/calendar/CalendarActions.html (renamed from uitest/src/com/vaadin/tests/components/calendar/CalendarActions.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/calendar/CalendarBasicNavigation.html (renamed from uitest/src/com/vaadin/tests/components/calendar/CalendarBasicNavigation.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/calendar/CalendarDragAndDrop.html (renamed from uitest/src/com/vaadin/tests/components/calendar/CalendarDragAndDrop.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/calendar/CalendarEventSizingNoOverlap.html (renamed from uitest/src/com/vaadin/tests/components/calendar/CalendarEventSizingNoOverlap.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/calendar/CalendarMidnightEventsTest.html (renamed from uitest/src/com/vaadin/tests/components/calendar/CalendarMidnightEventsTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/calendar/CalendarMonthlyViewNewEvent.html (renamed from uitest/src/com/vaadin/tests/components/calendar/CalendarMonthlyViewNewEvent.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/calendar/CalendarMonthlyViewNewEvents.html (renamed from uitest/src/com/vaadin/tests/components/calendar/CalendarMonthlyViewNewEvents.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/calendar/CalendarSizeTest1000x600px.html (renamed from uitest/src/com/vaadin/tests/components/calendar/CalendarSizeTest1000x600px.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/calendar/CalendarSizeTest100percentXundefined.html (renamed from uitest/src/com/vaadin/tests/components/calendar/CalendarSizeTest100percentXundefined.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/calendar/CalendarSizeTest100x100percent.html (renamed from uitest/src/com/vaadin/tests/components/calendar/CalendarSizeTest100x100percent.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/calendar/CalendarSizeTest300pxXundefined.html (renamed from uitest/src/com/vaadin/tests/components/calendar/CalendarSizeTest300pxXundefined.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/calendar/CalendarSizeTestUndefinedX100percent.html (renamed from uitest/src/com/vaadin/tests/components/calendar/CalendarSizeTestUndefinedX100percent.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/calendar/CalendarSizeTestUndefinedX300px.html (renamed from uitest/src/com/vaadin/tests/components/calendar/CalendarSizeTestUndefinedX300px.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/calendar/CalendarSizeTestUndefinedXUndefined.html (renamed from uitest/src/com/vaadin/tests/components/calendar/CalendarSizeTestUndefinedXUndefined.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/calendar/CalendarVisibleHours24H.html (renamed from uitest/src/com/vaadin/tests/components/calendar/CalendarVisibleHours24H.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/calendar/CalendarWeeklyViewNewEvents.html (renamed from uitest/src/com/vaadin/tests/components/calendar/CalendarWeeklyViewNewEvents.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/calendar/TestHideTimeAndSeparator.html (renamed from uitest/src/com/vaadin/tests/components/calendar/TestHideTimeAndSeparator.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/caption/EmptyCaptions.html (renamed from uitest/src/com/vaadin/tests/components/caption/EmptyCaptions.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/caption/LargeCaptionIcon.html (renamed from uitest/src/com/vaadin/tests/components/caption/LargeCaptionIcon.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/checkbox/CheckBoxDisabledReadOnlyValueChange.html (renamed from uitest/src/com/vaadin/tests/components/checkbox/CheckBoxDisabledReadOnlyValueChange.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/checkbox/CheckBoxRevertValueChange.html (renamed from uitest/src/com/vaadin/tests/components/checkbox/CheckBoxRevertValueChange.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/checkbox/CheckBoxes.html (renamed from uitest/src/com/vaadin/tests/components/checkbox/CheckBoxes.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/checkbox/CheckboxCaptionWrapping.html (renamed from uitest/src/com/vaadin/tests/components/checkbox/CheckboxCaptionWrapping.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/colorpicker/ColorPickerHsvTest.html (renamed from uitest/src/com/vaadin/tests/components/colorpicker/ColorPickerHsvTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/colorpicker/ColorPickerTest.html (renamed from uitest/src/com/vaadin/tests/components/colorpicker/ColorPickerTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxBorder.html (renamed from uitest/src/com/vaadin/tests/components/combobox/ComboBoxBorder.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxCombinedWithEnterShortcut.html (renamed from uitest/src/com/vaadin/tests/components/combobox/ComboBoxCombinedWithEnterShortcut.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxDataSourceChange.html (renamed from uitest/src/com/vaadin/tests/components/combobox/ComboBoxDataSourceChange.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxInvalidNullSelection.html (renamed from uitest/src/com/vaadin/tests/components/combobox/ComboBoxInvalidNullSelection.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxItemIcon.html (renamed from uitest/src/com/vaadin/tests/components/combobox/ComboBoxItemIcon.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxLargeIcons.html (renamed from uitest/src/com/vaadin/tests/components/combobox/ComboBoxLargeIcons.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxNavigation.html (renamed from uitest/src/com/vaadin/tests/components/combobox/ComboBoxNavigation.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxNoTextInput.html (renamed from uitest/src/com/vaadin/tests/components/combobox/ComboBoxNoTextInput.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxNullItem.html (renamed from uitest/src/com/vaadin/tests/components/combobox/ComboBoxNullItem.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxPageLength.html (renamed from uitest/src/com/vaadin/tests/components/combobox/ComboBoxPageLength.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxParentDisable.html (renamed from uitest/src/com/vaadin/tests/components/combobox/ComboBoxParentDisable.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxReapperingOldValue.html (renamed from uitest/src/com/vaadin/tests/components/combobox/ComboBoxReapperingOldValue.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxRemoveAllItems.html (renamed from uitest/src/com/vaadin/tests/components/combobox/ComboBoxRemoveAllItems.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxSQLContainerFilteredValueChange.html (renamed from uitest/src/com/vaadin/tests/components/combobox/ComboBoxSQLContainerFilteredValueChange.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxSuggestionOnDetach.html (renamed from uitest/src/com/vaadin/tests/components/combobox/ComboBoxSuggestionOnDetach.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxUndefinedWidthAndIcon.html (renamed from uitest/src/com/vaadin/tests/components/combobox/ComboBoxUndefinedWidthAndIcon.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/combobox/ComboFocusBlurEvents.html (renamed from uitest/src/com/vaadin/tests/components/combobox/ComboFocusBlurEvents.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/combobox/ComboboxInPopupViewWithItems.html (renamed from uitest/src/com/vaadin/tests/components/combobox/ComboboxInPopupViewWithItems.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/combobox/ComboboxPrimaryStyleName.html (renamed from uitest/src/com/vaadin/tests/components/combobox/ComboboxPrimaryStyleName.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/combobox/Comboboxes.html (renamed from uitest/src/com/vaadin/tests/components/combobox/Comboboxes.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/combobox/EscapeClosesComboboxNotWindow.html (renamed from uitest/src/com/vaadin/tests/components/combobox/EscapeClosesComboboxNotWindow.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/combobox/PopUpWidth.html (renamed from uitest/src/com/vaadin/tests/components/combobox/PopUpWidth.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.html (renamed from uitest/src/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/combobox/WidthToggleReadOnly.html (renamed from uitest/src/com/vaadin/tests/components/combobox/WidthToggleReadOnly.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/customcomponent/CustomComponentGrowingContent.html (renamed from uitest/src/com/vaadin/tests/components/customcomponent/CustomComponentGrowingContent.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/customcomponent/CustomComponentHideContent.html (renamed from uitest/src/com/vaadin/tests/components/customcomponent/CustomComponentHideContent.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/customcomponent/EmbeddedInCustomComponent.html (renamed from uitest/src/com/vaadin/tests/components/customcomponent/EmbeddedInCustomComponent.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/customfield/BooleanFieldExample.html (renamed from uitest/src/com/vaadin/tests/components/customfield/BooleanFieldExample.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/customfield/EmbeddedFormExample.html (renamed from uitest/src/com/vaadin/tests/components/customfield/EmbeddedFormExample.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/customfield/NestedFormExample.html (renamed from uitest/src/com/vaadin/tests/components/customfield/NestedFormExample.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/customlayout/CustomLayoutPrimaryStyleName.html (renamed from uitest/src/com/vaadin/tests/components/customlayout/CustomLayoutPrimaryStyleName.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/customlayout/CustomLayoutUsingTemplate.html (renamed from uitest/src/com/vaadin/tests/components/customlayout/CustomLayoutUsingTemplate.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/customlayout/CustomLayoutUsingTheme.html (renamed from uitest/src/com/vaadin/tests/components/customlayout/CustomLayoutUsingTheme.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/CommitInvalid.html (renamed from uitest/src/com/vaadin/tests/components/datefield/CommitInvalid.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/CustomDateFormat.html (renamed from uitest/src/com/vaadin/tests/components/datefield/CustomDateFormat.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/CustomDateFormats.html (renamed from uitest/src/com/vaadin/tests/components/datefield/CustomDateFormats.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/DateFieldEmptyValid.html (renamed from uitest/src/com/vaadin/tests/components/datefield/DateFieldEmptyValid.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/DateFieldExtendedRange.html (renamed from uitest/src/com/vaadin/tests/components/datefield/DateFieldExtendedRange.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/DateFieldInSubWindow.html (renamed from uitest/src/com/vaadin/tests/components/datefield/DateFieldInSubWindow.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/DateFieldPopupOffScreen.html (renamed from uitest/src/com/vaadin/tests/components/datefield/DateFieldPopupOffScreen.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/DateFieldPrimaryStyleNames.html (renamed from uitest/src/com/vaadin/tests/components/datefield/DateFieldPrimaryStyleNames.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/DateFieldRangeValidation.html (renamed from uitest/src/com/vaadin/tests/components/datefield/DateFieldRangeValidation.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/DateFieldRanges_ChangingRangeSoValueFallsOutsideRangeCausesOutOfRangeExceptionIfImmediateField.html (renamed from uitest/src/com/vaadin/tests/components/datefield/DateFieldRanges_ChangingRangeSoValueFallsOutsideRangeCausesOutOfRangeExceptionIfImmediateField.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/DateFieldRanges_EndRangeEarlierThanStartRangeCausesException.html (renamed from uitest/src/com/vaadin/tests/components/datefield/DateFieldRanges_EndRangeEarlierThanStartRangeCausesException.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/DateFieldRanges_InitialDatesOutsideRange.html (renamed from uitest/src/com/vaadin/tests/components/datefield/DateFieldRanges_InitialDatesOutsideRange.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/DateFieldRanges_MonthChangeMeansFocusDayRolledInsideRange.html (renamed from uitest/src/com/vaadin/tests/components/datefield/DateFieldRanges_MonthChangeMeansFocusDayRolledInsideRange.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/DateFieldRanges_NextYearClickableIfRangeAcceptsFractionOfNextYear.html (renamed from uitest/src/com/vaadin/tests/components/datefield/DateFieldRanges_NextYearClickableIfRangeAcceptsFractionOfNextYear.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/DateFieldRanges_PrevYearClickableIfRangeAcceptsFractionOfPrevYear.html (renamed from uitest/src/com/vaadin/tests/components/datefield/DateFieldRanges_PrevYearClickableIfRangeAcceptsFractionOfPrevYear.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/DateFieldRanges_SettingValueOutsideRangeCausesException.html (renamed from uitest/src/com/vaadin/tests/components/datefield/DateFieldRanges_SettingValueOutsideRangeCausesException.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/DateFieldTimezone.html (renamed from uitest/src/com/vaadin/tests/components/datefield/DateFieldTimezone.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/DatePopupStyleName.html (renamed from uitest/src/com/vaadin/tests/components/datefield/DatePopupStyleName.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/DynamicallyChangeDateRange.html (renamed from uitest/src/com/vaadin/tests/components/datefield/DynamicallyChangeDateRange.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/InlineDateFieldResolutionMsec.html (renamed from uitest/src/com/vaadin/tests/components/datefield/InlineDateFieldResolutionMsec.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/InlineDateFieldValueChange.html (renamed from uitest/src/com/vaadin/tests/components/datefield/InlineDateFieldValueChange.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/InlineDateFieldsHiddenOnStart.html (renamed from uitest/src/com/vaadin/tests/components/datefield/InlineDateFieldsHiddenOnStart.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/NarrowPopupDateFieldInTable.html (renamed from uitest/src/com/vaadin/tests/components/datefield/NarrowPopupDateFieldInTable.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/PopupDateFieldDisabledReadonly.html (renamed from uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldDisabledReadonly.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/PopupDateFieldLocaleTest.html (renamed from uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldLocaleTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/PopupDateFieldMonth.html (renamed from uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldMonth.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/PopupDateFieldPopup.html (renamed from uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldPopup.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/PopupDateFieldResolutions.html (renamed from uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldResolutions.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/PopupDateFieldTest.html (renamed from uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/PopupDateFieldValueChangeEvents.html (renamed from uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldValueChangeEvents.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/RequiredInvalidDateField.html (renamed from uitest/src/com/vaadin/tests/components/datefield/RequiredInvalidDateField.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/ShowSelectedDateAfterInvalid.html (renamed from uitest/src/com/vaadin/tests/components/datefield/ShowSelectedDateAfterInvalid.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/TestDatefieldYear.html (renamed from uitest/src/com/vaadin/tests/components/datefield/TestDatefieldYear.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/TestSettingTimeOnInitiallyNullInlineDateField.html (renamed from uitest/src/com/vaadin/tests/components/datefield/TestSettingTimeOnInitiallyNullInlineDateField.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/TestSettingTimeOnInitiallyNullPopupDateField.html (renamed from uitest/src/com/vaadin/tests/components/datefield/TestSettingTimeOnInitiallyNullPopupDateField.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/ValueThroughProperty.html (renamed from uitest/src/com/vaadin/tests/components/datefield/ValueThroughProperty.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/WidthRecalculationOnEnableStateChange.html (renamed from uitest/src/com/vaadin/tests/components/datefield/WidthRecalculationOnEnableStateChange.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/draganddropwrapper/DragAndDropDisable.html (renamed from uitest/src/com/vaadin/tests/components/draganddropwrapper/DragAndDropDisable.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/draganddropwrapper/DragAndDropWrapperInPanel.html (renamed from uitest/src/com/vaadin/tests/components/draganddropwrapper/DragAndDropWrapperInPanel.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/draganddropwrapper/TooltipHandlingWhenNotDefined.html (renamed from uitest/src/com/vaadin/tests/components/draganddropwrapper/TooltipHandlingWhenNotDefined.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/embedded/EmbeddedAltText.html (renamed from uitest/src/com/vaadin/tests/components/embedded/EmbeddedAltText.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/embedded/EmbeddedClickListenerRelativeCoordinates.html (renamed from uitest/src/com/vaadin/tests/components/embedded/EmbeddedClickListenerRelativeCoordinates.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/embedded/EmbeddedPdf.html (renamed from uitest/src/com/vaadin/tests/components/embedded/EmbeddedPdf.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/embedded/FlashIsVisible.html (renamed from uitest/src/com/vaadin/tests/components/embedded/FlashIsVisible.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/flash/FlashIsVisible.html (renamed from uitest/src/com/vaadin/tests/components/flash/FlashIsVisible.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/form/FormCaptionClickFocusing.html (renamed from uitest/src/com/vaadin/tests/components/form/FormCaptionClickFocusing.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/form/FormClearDatasourceRepaint.html (renamed from uitest/src/com/vaadin/tests/components/form/FormClearDatasourceRepaint.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/form/FormCommitWithInvalidValues.html (renamed from uitest/src/com/vaadin/tests/components/form/FormCommitWithInvalidValues.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/form/FormDescription.html (renamed from uitest/src/com/vaadin/tests/components/form/FormDescription.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/form/FormDescriptions.html (renamed from uitest/src/com/vaadin/tests/components/form/FormDescriptions.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/form/FormErrorVisible.html (renamed from uitest/src/com/vaadin/tests/components/form/FormErrorVisible.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/form/FormFieldCaptionsStyles.html (renamed from uitest/src/com/vaadin/tests/components/form/FormFieldCaptionsStyles.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/form/FormFieldFactoryAndLayouts.html (renamed from uitest/src/com/vaadin/tests/components/form/FormFieldFactoryAndLayouts.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/form/FormPrimaryStyleName.html (renamed from uitest/src/com/vaadin/tests/components/form/FormPrimaryStyleName.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/form/FormWithEnterShortcut.html (renamed from uitest/src/com/vaadin/tests/components/form/FormWithEnterShortcut.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/form/FormWithPaddingsAndBorders.html (renamed from uitest/src/com/vaadin/tests/components/form/FormWithPaddingsAndBorders.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/form/UndefinedWideFormWithRelativeWideFooter.html (renamed from uitest/src/com/vaadin/tests/components/form/UndefinedWideFormWithRelativeWideFooter.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/formlayout/CaptionEnableDisable.html (renamed from uitest/src/com/vaadin/tests/components/formlayout/CaptionEnableDisable.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/formlayout/FormLayoutCaptionStyles.html (renamed from uitest/src/com/vaadin/tests/components/formlayout/FormLayoutCaptionStyles.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/formlayout/FormLayoutErrorHover.html (renamed from uitest/src/com/vaadin/tests/components/formlayout/FormLayoutErrorHover.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/formlayout/NestedFormLayouts.html (renamed from uitest/src/com/vaadin/tests/components/formlayout/NestedFormLayouts.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/gridlayout/InsertRowInMiddle.html (renamed from uitest/src/com/vaadin/tests/components/gridlayout/InsertRowInMiddle.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/gridlayout/LayoutAfterHidingError.html (renamed from uitest/src/com/vaadin/tests/components/gridlayout/LayoutAfterHidingError.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/image/ImageAltText.html (renamed from uitest/src/com/vaadin/tests/components/image/ImageAltText.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/image/ImageClicks.html (renamed from uitest/src/com/vaadin/tests/components/image/ImageClicks.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/javascriptcomponent/BasicJavaScriptComponent.html (renamed from uitest/src/com/vaadin/tests/components/javascriptcomponent/BasicJavaScriptComponent.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/javascriptcomponent/JavaScriptResizeListener.html (renamed from uitest/src/com/vaadin/tests/components/javascriptcomponent/JavaScriptResizeListener.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/label/HundredPercentWideLabelResize.html (renamed from uitest/src/com/vaadin/tests/components/label/HundredPercentWideLabelResize.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/label/LabelPropertySourceValue.html (renamed from uitest/src/com/vaadin/tests/components/label/LabelPropertySourceValue.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/label/LabelTooltip-chameleon.html (renamed from uitest/src/com/vaadin/tests/components/label/LabelTooltip-chameleon.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/label/LabelTooltip-runo.html (renamed from uitest/src/com/vaadin/tests/components/label/LabelTooltip-runo.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/label/LabelTooltip.html (renamed from uitest/src/com/vaadin/tests/components/label/LabelTooltip.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/label/LabelWrapping.html (renamed from uitest/src/com/vaadin/tests/components/label/LabelWrapping.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/label/Labels.html (renamed from uitest/src/com/vaadin/tests/components/label/Labels.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/label/MarginsInLabels.html (renamed from uitest/src/com/vaadin/tests/components/label/MarginsInLabels.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/link/LinkToPercentage.html (renamed from uitest/src/com/vaadin/tests/components/link/LinkToPercentage.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/listselect/ListSelectAllowNewItem.html (renamed from uitest/src/com/vaadin/tests/components/listselect/ListSelectAllowNewItem.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/listselect/ListSelectJump.html (renamed from uitest/src/com/vaadin/tests/components/listselect/ListSelectJump.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/listselect/ListSelectParentDisabled.html (renamed from uitest/src/com/vaadin/tests/components/listselect/ListSelectParentDisabled.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/listselect/ListSelectPrimaryStylename.html (renamed from uitest/src/com/vaadin/tests/components/listselect/ListSelectPrimaryStylename.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/listselect/ListSelectSelection.html (renamed from uitest/src/com/vaadin/tests/components/listselect/ListSelectSelection.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/loginform/CustomizedLoginFormTest.html (renamed from uitest/src/com/vaadin/tests/components/loginform/CustomizedLoginFormTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/loginform/LoginFormTest.html (renamed from uitest/src/com/vaadin/tests/components/loginform/LoginFormTest.html)0
-rwxr-xr-xuitest/tb2/com/vaadin/tests/components/loginform/LoginFormUIInLoginHandler.html (renamed from uitest/src/com/vaadin/tests/components/loginform/LoginFormUIInLoginHandler.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/media/AudioTest.html (renamed from uitest/src/com/vaadin/tests/components/media/AudioTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/menubar/IconsInRootMenuBar.html (renamed from uitest/src/com/vaadin/tests/components/menubar/IconsInRootMenuBar.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/menubar/IconsInSubMenus.html (renamed from uitest/src/com/vaadin/tests/components/menubar/IconsInSubMenus.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/menubar/MenuBarFocus.html (renamed from uitest/src/com/vaadin/tests/components/menubar/MenuBarFocus.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/menubar/MenuBarHtmlItems.html (renamed from uitest/src/com/vaadin/tests/components/menubar/MenuBarHtmlItems.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/menubar/MenuBarItemsCheckable.html (renamed from uitest/src/com/vaadin/tests/components/menubar/MenuBarItemsCheckable.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/menubar/MenuBarLongMenus.html (renamed from uitest/src/com/vaadin/tests/components/menubar/MenuBarLongMenus.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/menubar/MenuBarNavigationKeyboard.html (renamed from uitest/src/com/vaadin/tests/components/menubar/MenuBarNavigationKeyboard.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/menubar/MenuBarNavigationMouse.html (renamed from uitest/src/com/vaadin/tests/components/menubar/MenuBarNavigationMouse.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/menubar/MenuBarPrimaryStylenames.html (renamed from uitest/src/com/vaadin/tests/components/menubar/MenuBarPrimaryStylenames.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/menubar/MenuBarResize.html (renamed from uitest/src/com/vaadin/tests/components/menubar/MenuBarResize.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/menubar/MenuBarRootItemSelectWithKeyboard.html (renamed from uitest/src/com/vaadin/tests/components/menubar/MenuBarRootItemSelectWithKeyboard.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/menubar/MenuBarRunsOutOfBrowser.html (renamed from uitest/src/com/vaadin/tests/components/menubar/MenuBarRunsOutOfBrowser.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/menubar/Menubars.html (renamed from uitest/src/com/vaadin/tests/components/menubar/Menubars.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/nativebutton/NativeButtonDisableOnClick.html (renamed from uitest/src/com/vaadin/tests/components/nativebutton/NativeButtonDisableOnClick.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/nativebutton/NativeButtonHtml.html (renamed from uitest/src/com/vaadin/tests/components/nativebutton/NativeButtonHtml.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/nativeselect/NativeSelectParentDisabled.html (renamed from uitest/src/com/vaadin/tests/components/nativeselect/NativeSelectParentDisabled.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/notification/CloseErrorNotificationWithEscape.html (renamed from uitest/src/com/vaadin/tests/components/notification/CloseErrorNotificationWithEscape.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/notification/Notifications.html (renamed from uitest/src/com/vaadin/tests/components/notification/Notifications.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/notification/NotificationsAndModalWindow.html (renamed from uitest/src/com/vaadin/tests/components/notification/NotificationsAndModalWindow.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/notification/NotificationsHtmlAllowed.html (renamed from uitest/src/com/vaadin/tests/components/notification/NotificationsHtmlAllowed.html)0
-rwxr-xr-xuitest/tb2/com/vaadin/tests/components/notification/SemitransparentNotification.html (renamed from uitest/src/com/vaadin/tests/components/notification/SemitransparentNotification.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/optiongroup/DisabledOptionGroupItems.html (renamed from uitest/src/com/vaadin/tests/components/optiongroup/DisabledOptionGroupItems.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/optiongroup/HtmlOptionGroupItems.html (renamed from uitest/src/com/vaadin/tests/components/optiongroup/HtmlOptionGroupItems.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/optiongroup/OptionGroupItemIcons.html (renamed from uitest/src/com/vaadin/tests/components/optiongroup/OptionGroupItemIcons.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/optiongroup/OptionGroupParentDisabled.html (renamed from uitest/src/com/vaadin/tests/components/optiongroup/OptionGroupParentDisabled.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/optiongroup/OptionGroupRetainFocusKeyboardValueChange.html (renamed from uitest/src/com/vaadin/tests/components/optiongroup/OptionGroupRetainFocusKeyboardValueChange.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/orderedlayout/ExpandChangeReattach.html (renamed from uitest/src/com/vaadin/tests/components/orderedlayout/ExpandChangeReattach.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/orderedlayout/HorizontalLayoutVerticalAlign.html (renamed from uitest/src/com/vaadin/tests/components/orderedlayout/HorizontalLayoutVerticalAlign.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/orderedlayout/HorizontalRelativeChildren.html (renamed from uitest/src/com/vaadin/tests/components/orderedlayout/HorizontalRelativeChildren.html)0
-rwxr-xr-xuitest/tb2/com/vaadin/tests/components/orderedlayout/HorizontalRelativeSizeWithoutExpand.html (renamed from uitest/src/com/vaadin/tests/components/orderedlayout/HorizontalRelativeSizeWithoutExpand.html)0
-rwxr-xr-xuitest/tb2/com/vaadin/tests/components/orderedlayout/InsertComponentInHorizontalLayout.html (renamed from uitest/src/com/vaadin/tests/components/orderedlayout/InsertComponentInHorizontalLayout.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/orderedlayout/LayoutClickListenerTest.html (renamed from uitest/src/com/vaadin/tests/components/orderedlayout/LayoutClickListenerTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.html (renamed from uitest/src/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/orderedlayout/OrderedLayoutComponentOrdering.html (renamed from uitest/src/com/vaadin/tests/components/orderedlayout/OrderedLayoutComponentOrdering.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/orderedlayout/OrderedLayoutSlotStyleNames.html (renamed from uitest/src/com/vaadin/tests/components/orderedlayout/OrderedLayoutSlotStyleNames.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/orderedlayout/RelativeChildWithoutExpand.html (renamed from uitest/src/com/vaadin/tests/components/orderedlayout/RelativeChildWithoutExpand.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/orderedlayout/RelativeChildrenWithoutExpand.html (renamed from uitest/src/com/vaadin/tests/components/orderedlayout/RelativeChildrenWithoutExpand.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/orderedlayout/ReplaceComponentNPE.html (renamed from uitest/src/com/vaadin/tests/components/orderedlayout/ReplaceComponentNPE.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/orderedlayout/VerticalLayoutChangingChildrenSizes.html (renamed from uitest/src/com/vaadin/tests/components/orderedlayout/VerticalLayoutChangingChildrenSizes.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/orderedlayout/VerticalLayoutWidthCalculation.html (renamed from uitest/src/com/vaadin/tests/components/orderedlayout/VerticalLayoutWidthCalculation.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/orderedlayout/VerticalRelativeChildren.html (renamed from uitest/src/com/vaadin/tests/components/orderedlayout/VerticalRelativeChildren.html)0
-rwxr-xr-xuitest/tb2/com/vaadin/tests/components/orderedlayout/VerticalRelativeSizeWithoutExpand.html (renamed from uitest/src/com/vaadin/tests/components/orderedlayout/VerticalRelativeSizeWithoutExpand.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/page/PageReload.html (renamed from uitest/src/com/vaadin/tests/components/page/PageReload.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/panel/PanelChangeContents.html (renamed from uitest/src/com/vaadin/tests/components/panel/PanelChangeContents.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/panel/PanelClickListenerRelativeCoordinates.html (renamed from uitest/src/com/vaadin/tests/components/panel/PanelClickListenerRelativeCoordinates.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/panel/PanelShouldNotScroll.html (renamed from uitest/src/com/vaadin/tests/components/panel/PanelShouldNotScroll.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/panel/WebkitScrollbarTest.html (renamed from uitest/src/com/vaadin/tests/components/panel/WebkitScrollbarTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/passwordfield/PasswordFieldBasicStates.html (renamed from uitest/src/com/vaadin/tests/components/passwordfield/PasswordFieldBasicStates.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/popupview/ClickingWhilePopupOpen.html (renamed from uitest/src/com/vaadin/tests/components/popupview/ClickingWhilePopupOpen.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/popupview/PopupViewClickShortcut.html (renamed from uitest/src/com/vaadin/tests/components/popupview/PopupViewClickShortcut.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/popupview/PopupViewInEmbeddedApplication.html (renamed from uitest/src/com/vaadin/tests/components/popupview/PopupViewInEmbeddedApplication.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/popupview/PopupViewOffScreen.html (renamed from uitest/src/com/vaadin/tests/components/popupview/PopupViewOffScreen.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/popupview/PopupViewShouldCloseOnTabOut.html (renamed from uitest/src/com/vaadin/tests/components/popupview/PopupViewShouldCloseOnTabOut.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/popupview/ReopenPopupView.html (renamed from uitest/src/com/vaadin/tests/components/popupview/ReopenPopupView.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/progressindicator/ProgressBarPrimaryStyleName.html (renamed from uitest/src/com/vaadin/tests/components/progressindicator/ProgressBarPrimaryStyleName.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/progressindicator/ProgressBarTest.html (renamed from uitest/src/com/vaadin/tests/components/progressindicator/ProgressBarTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/richtextarea/RichTextAreaPreventsTextFieldAccess.html (renamed from uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreaPreventsTextFieldAccess.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/richtextarea/RichTextAreaScrolling.html (renamed from uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreaScrolling.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/richtextarea/RichTextAreaSize.html (renamed from uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreaSize.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/richtextarea/RichTextAreaUpdateWhileTyping.html (renamed from uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreaUpdateWhileTyping.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/richtextarea/RichTextAreas.html (renamed from uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreas.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/select/NativeSelects.html (renamed from uitest/src/com/vaadin/tests/components/select/NativeSelects.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/select/OptionGroupBasedSelectsParentDisabledScreenshots.html (renamed from uitest/src/com/vaadin/tests/components/select/OptionGroupBasedSelectsParentDisabledScreenshots.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/select/SelectDisplaysOldValue.html (renamed from uitest/src/com/vaadin/tests/components/select/SelectDisplaysOldValue.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/select/SelectIconPlacement.html (renamed from uitest/src/com/vaadin/tests/components/select/SelectIconPlacement.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/select/SelectItemCaptionRefresh.html (renamed from uitest/src/com/vaadin/tests/components/select/SelectItemCaptionRefresh.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/select/StylingPopupOpener.html (renamed from uitest/src/com/vaadin/tests/components/select/StylingPopupOpener.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/select/TwinColSelectCaptionStyles.html (renamed from uitest/src/com/vaadin/tests/components/select/TwinColSelectCaptionStyles.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/select/TwinColSelectDualCaptions.html (renamed from uitest/src/com/vaadin/tests/components/select/TwinColSelectDualCaptions.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/select/TwinColSelectsDisabledReadonly.html (renamed from uitest/src/com/vaadin/tests/components/select/TwinColSelectsDisabledReadonly.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/slider/SliderKeyboardFocus.html (renamed from uitest/src/com/vaadin/tests/components/slider/SliderKeyboardFocus.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/slider/SliderOrientation.html (renamed from uitest/src/com/vaadin/tests/components/slider/SliderOrientation.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/slider/SliderPrimaryStyleName.html (renamed from uitest/src/com/vaadin/tests/components/slider/SliderPrimaryStyleName.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/slider/SliderUpdateFromValueChange.html (renamed from uitest/src/com/vaadin/tests/components/slider/SliderUpdateFromValueChange.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/slider/SliderValueFromDataSource.html (renamed from uitest/src/com/vaadin/tests/components/slider/SliderValueFromDataSource.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/splitpanel/HorizontalSplitPanelBasicStates.html (renamed from uitest/src/com/vaadin/tests/components/splitpanel/HorizontalSplitPanelBasicStates.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/splitpanel/HorizontalSplitPanelMoveSplitter.html (renamed from uitest/src/com/vaadin/tests/components/splitpanel/HorizontalSplitPanelMoveSplitter.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/splitpanel/HorizontalSplitPanelSplitterClick.html (renamed from uitest/src/com/vaadin/tests/components/splitpanel/HorizontalSplitPanelSplitterClick.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/splitpanel/RetainSplitterPositionWhenOutOfBounds.html (renamed from uitest/src/com/vaadin/tests/components/splitpanel/RetainSplitterPositionWhenOutOfBounds.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/splitpanel/SplitPanelExtraScrollbars.html (renamed from uitest/src/com/vaadin/tests/components/splitpanel/SplitPanelExtraScrollbars.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/splitpanel/SplitPanelReversePosition.html (renamed from uitest/src/com/vaadin/tests/components/splitpanel/SplitPanelReversePosition.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/splitpanel/SplitPanelSwapComponents.html (renamed from uitest/src/com/vaadin/tests/components/splitpanel/SplitPanelSwapComponents.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/splitpanel/SplitPanelWithMinimumAndMaximum.html (renamed from uitest/src/com/vaadin/tests/components/splitpanel/SplitPanelWithMinimumAndMaximum.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/splitpanel/VerticalSplitPanelBasicStates.html (renamed from uitest/src/com/vaadin/tests/components/splitpanel/VerticalSplitPanelBasicStates.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/splitpanel/VerticalSplitPanelMoveSplitter.html (renamed from uitest/src/com/vaadin/tests/components/splitpanel/VerticalSplitPanelMoveSplitter.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/splitpanel/VerticalSplitPanelSplitterClick.html (renamed from uitest/src/com/vaadin/tests/components/splitpanel/VerticalSplitPanelSplitterClick.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/ActionsOnTableBackground.html (renamed from uitest/src/com/vaadin/tests/components/table/ActionsOnTableBackground.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/AddItemToEmptyTable.html (renamed from uitest/src/com/vaadin/tests/components/table/AddItemToEmptyTable.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/AddNonRenderedRow.html (renamed from uitest/src/com/vaadin/tests/components/table/AddNonRenderedRow.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/ClippedComponentsInTable.html (renamed from uitest/src/com/vaadin/tests/components/table/ClippedComponentsInTable.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/CollapseIndicatorOverlapsColumn.html (renamed from uitest/src/com/vaadin/tests/components/table/CollapseIndicatorOverlapsColumn.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansion.html (renamed from uitest/src/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansion.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/ColumnExpandRatio.html (renamed from uitest/src/com/vaadin/tests/components/table/ColumnExpandRatio.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/ColumnExpandWithFixedColumns.html (renamed from uitest/src/com/vaadin/tests/components/table/ColumnExpandWithFixedColumns.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/ColumnReorderingWithManyColumns.html (renamed from uitest/src/com/vaadin/tests/components/table/ColumnReorderingWithManyColumns.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/ContainerChangeWithPartlySamePropertyIds.html (renamed from uitest/src/com/vaadin/tests/components/table/ContainerChangeWithPartlySamePropertyIds.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/ContainerSizeChangeDuringTablePaint.html (renamed from uitest/src/com/vaadin/tests/components/table/ContainerSizeChangeDuringTablePaint.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/DisabledTableKeyboardNavigation.html (renamed from uitest/src/com/vaadin/tests/components/table/DisabledTableKeyboardNavigation.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/EmptyTable.html (renamed from uitest/src/com/vaadin/tests/components/table/EmptyTable.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/FixedHeightTable.html (renamed from uitest/src/com/vaadin/tests/components/table/FixedHeightTable.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/Footer.html (renamed from uitest/src/com/vaadin/tests/components/table/Footer.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/FooterClick.html (renamed from uitest/src/com/vaadin/tests/components/table/FooterClick.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/HeaderClick.html (renamed from uitest/src/com/vaadin/tests/components/table/HeaderClick.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/HeaderFooterClickLeftRightMiddle.html (renamed from uitest/src/com/vaadin/tests/components/table/HeaderFooterClickLeftRightMiddle.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/HeaderPositionWhenSorting.html (renamed from uitest/src/com/vaadin/tests/components/table/HeaderPositionWhenSorting.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/HeaderSyncOnScroll.html (renamed from uitest/src/com/vaadin/tests/components/table/HeaderSyncOnScroll.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/HeaderUpdateWhenNoRows.html (renamed from uitest/src/com/vaadin/tests/components/table/HeaderUpdateWhenNoRows.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/HiddenComponentCells.html (renamed from uitest/src/com/vaadin/tests/components/table/HiddenComponentCells.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/HorizontalScrollWithNoRows.html (renamed from uitest/src/com/vaadin/tests/components/table/HorizontalScrollWithNoRows.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/ItemClickEvents.html (renamed from uitest/src/com/vaadin/tests/components/table/ItemClickEvents.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/LargeSelectionCausesNPE.html (renamed from uitest/src/com/vaadin/tests/components/table/LargeSelectionCausesNPE.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/LastColumnNegative.html (renamed from uitest/src/com/vaadin/tests/components/table/LastColumnNegative.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/MissingScrollbar.html (renamed from uitest/src/com/vaadin/tests/components/table/MissingScrollbar.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/ModifyContainerProperty.html (renamed from uitest/src/com/vaadin/tests/components/table/ModifyContainerProperty.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/MultiSelectValueOrder.html (renamed from uitest/src/com/vaadin/tests/components/table/MultiSelectValueOrder.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/MultiSelectWithRemovedRow.html (renamed from uitest/src/com/vaadin/tests/components/table/MultiSelectWithRemovedRow.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/OddEvenRowStyling.html (renamed from uitest/src/com/vaadin/tests/components/table/OddEvenRowStyling.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/ProgrammaticUnselectInRange.html (renamed from uitest/src/com/vaadin/tests/components/table/ProgrammaticUnselectInRange.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/PropertyValueChange.html (renamed from uitest/src/com/vaadin/tests/components/table/PropertyValueChange.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/RefreshRenderedCellsOnlyIfAttached.html (renamed from uitest/src/com/vaadin/tests/components/table/RefreshRenderedCellsOnlyIfAttached.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/RemoveItemOnClick.html (renamed from uitest/src/com/vaadin/tests/components/table/RemoveItemOnClick.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/ResizeColumnAfterScrolling.html (renamed from uitest/src/com/vaadin/tests/components/table/ResizeColumnAfterScrolling.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/RowFocusAppliedAndRemovedOnSelection.html (renamed from uitest/src/com/vaadin/tests/components/table/RowFocusAppliedAndRemovedOnSelection.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/RowUpdateShouldRetainContextMenu.html (renamed from uitest/src/com/vaadin/tests/components/table/RowUpdateShouldRetainContextMenu.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/SelectableEditable.html (renamed from uitest/src/com/vaadin/tests/components/table/SelectableEditable.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/SetDataSourceWithPropertyIds.html (renamed from uitest/src/com/vaadin/tests/components/table/SetDataSourceWithPropertyIds.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/ShowLastItem.html (renamed from uitest/src/com/vaadin/tests/components/table/ShowLastItem.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/SortLabelsInTable.html (renamed from uitest/src/com/vaadin/tests/components/table/SortLabelsInTable.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/SortLongTable.html (renamed from uitest/src/com/vaadin/tests/components/table/SortLongTable.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableClickValueChangeInteraction.html (renamed from uitest/src/com/vaadin/tests/components/table/TableClickValueChangeInteraction.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableColumnAlignment.html (renamed from uitest/src/com/vaadin/tests/components/table/TableColumnAlignment.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableColumnHeaders.html (renamed from uitest/src/com/vaadin/tests/components/table/TableColumnHeaders.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableColumnIcons-chameleon.html (renamed from uitest/src/com/vaadin/tests/components/table/TableColumnIcons-chameleon.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableColumnIcons-runo.html (renamed from uitest/src/com/vaadin/tests/components/table/TableColumnIcons-runo.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableColumnIcons.html (renamed from uitest/src/com/vaadin/tests/components/table/TableColumnIcons.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableColumnSorting.html (renamed from uitest/src/com/vaadin/tests/components/table/TableColumnSorting.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableColumnWidthsAndExpandRatios.html (renamed from uitest/src/com/vaadin/tests/components/table/TableColumnWidthsAndExpandRatios.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableContextMenuAndIcons.html (renamed from uitest/src/com/vaadin/tests/components/table/TableContextMenuAndIcons.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableDragColumn.html (renamed from uitest/src/com/vaadin/tests/components/table/TableDragColumn.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableDragColumnFloatingElementStyles.html (renamed from uitest/src/com/vaadin/tests/components/table/TableDragColumnFloatingElementStyles.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableGeneratedColumns.html (renamed from uitest/src/com/vaadin/tests/components/table/TableGeneratedColumns.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableGeneratedRows-chameleon.html (renamed from uitest/src/com/vaadin/tests/components/table/TableGeneratedRows-chameleon.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableGeneratedRows.html (renamed from uitest/src/com/vaadin/tests/components/table/TableGeneratedRows.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableGeneratedStringColumns.html (renamed from uitest/src/com/vaadin/tests/components/table/TableGeneratedStringColumns.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.html (renamed from uitest/src/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableLastRowMissing.html (renamed from uitest/src/com/vaadin/tests/components/table/TableLastRowMissing.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableModificationsWhenScrolledRight.html (renamed from uitest/src/com/vaadin/tests/components/table/TableModificationsWhenScrolledRight.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableMultiSelectMouse.html (renamed from uitest/src/com/vaadin/tests/components/table/TableMultiSelectMouse.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableMultiSelectSimple-chameleon.html (renamed from uitest/src/com/vaadin/tests/components/table/TableMultiSelectSimple-chameleon.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableMultiSelectSimple.html (renamed from uitest/src/com/vaadin/tests/components/table/TableMultiSelectSimple.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TablePageLengthUpdate.html (renamed from uitest/src/com/vaadin/tests/components/table/TablePageLengthUpdate.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableReduceContainerSize.html (renamed from uitest/src/com/vaadin/tests/components/table/TableReduceContainerSize.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableRemoveActionHandlers.html (renamed from uitest/src/com/vaadin/tests/components/table/TableRemoveActionHandlers.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableRepaintWhenMadeVisible.html (renamed from uitest/src/com/vaadin/tests/components/table/TableRepaintWhenMadeVisible.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableRowHeight.html (renamed from uitest/src/com/vaadin/tests/components/table/TableRowHeight.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableRowHeight3.html (renamed from uitest/src/com/vaadin/tests/components/table/TableRowHeight3.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableRowNoHeightNoRows.html (renamed from uitest/src/com/vaadin/tests/components/table/TableRowNoHeightNoRows.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableScrollOnFocus.html (renamed from uitest/src/com/vaadin/tests/components/table/TableScrollOnFocus.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableScrolling.html (renamed from uitest/src/com/vaadin/tests/components/table/TableScrolling.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableShouldNotEatValueChanges.html (renamed from uitest/src/com/vaadin/tests/components/table/TableShouldNotEatValueChanges.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableSingleSelect.html (renamed from uitest/src/com/vaadin/tests/components/table/TableSingleSelect.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableSqlContainer.html (renamed from uitest/src/com/vaadin/tests/components/table/TableSqlContainer.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableToggleVisibility.html (renamed from uitest/src/com/vaadin/tests/components/table/TableToggleVisibility.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableUndefinedSize.html (renamed from uitest/src/com/vaadin/tests/components/table/TableUndefinedSize.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableUnregisterComponent.html (renamed from uitest/src/com/vaadin/tests/components/table/TableUnregisterComponent.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableVisibleColumnsUpdate.html (renamed from uitest/src/com/vaadin/tests/components/table/TableVisibleColumnsUpdate.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableWithBrokenGeneratorAndContainer.html (renamed from uitest/src/com/vaadin/tests/components/table/TableWithBrokenGeneratorAndContainer.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableWithCustomConverterFactory.html (renamed from uitest/src/com/vaadin/tests/components/table/TableWithCustomConverterFactory.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableWithManyColumns.html (renamed from uitest/src/com/vaadin/tests/components/table/TableWithManyColumns.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TableWithNoncollapsibleColumns.html (renamed from uitest/src/com/vaadin/tests/components/table/TableWithNoncollapsibleColumns.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TestCurrentPageFirstItem.html (renamed from uitest/src/com/vaadin/tests/components/table/TestCurrentPageFirstItem.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/TooManySetColumnCollapsedCalls.html (renamed from uitest/src/com/vaadin/tests/components/table/TooManySetColumnCollapsedCalls.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/UncollapsedCollumnWidth.html (renamed from uitest/src/com/vaadin/tests/components/table/UncollapsedCollumnWidth.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/ValueAfterClearingContainer.html (renamed from uitest/src/com/vaadin/tests/components/table/ValueAfterClearingContainer.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/table/ViewPortCalculation.html (renamed from uitest/src/com/vaadin/tests/components/table/ViewPortCalculation.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tabsheet/AddAndRemoveTabs.html (renamed from uitest/src/com/vaadin/tests/components/tabsheet/AddAndRemoveTabs.html)0
-rwxr-xr-xuitest/tb2/com/vaadin/tests/components/tabsheet/EXtraScrollbarsInTabSheet.html (renamed from uitest/src/com/vaadin/tests/components/tabsheet/EXtraScrollbarsInTabSheet.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tabsheet/MoveComponentBetweenTabsheets.html (renamed from uitest/src/com/vaadin/tests/components/tabsheet/MoveComponentBetweenTabsheets.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tabsheet/NestedTabSheetsHideTabs.html (renamed from uitest/src/com/vaadin/tests/components/tabsheet/NestedTabSheetsHideTabs.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tabsheet/RemoveTabsTabsheet.html (renamed from uitest/src/com/vaadin/tests/components/tabsheet/RemoveTabsTabsheet.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tabsheet/ScrollbarsInNestedTabsheets.html (renamed from uitest/src/com/vaadin/tests/components/tabsheet/ScrollbarsInNestedTabsheets.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tabsheet/TabGetAndReplaceComponent.html (renamed from uitest/src/com/vaadin/tests/components/tabsheet/TabGetAndReplaceComponent.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetBasicOperations.html (renamed from uitest/src/com/vaadin/tests/components/tabsheet/TabSheetBasicOperations.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetCaptions.html (renamed from uitest/src/com/vaadin/tests/components/tabsheet/TabSheetCaptions.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetDisabling.html (renamed from uitest/src/com/vaadin/tests/components/tabsheet/TabSheetDisabling.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetDiscardsMovedComponents.html (renamed from uitest/src/com/vaadin/tests/components/tabsheet/TabSheetDiscardsMovedComponents.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetIcons.html (renamed from uitest/src/com/vaadin/tests/components/tabsheet/TabSheetIcons.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetIndexOperations.html (renamed from uitest/src/com/vaadin/tests/components/tabsheet/TabSheetIndexOperations.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetSelectionStyles.html (renamed from uitest/src/com/vaadin/tests/components/tabsheet/TabSheetSelectionStyles.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetTabStyleNames.html (renamed from uitest/src/com/vaadin/tests/components/tabsheet/TabSheetTabStyleNames.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetWithDisappearingContent.html (renamed from uitest/src/com/vaadin/tests/components/tabsheet/TabSheetWithDisappearingContent.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetWithHasComponent.html (renamed from uitest/src/com/vaadin/tests/components/tabsheet/TabSheetWithHasComponent.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetWithTabIds.html (renamed from uitest/src/com/vaadin/tests/components/tabsheet/TabSheetWithTabIds.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetWithoutTabCaption.html (renamed from uitest/src/com/vaadin/tests/components/tabsheet/TabSheetWithoutTabCaption.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tabsheet/TabsheetMinimalClosableTabs.html (renamed from uitest/src/com/vaadin/tests/components/tabsheet/TabsheetMinimalClosableTabs.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tabsheet/TabsheetScrolling.html (renamed from uitest/src/com/vaadin/tests/components/tabsheet/TabsheetScrolling.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tabsheet/TabsheetShouldUpdateHeight.html (renamed from uitest/src/com/vaadin/tests/components/tabsheet/TabsheetShouldUpdateHeight.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tabsheet/TabsheetTooltip.html (renamed from uitest/src/com/vaadin/tests/components/tabsheet/TabsheetTooltip.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tabsheet/VerticalScrollbarPosition.html (renamed from uitest/src/com/vaadin/tests/components/tabsheet/VerticalScrollbarPosition.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tabsheet/WrapTabSheetInTabSheet.html (renamed from uitest/src/com/vaadin/tests/components/tabsheet/WrapTabSheetInTabSheet.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/textarea/ScrollCursor.html (renamed from uitest/src/com/vaadin/tests/components/textarea/ScrollCursor.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/textarea/TextAreaBasicStates.html (renamed from uitest/src/com/vaadin/tests/components/textarea/TextAreaBasicStates.html)0
-rwxr-xr-xuitest/tb2/com/vaadin/tests/components/textarea/TextAreaMaxLength.html (renamed from uitest/src/com/vaadin/tests/components/textarea/TextAreaMaxLength.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/textarea/TextAreaNullRepresentation.html (renamed from uitest/src/com/vaadin/tests/components/textarea/TextAreaNullRepresentation.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/textarea/TextAreaWordwrap.html (renamed from uitest/src/com/vaadin/tests/components/textarea/TextAreaWordwrap.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/textfield/BigDecimalTextField.html (renamed from uitest/src/com/vaadin/tests/components/textfield/BigDecimalTextField.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/textfield/SelectionAndCursorPosition.html (renamed from uitest/src/com/vaadin/tests/components/textfield/SelectionAndCursorPosition.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/textfield/SetTabIndex.html (renamed from uitest/src/com/vaadin/tests/components/textfield/SetTabIndex.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/textfield/TextChangeEventsEternalLoop.html (renamed from uitest/src/com/vaadin/tests/components/textfield/TextChangeEventsEternalLoop.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/textfield/TextChangeListenerChangingNonTextProperties.html (renamed from uitest/src/com/vaadin/tests/components/textfield/TextChangeListenerChangingNonTextProperties.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/textfield/TextChangeTimeoutAfterDetach.html (renamed from uitest/src/com/vaadin/tests/components/textfield/TextChangeTimeoutAfterDetach.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/textfield/TextFieldBasicStates.html (renamed from uitest/src/com/vaadin/tests/components/textfield/TextFieldBasicStates.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/textfield/TextFieldEagerRepaint.html (renamed from uitest/src/com/vaadin/tests/components/textfield/TextFieldEagerRepaint.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/textfield/TextFieldInLayoutInTable.html (renamed from uitest/src/com/vaadin/tests/components/textfield/TextFieldInLayoutInTable.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/textfield/TextFieldMaxLength.html (renamed from uitest/src/com/vaadin/tests/components/textfield/TextFieldMaxLength.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/textfield/TextFieldMaxLengthRemovedFromDOM.html (renamed from uitest/src/com/vaadin/tests/components/textfield/TextFieldMaxLengthRemovedFromDOM.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/textfield/TextFieldNullRepresentation.html (renamed from uitest/src/com/vaadin/tests/components/textfield/TextFieldNullRepresentation.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/textfield/TextFieldNullRepresentationAndSelection.html (renamed from uitest/src/com/vaadin/tests/components/textfield/TextFieldNullRepresentationAndSelection.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/textfield/TextFieldTextChangeEvent.html (renamed from uitest/src/com/vaadin/tests/components/textfield/TextFieldTextChangeEvent.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/textfield/TextFieldWithDataSourceAndInputPrompt.html (renamed from uitest/src/com/vaadin/tests/components/textfield/TextFieldWithDataSourceAndInputPrompt.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/textfield/TextFieldWithProperty.html (renamed from uitest/src/com/vaadin/tests/components/textfield/TextFieldWithProperty.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/textfield/TextFieldWithPropertyFormatter.html (renamed from uitest/src/com/vaadin/tests/components/textfield/TextFieldWithPropertyFormatter.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/textfield/TextFields.html (renamed from uitest/src/com/vaadin/tests/components/textfield/TextFields.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tree/ActionsOnTreeBackground.html (renamed from uitest/src/com/vaadin/tests/components/tree/ActionsOnTreeBackground.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tree/ExpandCollapseTree.html (renamed from uitest/src/com/vaadin/tests/components/tree/ExpandCollapseTree.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tree/PreselectedTreeVisible.html (renamed from uitest/src/com/vaadin/tests/components/tree/PreselectedTreeVisible.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tree/SimpleTree.html (renamed from uitest/src/com/vaadin/tests/components/tree/SimpleTree.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tree/TreeConnectors-base.html (renamed from uitest/src/com/vaadin/tests/components/tree/TreeConnectors-base.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tree/TreeConnectors-chameleon.html (renamed from uitest/src/com/vaadin/tests/components/tree/TreeConnectors-chameleon.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tree/TreeConnectors-reindeer.html (renamed from uitest/src/com/vaadin/tests/components/tree/TreeConnectors-reindeer.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tree/TreeConnectors-runo.html (renamed from uitest/src/com/vaadin/tests/components/tree/TreeConnectors-runo.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tree/TreeContextMenuAndIcons.html (renamed from uitest/src/com/vaadin/tests/components/tree/TreeContextMenuAndIcons.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tree/TreeDragAndDropFromTable.html (renamed from uitest/src/com/vaadin/tests/components/tree/TreeDragAndDropFromTable.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tree/TreeFiltering.html (renamed from uitest/src/com/vaadin/tests/components/tree/TreeFiltering.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tree/TreeFocusGaining.html (renamed from uitest/src/com/vaadin/tests/components/tree/TreeFocusGaining.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tree/TreeHorizontalResize.html (renamed from uitest/src/com/vaadin/tests/components/tree/TreeHorizontalResize.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tree/TreeIconUpdate.html (renamed from uitest/src/com/vaadin/tests/components/tree/TreeIconUpdate.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tree/TreeItemClickAndValueChange.html (renamed from uitest/src/com/vaadin/tests/components/tree/TreeItemClickAndValueChange.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tree/TreeKeyboardNavigationScroll.html (renamed from uitest/src/com/vaadin/tests/components/tree/TreeKeyboardNavigationScroll.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tree/TreeKeyboardNavigationValidators.html (renamed from uitest/src/com/vaadin/tests/components/tree/TreeKeyboardNavigationValidators.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tree/TreeNodeCaptionWrapping.html (renamed from uitest/src/com/vaadin/tests/components/tree/TreeNodeCaptionWrapping.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tree/TreeScrolling.html (renamed from uitest/src/com/vaadin/tests/components/tree/TreeScrolling.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tree/TreeScrollingOnSelection.html (renamed from uitest/src/com/vaadin/tests/components/tree/TreeScrollingOnSelection.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tree/TreeShiftMultiSelectNodes.html (renamed from uitest/src/com/vaadin/tests/components/tree/TreeShiftMultiSelectNodes.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tree/TreeTooltip.html (renamed from uitest/src/com/vaadin/tests/components/tree/TreeTooltip.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/tree/TreeWithIcons.html (renamed from uitest/src/com/vaadin/tests/components/tree/TreeWithIcons.html)0
-rwxr-xr-xuitest/tb2/com/vaadin/tests/components/treetable/AddItemToEmptyTreeTable.html (renamed from uitest/src/com/vaadin/tests/components/treetable/AddItemToEmptyTreeTable.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/treetable/AddNodesOnExpand.html (renamed from uitest/src/com/vaadin/tests/components/treetable/AddNodesOnExpand.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/treetable/ChangeDataSourcePageLengthZero.html (renamed from uitest/src/com/vaadin/tests/components/treetable/ChangeDataSourcePageLengthZero.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/treetable/ComponentsInTreeTable.html (renamed from uitest/src/com/vaadin/tests/components/treetable/ComponentsInTreeTable.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/treetable/DynamicallyModified.html (renamed from uitest/src/com/vaadin/tests/components/treetable/DynamicallyModified.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/treetable/EmptyingTreeTableTest.html (renamed from uitest/src/com/vaadin/tests/components/treetable/EmptyingTreeTableTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/treetable/ExpandAndCollapseListeners.html (renamed from uitest/src/com/vaadin/tests/components/treetable/ExpandAndCollapseListeners.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/treetable/KeepAllItemsVisible.html (renamed from uitest/src/com/vaadin/tests/components/treetable/KeepAllItemsVisible.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/treetable/ProgrammaticCollapse.html (renamed from uitest/src/com/vaadin/tests/components/treetable/ProgrammaticCollapse.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/treetable/RemoveAllItemsRefresh.html (renamed from uitest/src/com/vaadin/tests/components/treetable/RemoveAllItemsRefresh.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/treetable/RowAnimation.html (renamed from uitest/src/com/vaadin/tests/components/treetable/RowAnimation.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/treetable/TreeTableExpandWithRowStyle.html (renamed from uitest/src/com/vaadin/tests/components/treetable/TreeTableExpandWithRowStyle.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/treetable/TreeTableExtraScrollBarWithChildren.html (renamed from uitest/src/com/vaadin/tests/components/treetable/TreeTableExtraScrollBarWithChildren.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/treetable/TreeTableExtraScrollbar.html (renamed from uitest/src/com/vaadin/tests/components/treetable/TreeTableExtraScrollbar.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/treetable/TreeTableGeneratedColumns.html (renamed from uitest/src/com/vaadin/tests/components/treetable/TreeTableGeneratedColumns.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/treetable/TreeTableGeneratedRows.html (renamed from uitest/src/com/vaadin/tests/components/treetable/TreeTableGeneratedRows.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/treetable/TreeTableInternalError.html (renamed from uitest/src/com/vaadin/tests/components/treetable/TreeTableInternalError.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/treetable/TreeTableSetCollapsed.html (renamed from uitest/src/com/vaadin/tests/components/treetable/TreeTableSetCollapsed.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/twincolselect/TwinColSelectParentDisabled.html (renamed from uitest/src/com/vaadin/tests/components/twincolselect/TwinColSelectParentDisabled.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/twincolselect/TwinColSelectSelection.html (renamed from uitest/src/com/vaadin/tests/components/twincolselect/TwinColSelectSelection.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/ui/ChangeFragmentOnServerToMatchClient.html (renamed from uitest/src/com/vaadin/tests/components/ui/ChangeFragmentOnServerToMatchClient.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/ui/CurrentUiRetained.html (renamed from uitest/src/com/vaadin/tests/components/ui/CurrentUiRetained.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/ui/CustomUITest.html (renamed from uitest/src/com/vaadin/tests/components/ui/CustomUITest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/ui/EmptyWindow.html (renamed from uitest/src/com/vaadin/tests/components/ui/EmptyWindow.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/ui/FragmentChangeEvents.html (renamed from uitest/src/com/vaadin/tests/components/ui/FragmentChangeEvents.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/ui/IdOverrideTest.html (renamed from uitest/src/com/vaadin/tests/components/ui/IdOverrideTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/ui/InitiallyEmptyFragment.html (renamed from uitest/src/com/vaadin/tests/components/ui/InitiallyEmptyFragment.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/ui/LazyInitUIs.html (renamed from uitest/src/com/vaadin/tests/components/ui/LazyInitUIs.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/ui/PollListenerTest.html (renamed from uitest/src/com/vaadin/tests/components/ui/PollListenerTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/ui/RpcInvocationHandlerToString.html (renamed from uitest/src/com/vaadin/tests/components/ui/RpcInvocationHandlerToString.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/ui/TestUITheme.html (renamed from uitest/src/com/vaadin/tests/components/ui/TestUITheme.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/ui/UIAccessExceptionHandling.html (renamed from uitest/src/com/vaadin/tests/components/ui/UIAccessExceptionHandling.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/ui/UIInitBrowserDetails.html (renamed from uitest/src/com/vaadin/tests/components/ui/UIInitBrowserDetails.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/ui/UIInitException.html (renamed from uitest/src/com/vaadin/tests/components/ui/UIInitException.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/ui/UIPolling.html (renamed from uitest/src/com/vaadin/tests/components/ui/UIPolling.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/ui/UITabIndex.html (renamed from uitest/src/com/vaadin/tests/components/ui/UITabIndex.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/ui/UIsInMultipleTabs.html (renamed from uitest/src/com/vaadin/tests/components/ui/UIsInMultipleTabs.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/uitest/base_theme_test.html (renamed from uitest/src/com/vaadin/tests/components/uitest/base_theme_test.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/uitest/chameleon_theme_test.html (renamed from uitest/src/com/vaadin/tests/components/uitest/chameleon_theme_test.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/uitest/liferay_theme_test.html (renamed from uitest/src/com/vaadin/tests/components/uitest/liferay_theme_test.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/uitest/reindeer_theme_test.html (renamed from uitest/src/com/vaadin/tests/components/uitest/reindeer_theme_test.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/uitest/runo_theme_test.html (renamed from uitest/src/com/vaadin/tests/components/uitest/runo_theme_test.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/window/CenteredWindowWithUndefinedSize.html (renamed from uitest/src/com/vaadin/tests/components/window/CenteredWindowWithUndefinedSize.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/window/CloseSubWindow.html (renamed from uitest/src/com/vaadin/tests/components/window/CloseSubWindow.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/window/EmbeddedInSubWindow.html (renamed from uitest/src/com/vaadin/tests/components/window/EmbeddedInSubWindow.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/window/ExtraLargeSubWindow.html (renamed from uitest/src/com/vaadin/tests/components/window/ExtraLargeSubWindow.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/window/ExtraWindowShown.html (renamed from uitest/src/com/vaadin/tests/components/window/ExtraWindowShown.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/window/RepaintWindowContents.html (renamed from uitest/src/com/vaadin/tests/components/window/RepaintWindowContents.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/window/SubWindowOrder.html (renamed from uitest/src/com/vaadin/tests/components/window/SubWindowOrder.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/window/SubWindows-runo.html (renamed from uitest/src/com/vaadin/tests/components/window/SubWindows-runo.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/window/SubWindows.html (renamed from uitest/src/com/vaadin/tests/components/window/SubWindows.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/window/UndefinedHeightSubWindowAndContent.html (renamed from uitest/src/com/vaadin/tests/components/window/UndefinedHeightSubWindowAndContent.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/window/WindowCaptionTest.html (renamed from uitest/src/com/vaadin/tests/components/window/WindowCaptionTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/window/WindowClickEvents.html (renamed from uitest/src/com/vaadin/tests/components/window/WindowClickEvents.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/window/WindowMaximizeRestoreTest.html (renamed from uitest/src/com/vaadin/tests/components/window/WindowMaximizeRestoreTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/window/WindowShouldRemoveActionHandler.html (renamed from uitest/src/com/vaadin/tests/components/window/WindowShouldRemoveActionHandler.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/window/WindowThemes.html (renamed from uitest/src/com/vaadin/tests/components/window/WindowThemes.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/components/window/WindowWithInvalidCloseListener.html (renamed from uitest/src/com/vaadin/tests/components/window/WindowWithInvalidCloseListener.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/containers/filesystemcontainer/FileSystemContainerInTreeTable.html (renamed from uitest/src/com/vaadin/tests/containers/filesystemcontainer/FileSystemContainerInTreeTable.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKey.html (renamed from uitest/src/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKey.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/converter/ConverterThatEnforcesAFormat.html (renamed from uitest/src/com/vaadin/tests/converter/ConverterThatEnforcesAFormat.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/dd/DnDOnSubtree.html (renamed from uitest/src/com/vaadin/tests/dd/DnDOnSubtree.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/dd/NotPaintedAcceptSource.html (renamed from uitest/src/com/vaadin/tests/dd/NotPaintedAcceptSource.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/debug/DebugWindowPresent.html (renamed from uitest/src/com/vaadin/tests/debug/DebugWindowPresent.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/extensions/BasicExtensionTest.html (renamed from uitest/src/com/vaadin/tests/extensions/BasicExtensionTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/extensions/JavascriptManagerTest.html (renamed from uitest/src/com/vaadin/tests/extensions/JavascriptManagerTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/fieldgroup/BooleanTextField.html (renamed from uitest/src/com/vaadin/tests/fieldgroup/BooleanTextField.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/fieldgroup/CommitHandlerFailures.html (renamed from uitest/src/com/vaadin/tests/fieldgroup/CommitHandlerFailures.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/fieldgroup/CommitWithValidationOrConversionError.html (renamed from uitest/src/com/vaadin/tests/fieldgroup/CommitWithValidationOrConversionError.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/fieldgroup/DateForm.html (renamed from uitest/src/com/vaadin/tests/fieldgroup/DateForm.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/fieldgroup/FieldGroupDiscard.html (renamed from uitest/src/com/vaadin/tests/fieldgroup/FieldGroupDiscard.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/fields/TabIndexes.html (renamed from uitest/src/com/vaadin/tests/fields/TabIndexes.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.html (renamed from uitest/src/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/layouts/CssLayoutRemoveComponent.html (renamed from uitest/src/com/vaadin/tests/layouts/CssLayoutRemoveComponent.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/layouts/GridLayoutSpanExpansion.html (renamed from uitest/src/com/vaadin/tests/layouts/GridLayoutSpanExpansion.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/layouts/MarginWithExpandRatio.html (renamed from uitest/src/com/vaadin/tests/layouts/MarginWithExpandRatio.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/layouts/MovingComponentsWhileOldParentInvisible.html (renamed from uitest/src/com/vaadin/tests/layouts/MovingComponentsWhileOldParentInvisible.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/layouts/MovingInvisibleField.html (renamed from uitest/src/com/vaadin/tests/layouts/MovingInvisibleField.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/layouts/TreeWithBordersInLayout.html (renamed from uitest/src/com/vaadin/tests/layouts/TreeWithBordersInLayout.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/layouts/VerticalLayoutSlotExpansionAndAlignment.html (renamed from uitest/src/com/vaadin/tests/layouts/VerticalLayoutSlotExpansionAndAlignment.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/navigator/NavigatorTest.html (renamed from uitest/src/com/vaadin/tests/navigator/NavigatorTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/requesthandlers/AppResource404.html (renamed from uitest/src/com/vaadin/tests/requesthandlers/AppResource404.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/serialization/ChangeStateWhenReattaching.html (renamed from uitest/src/com/vaadin/tests/serialization/ChangeStateWhenReattaching.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/serialization/DelegateToWidgetTest.html (renamed from uitest/src/com/vaadin/tests/serialization/DelegateToWidgetTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/serialization/DelegateWithoutStateClass.html (renamed from uitest/src/com/vaadin/tests/serialization/DelegateWithoutStateClass.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/serialization/SerializerNamespaceTest.html (renamed from uitest/src/com/vaadin/tests/serialization/SerializerNamespaceTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/themes/CSSInjectTest.html (renamed from uitest/src/com/vaadin/tests/themes/CSSInjectTest.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/vaadincontext/BootstrapModifyUI.html (renamed from uitest/src/com/vaadin/tests/vaadincontext/BootstrapModifyUI.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/validation/EmptyFieldErrorIndicators.html (renamed from uitest/src/com/vaadin/tests/validation/EmptyFieldErrorIndicators.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/validation/ValidationOfRequiredEmptyFields.html (renamed from uitest/src/com/vaadin/tests/validation/ValidationOfRequiredEmptyFields.html)0
-rw-r--r--uitest/tb2/com/vaadin/tests/widgetset/server/ReplaceComponent.html (renamed from uitest/src/com/vaadin/tests/widgetset/server/ReplaceComponent.html)0
-rw-r--r--uitest/test.xml2
739 files changed, 10607 insertions, 658 deletions
diff --git a/WebContent/VAADIN/themes/valo/components/_valo-menu.scss b/WebContent/VAADIN/themes/valo/components/_valo-menu.scss
index 5ed125b909..2d37b27773 100644
--- a/WebContent/VAADIN/themes/valo/components/_valo-menu.scss
+++ b/WebContent/VAADIN/themes/valo/components/_valo-menu.scss
@@ -152,7 +152,7 @@ $valo-menu-background-color: scale-color($v-app-background-color, $lightness: if
* @group valo-menu
*/
@mixin valo-menu-responsive {
- .v-ui {
+ .v-ui.valo-menu-responsive {
@include width-range($min: 801px, $max: 1100px) {
.valo-menu-part {
@include valo-menu-large-icons-style($valo-menu-background-color);
diff --git a/WebContent/release-notes.html b/WebContent/release-notes.html
index c22f0e5ed4..d02e0eeb37 100644
--- a/WebContent/release-notes.html
+++ b/WebContent/release-notes.html
@@ -67,7 +67,7 @@
<h2 id="overview">Overview of Vaadin @version@ Release</h2>
<p>
- Vaadin @version@ is a maintenance release that includes a
+ Vaadin @version@ is a feature release that includes a
number of new features and bug fixes, as listed in the <a
href="#enhancements">list of enhancements</a> and <a
href="#changelog">change log</a> below.
@@ -97,31 +97,43 @@
enhancements. Below is a list of the most notable changes:</p>
<ul>
- <li>Grid</li>
+ <li>Grid is a new component for showing tabular data. It has been
+ designed from the ground up to eventually replace the Table
+ and TreeTable components.<br />
+ The most notable Grid features in @version-minor@ are:
+ <ul>
+ <li>Support for multiple rows in the header and footer sections.</li>
+ <li>Renderer concept for customizing how the data in a given column is represented in the browser.</li>
+ <li>Support for frozen columns.</li>
+ <li>Support for inline editing of one row at a time.</li>
+ <li>Support for components in header and footer cells.</li>
+ <li>Hardware accelerated, touch optimized scrolling.</li>
+ </ul></li>
+ <li>Declarative layout support for initializing a component hierarchy from an HTML file.</li>
+ <li>Uses GWT 2.7 for improved compilation times when using Super Dev Mode.</li>
+ <li>@Viewport annotation for declaratively defining a mobile viewport definition for a UI.</li>
+ <li>Captions can be configured to be displayed as HTML.</li>
+ <li>Selects use converters when presenting itemids.</li>
+ <li>Improved performance when server response contains no visual changing (e.g. empty polling responses).</li>
+ <li>Unified JSON library for using the same API in both server-side and client-side code.</li>
+ <li>Range validators and converters for additional numerical types.</li>
+ <li>Support for fine grained add/remove item events in in-memory containers.</li>
</ul>
<p>
- For enhancements introduced in Vaadin 7.2, see the <a
- href="http://vaadin.com/download/release/7.2/7.2.0/release-notes.html">Release
- Notes for Vaadin 7.2.0</a>.
+ For enhancements introduced in Vaadin 7.3, see the <a
+ href="http://vaadin.com/download/release/7.3/7.3.0/release-notes.html">Release
+ Notes for Vaadin 7.3.0</a>.
</p>
<h3 id="incompatible">Incompatible or behavior-altering changes in @version-minor@</h3>
<ul>
<li>
- <p>The shadow of all overlays (VOverlay) are now implemented with CSS box-shadow in all browsers except Internet Explorer 8 (<a href="http://dev.vaadin.com/ticket/9303">#9303</a>).
- In IE8 the old image-based implementation is still used.
- </p><p>
- The image-based shadow implementation is also deprecated, so if you have any custom shadow implementations in your themes or add-ons,
- please update them accordingly to use CSS box-shadow instead.
- </p><p>
- Note that the CSS-based implementation is visually not 100% identical to the old implementation. This should not cause issues except
- if you are using screenshot-based TestBench tests or similar visual regression tests.
- </p>
+ <p>The org.json and com.google.gwt.json libraries have been replaced by elemental.json.</p>
+ <p>JavascriptFunction.call parameter type has been changed to elemental.json.JsonArray, affecting JavaScript.addFunction, AbstractJavaScriptComponent.addFunction and AbstractJavaScriptExtension.addFunction</p>
+ <p>Raw JSON values passed to AbstractJavaScriptComponent.callFunction and AbstractJavaScriptExtension.callFunction should be changed to use elemental.json types.</p>
</li>
- <li>The theme for the debug window is now implemented using a GWT client bundle and is no longer included in the standard theme.</li>
- <li>Reverted to use JSON.org implementation of the JSON library instead of the Android implementation that was used in Vaadin 7.2.
- See <a href="licenses/the-json-license.txt">the-json-license.txt</a> for information about its license.</li>
+ <li>Support for Opera 12 has been dropped. Newer versions based on the Blink rendering engine are still supported.</li>
</ul>
<h3 id="knownissues">Known issues</h3>
<ul>
@@ -497,12 +509,12 @@
</p>
<ul>
- <li>Mozilla Firefox 18-33</li>
+ <li>Mozilla Firefox 18-34</li>
<li>Mozilla Firefox 17 ESR, 24 ESR, 31 ESR</li>
<li>Internet Explorer 8-11</li>
<li>Safari 6-8</li>
- <li>Opera 12, 16-25</li>
- <li>Google Chrome 23-38</li>
+ <li>Opera 16-27</li>
+ <li>Google Chrome 23-39</li>
</ul>
<p>
@@ -512,7 +524,7 @@
<ul>
<li>iOS 5-8</li>
- <li>Android 2.3-4</li>
+ <li>Android 2.3-5</li>
<li>Windows Phone 8</li>
</ul>
diff --git a/buildhelpers/src/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java b/buildhelpers/src/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java
index 64ab86b84e..5b424f98b1 100644
--- a/buildhelpers/src/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java
+++ b/buildhelpers/src/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java
@@ -132,7 +132,7 @@ public class FetchReleaseNotesTickets {
}
/**
- * @since
+ * @since 7.4
* @param string
* the string to be html-escaped
* @return string in html-escape format
diff --git a/client-compiler/build.xml b/client-compiler/build.xml
index 97189fc437..be8dec18bc 100644
--- a/client-compiler/build.xml
+++ b/client-compiler/build.xml
@@ -16,7 +16,16 @@
<path id="classpath.compile.custom">
<fileset file="${gwt.dev.jar}" />
</path>
-
+ <path id="classpath.test.custom">
+ <fileset dir="${result.dir}/classes">
+ <include name="**/*" />
+ </fileset>
+ </path>
+ <property name="extra.classes" value="**/*.properties" />
+ <!-- don't try to copy the same files twice (first from classes and then
+ from sources) in order for the build not to fail when packaging the
+ JAR -->
+ <property name="jar.exclude" value="**/*.properties" />
<union id="compiler.includes">
<union refid="client-compiler.gwt.includes" />
<fileset dir="${result.dir}">
@@ -62,8 +71,8 @@
</target>
<target name="test" depends="checkstyle">
- <!--<antcall target="common.test.run" /> -->
- <echo>WHAT? No tests for ${module.name}!</echo>
+ <antcall target="common.test.run" />
+ <!--<echo>WHAT? No tests for ${module.name}!</echo>-->
</target>
</project>
diff --git a/client-compiler/ivy.xml b/client-compiler/ivy.xml
index af60b76e22..d30dea5136 100644
--- a/client-compiler/ivy.xml
+++ b/client-compiler/ivy.xml
@@ -11,6 +11,7 @@
<conf name="build" />
<conf name="build-provided" />
<conf name="ide" visibility="private" />
+ <conf name="test" visibility="private" />
</configurations>
<publications>
<artifact type="jar" ext="jar" />
@@ -24,7 +25,7 @@
<dependency org="com.vaadin" name="vaadin-server"
rev="${vaadin.version}" conf="build" />
<dependency org="com.vaadin" name="vaadin-client"
- rev="${vaadin.version}" conf="build" />
+ rev="${vaadin.version}" conf="build,test" />
<dependency org="com.vaadin" name="vaadin-sass-compiler"
rev="${vaadin.sass.version}" conf="build,ide->default">
<!-- remove cssparser override once sass-compiler is updated -->
@@ -96,6 +97,10 @@
<dependency org="com.vaadin" name="vaadin-client-compiler-deps"
rev="1.2.0" conf="build,ide -> default" />
+ <dependency org="junit" name="junit" rev="4.11"
+ conf="test,ide -> default" />
+
+
</dependencies>
</ivy-module>
diff --git a/client-compiler/src/com/vaadin/tools/CvalChecker.java b/client-compiler/src/com/vaadin/tools/CvalChecker.java
index b3345c7658..645667be94 100644
--- a/client-compiler/src/com/vaadin/tools/CvalChecker.java
+++ b/client-compiler/src/com/vaadin/tools/CvalChecker.java
@@ -35,16 +35,17 @@ import java.util.prefs.Preferences;
import org.apache.commons.io.IOUtils;
import elemental.json.JsonException;
+import elemental.json.JsonNull;
import elemental.json.JsonObject;
import elemental.json.impl.JsonUtil;
/**
* This class is able to validate the vaadin CVAL license.
- *
+ *
* It reads the developer license file and asks the server to validate the
* licenseKey. If the license is invalid it throws an exception with the
* information about the problem and the server response.
- *
+ *
* @since 7.3
*/
public final class CvalChecker {
@@ -80,6 +81,10 @@ public final class CvalChecker {
private static <T> T get(JsonObject o, String k, Class<T> clz) {
Object ret = null;
try {
+ if (o == null || o.get(k) == null
+ || o.get(k) instanceof JsonNull) {
+ return null;
+ }
if (clz == String.class) {
ret = o.getString(k);
} else if (clz == JsonObject.class) {
@@ -299,7 +304,7 @@ public final class CvalChecker {
/**
* Given a product name returns the name of the file with the license key.
- *
+ *
* Traditionally we have delivered license keys with a name like
* 'vaadin.touchkit.developer.license' but our database product name is
* 'vaadin-touchkit' so we have to replace '-' by '.' to maintain
@@ -340,7 +345,7 @@ public final class CvalChecker {
/**
* Validate whether there is a valid license key for a product.
- *
+ *
* @param productName
* for example vaadin-touchkit
* @param productVersion
diff --git a/client-compiler/tests/src/com/vaadin/tools/CvalCheckerTest.java b/client-compiler/tests/src/com/vaadin/tools/CvalCheckerTest.java
index 2985f61631..64a38fae2e 100644
--- a/client-compiler/tests/src/com/vaadin/tools/CvalCheckerTest.java
+++ b/client-compiler/tests/src/com/vaadin/tools/CvalCheckerTest.java
@@ -66,9 +66,14 @@ public class CvalCheckerTest {
static final String responseJson = "{'licenseKey':'" + VALID_KEY + "',"
+ "'licensee':'Test User','type':'normal',"
- + "'expiredEpoch':'1893511225000'," + "'product':{'name':'"
+ + "'expiredEpoch':1893511225000," + "'product':{'name':'"
+ productNameCval + "', 'version': 2}}";
+ static final String responseJsonWithNullVersion = "{'licenseKey':'" + VALID_KEY + "',"
+ + "'licensee':'Test User','type':'normal',"
+ + "'expiredEpoch':1893511225000," + "'product':{'name':'"
+ + productNameCval + "', 'version': null}}";
+
private static ByteArrayOutputStream outContent;
// A provider returning a valid license if productKey is valid or null if
@@ -114,7 +119,7 @@ public class CvalCheckerTest {
static final CvalServer unlimitedLicenseProvider = new CvalServer() {
@Override
String askServer(String productName, String productKey, int timeout) {
- return responseJson.replaceFirst("1893511225000", "");
+ return responseJson.replaceFirst("1893511225000", "null");
}
};
// An unreachable provider
@@ -128,6 +133,14 @@ public class CvalCheckerTest {
return super.askServer(productName, productKey, 1000);
}
};
+ // A provider with 'null' in the version field
+ static final CvalServer nullVersionLicenseProvider = new CvalServer() {
+ @Override
+ String askServer(String productName, String productKey, int timeout)
+ throws IOException {
+ return responseJsonWithNullVersion;
+ }
+ };
private CvalChecker licenseChecker;
private String licenseName;
@@ -245,6 +258,7 @@ public class CvalCheckerTest {
Assert.assertTrue(cacheExists(productNameCval));
// Check an unlimited license
+ deleteCache(productNameCval);
licenseChecker.setLicenseProvider(unlimitedLicenseProvider);
licenseChecker
.validateProduct(productNameCval, "2.1", productTitleCval);
@@ -262,6 +276,12 @@ public class CvalCheckerTest {
assertEquals(productNameCval, expected.name);
}
Assert.assertTrue(cacheExists(productNameCval));
+
+ deleteCache(productNameCval);
+ licenseChecker.setLicenseProvider(nullVersionLicenseProvider);
+ licenseChecker
+ .validateProduct(productNameCval, "2.1", productTitleCval);
+ Assert.assertTrue(cacheExists(productNameCval));
}
/*
@@ -282,8 +302,7 @@ public class CvalCheckerTest {
testManifest.getMainAttributes().putValue(VAADIN_ADDON_VERSION, "2");
// Create a temporary Jar
- String tmpDir = System.getProperty("java.io.tmpdir");
- File testJarFile = new File(tmpDir + "vaadin." + productName + ".jar");
+ File testJarFile = File.createTempFile("vaadin." + productName, "jar");
testJarFile.deleteOnExit();
JarOutputStream target = new JarOutputStream(new FileOutputStream(
testJarFile), testManifest);
diff --git a/client/src/com/vaadin/client/ApplicationConfiguration.java b/client/src/com/vaadin/client/ApplicationConfiguration.java
index 4865e38a4a..0ef37df130 100644
--- a/client/src/com/vaadin/client/ApplicationConfiguration.java
+++ b/client/src/com/vaadin/client/ApplicationConfiguration.java
@@ -491,6 +491,8 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Return Atmosphere version.
*
+ * @since 7.4
+ *
* @return Atmosphere version.
*/
public String getAtmosphereVersion() {
@@ -500,6 +502,8 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Return Atmosphere JS version.
*
+ * @since 7.4
+ *
* @return Atmosphere JS version.
*/
public String getAtmosphereJSVersion() {
diff --git a/client/src/com/vaadin/client/ApplicationConnection.java b/client/src/com/vaadin/client/ApplicationConnection.java
index 741813f2a9..3b8b7ddc40 100644
--- a/client/src/com/vaadin/client/ApplicationConnection.java
+++ b/client/src/com/vaadin/client/ApplicationConnection.java
@@ -854,6 +854,7 @@ public class ApplicationConnection implements HasHandlers {
* The contents of the request to send
* @param retry
* true when a status code 0 should be retried
+ * @since 7.3.7
*/
protected void doUidlRequest(final String uri, final JsonObject payload,
final boolean retry) {
diff --git a/client/src/com/vaadin/client/Util.java b/client/src/com/vaadin/client/Util.java
index f0131f0690..783d6db36f 100644
--- a/client/src/com/vaadin/client/Util.java
+++ b/client/src/com/vaadin/client/Util.java
@@ -1330,6 +1330,8 @@ public class Util {
/**
* Gets currently focused element and checks if it's editable
*
+ * @since 7.4
+ *
* @return true if focused element is editable
*/
public static boolean isFocusedElementEditable() {
diff --git a/client/src/com/vaadin/client/VCaption.java b/client/src/com/vaadin/client/VCaption.java
index becc89ce1d..eb19dedf8b 100644
--- a/client/src/com/vaadin/client/VCaption.java
+++ b/client/src/com/vaadin/client/VCaption.java
@@ -22,6 +22,7 @@ import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.HasHTML;
import com.vaadin.client.communication.StateChangeEvent;
import com.vaadin.client.ui.AbstractFieldConnector;
import com.vaadin.client.ui.Icon;
@@ -60,6 +61,8 @@ public class VCaption extends HTML {
private TooltipInfo tooltipInfo = null;
+ private boolean captionAsHtml = false;
+
/**
* Creates a caption that is not linked to a {@link ComponentConnector}.
*
@@ -213,7 +216,7 @@ public class VCaption extends HTML {
captionText.setInnerHTML("&nbsp;");
}
} else {
- DOM.setInnerText(captionText, c);
+ setCaptionText(captionText, owner.getState());
}
} else if (captionText != null) {
@@ -382,7 +385,11 @@ public class VCaption extends HTML {
captionText.setInnerHTML("&nbsp;");
}
} else {
- DOM.setInnerText(captionText, caption);
+ if (captionAsHtml) {
+ captionText.setInnerHTML(caption);
+ } else {
+ captionText.setInnerText(caption);
+ }
}
} else if (captionText != null) {
@@ -687,4 +694,74 @@ public class VCaption extends HTML {
return el.vOwnerPid;
}-*/;
+ /**
+ * Sets whether the caption is rendered as HTML.
+ * <p>
+ * Default is false
+ *
+ * @param captionAsHtml
+ * true if the captions are rendered as HTML, false if rendered
+ * as plain text
+ */
+ public void setCaptionAsHtml(boolean captionAsHtml) {
+ this.captionAsHtml = captionAsHtml;
+ }
+
+ /**
+ * Checks whether captions are rendered as HTML.
+ * <p>
+ * Default is false
+ *
+ * @return true if the captions are rendered as HTML, false if rendered as
+ * plain text
+ */
+ public boolean isCaptionAsHtml() {
+ return captionAsHtml;
+ }
+
+ /**
+ * Sets the text of the given caption element to the caption found in the
+ * state.
+ * <p>
+ * Uses {@link AbstractComponentState#captionAsHtml} to determine whether to
+ * set the caption as html or plain text
+ *
+ * @since 7.4
+ * @param captionElement
+ * the target element
+ * @param state
+ * the state from which to read the caption text and mode
+ */
+ public static void setCaptionText(Element captionElement,
+ AbstractComponentState state) {
+ if (state.captionAsHtml) {
+ captionElement.setInnerHTML(state.caption);
+ } else {
+ captionElement.setInnerText(state.caption);
+ }
+
+ }
+
+ /**
+ * Sets the text of the given widget to the caption found in the state.
+ * <p>
+ * Uses {@link AbstractComponentState#captionAsHtml} to determine whether to
+ * set the caption as html or plain text
+ *
+ * @since 7.4
+ * @param widget
+ * the target widget
+ * @param state
+ * the state from which to read the caption text and mode
+ */
+ public static void setCaptionText(HasHTML widget,
+ AbstractComponentState state) {
+ if (state.captionAsHtml) {
+ widget.setHTML(state.caption);
+ } else {
+ widget.setText(state.caption);
+ }
+
+ }
+
}
diff --git a/client/src/com/vaadin/client/communication/AtmospherePushConnection.java b/client/src/com/vaadin/client/communication/AtmospherePushConnection.java
index f6f888c98b..628933fd86 100644
--- a/client/src/com/vaadin/client/communication/AtmospherePushConnection.java
+++ b/client/src/com/vaadin/client/communication/AtmospherePushConnection.java
@@ -21,6 +21,7 @@ import java.util.ArrayList;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.Scheduler;
import com.google.gwt.user.client.Command;
+import com.google.gwt.user.client.Window.Location;
import com.vaadin.client.ApplicationConfiguration;
import com.vaadin.client.ApplicationConnection;
import com.vaadin.client.ApplicationConnection.CommunicationErrorHandler;
@@ -147,6 +148,10 @@ public class AtmospherePushConnection implements PushConnection {
this.errorHandler = errorHandler;
config = createConfig();
+ String debugParameter = Location.getParameter("debug");
+ if ("push".equals(debugParameter)) {
+ config.setStringValue("logLevel", "debug");
+ }
for (String param : pushConfiguration.parameters.keySet()) {
config.setStringValue(param,
pushConfiguration.parameters.get(param));
diff --git a/client/src/com/vaadin/client/componentlocator/ComponentLocator.java b/client/src/com/vaadin/client/componentlocator/ComponentLocator.java
index 52c7b57d1d..feb1c91767 100644
--- a/client/src/com/vaadin/client/componentlocator/ComponentLocator.java
+++ b/client/src/com/vaadin/client/componentlocator/ComponentLocator.java
@@ -121,7 +121,7 @@ public class ComponentLocator {
* {@link #getPathForElement(com.google.gwt.user.client.Element)} instead.
*
*
- * @since
+ * @since 7.4
* @param targetElement
* The element to generate a path for.
* @return A String locator that identifies the target element or null if a
diff --git a/client/src/com/vaadin/client/ui/VMenuBar.java b/client/src/com/vaadin/client/ui/VMenuBar.java
index 66160e691d..b5dac3f7ef 100644
--- a/client/src/com/vaadin/client/ui/VMenuBar.java
+++ b/client/src/com/vaadin/client/ui/VMenuBar.java
@@ -719,6 +719,7 @@ public class VMenuBar extends SimpleFocusablePanel implements
* enable/disable animate-in animation when hide popup
* @param animateOut
* enable/disable animate-out animation when hide popup
+ * @since 7.3.7
*/
public void hideChildren(boolean animateIn, boolean animateOut) {
if (visibleChildMenu != null) {
diff --git a/client/src/com/vaadin/client/ui/VOverlay.java b/client/src/com/vaadin/client/ui/VOverlay.java
index 9071b6ee47..9845e89dab 100644
--- a/client/src/com/vaadin/client/ui/VOverlay.java
+++ b/client/src/com/vaadin/client/ui/VOverlay.java
@@ -1019,6 +1019,7 @@ public class VOverlay extends PopupPanel implements CloseHandler<PopupPanel> {
* enable/disable animate-in animation
* @param animateOut
* enable/disable animate-out animation
+ * @since 7.3.7
*/
public void hide(final boolean autoClosed, final boolean animateIn,
final boolean animateOut) {
diff --git a/client/src/com/vaadin/client/ui/VTabsheet.java b/client/src/com/vaadin/client/ui/VTabsheet.java
index 090f83c066..10c9a332e0 100644
--- a/client/src/com/vaadin/client/ui/VTabsheet.java
+++ b/client/src/com/vaadin/client/ui/VTabsheet.java
@@ -1505,7 +1505,7 @@ public class VTabsheet extends VTabsheetBase implements Focusable, SubPartAware
/**
* Stop the command from being executed.
*
- * @since
+ * @since 7.4
*/
public void stopSchedule() {
blurSource = null;
@@ -1514,7 +1514,7 @@ public class VTabsheet extends VTabsheetBase implements Focusable, SubPartAware
/**
* Schedule the command for a deferred execution.
*
- * @since
+ * @since 7.4
*/
public void scheduleDeferred() {
Scheduler.get().scheduleDeferred(this);
diff --git a/client/src/com/vaadin/client/ui/VWindow.java b/client/src/com/vaadin/client/ui/VWindow.java
index 5c9a2ab47d..eb3c89beb0 100644
--- a/client/src/com/vaadin/client/ui/VWindow.java
+++ b/client/src/com/vaadin/client/ui/VWindow.java
@@ -872,7 +872,14 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
}
public void setCaption(String c, String iconURL) {
- String html = Util.escapeHTML(c);
+ setCaption(c, iconURL, false);
+ }
+
+ public void setCaption(String c, String iconURL, boolean asHtml) {
+ String html = c;
+ if (!asHtml) {
+ c = Util.escapeHTML(c);
+ }
// Provide information to assistive device users that a sub window was
// opened
diff --git a/client/src/com/vaadin/client/ui/button/ButtonConnector.java b/client/src/com/vaadin/client/ui/button/ButtonConnector.java
index 4220c3f5d1..2d13d62a91 100644
--- a/client/src/com/vaadin/client/ui/button/ButtonConnector.java
+++ b/client/src/com/vaadin/client/ui/button/ButtonConnector.java
@@ -26,6 +26,7 @@ import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.user.client.DOM;
import com.vaadin.client.EventHelper;
import com.vaadin.client.MouseEventDetailsBuilder;
+import com.vaadin.client.VCaption;
import com.vaadin.client.annotations.OnStateChange;
import com.vaadin.client.communication.StateChangeEvent;
import com.vaadin.client.ui.AbstractComponentConnector;
@@ -98,14 +99,9 @@ public class ButtonConnector extends AbstractComponentConnector implements
blurHandlerRegistration);
}
- @OnStateChange({ "caption", "htmlContentAllowed" })
+ @OnStateChange({ "caption", "captionAsHtml" })
void setCaption() {
- String caption = getState().caption;
- if (getState().htmlContentAllowed) {
- getWidget().setHtml(caption);
- } else {
- getWidget().setText(caption);
- }
+ VCaption.setCaptionText(getWidget().captionElement, getState());
}
@OnStateChange("iconAltText")
diff --git a/client/src/com/vaadin/client/ui/checkbox/CheckBoxConnector.java b/client/src/com/vaadin/client/ui/checkbox/CheckBoxConnector.java
index 28f6beefa6..63984ff225 100644
--- a/client/src/com/vaadin/client/ui/checkbox/CheckBoxConnector.java
+++ b/client/src/com/vaadin/client/ui/checkbox/CheckBoxConnector.java
@@ -27,6 +27,7 @@ import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Event;
import com.vaadin.client.EventHelper;
import com.vaadin.client.MouseEventDetailsBuilder;
+import com.vaadin.client.VCaption;
import com.vaadin.client.VTooltip;
import com.vaadin.client.communication.StateChangeEvent;
import com.vaadin.client.ui.AbstractFieldConnector;
@@ -109,7 +110,8 @@ public class CheckBoxConnector extends AbstractFieldConnector implements
}
// Set text
- getWidget().setText(getState().caption);
+ VCaption.setCaptionText(getWidget(), getState());
+
getWidget().setValue(getState().checked);
getWidget().immediate = getState().immediate;
}
diff --git a/client/src/com/vaadin/client/ui/colorpicker/ColorPickerAreaConnector.java b/client/src/com/vaadin/client/ui/colorpicker/ColorPickerAreaConnector.java
index 2237920cb8..355e705581 100644
--- a/client/src/com/vaadin/client/ui/colorpicker/ColorPickerAreaConnector.java
+++ b/client/src/com/vaadin/client/ui/colorpicker/ColorPickerAreaConnector.java
@@ -18,6 +18,7 @@ package com.vaadin.client.ui.colorpicker;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.user.client.ui.Widget;
+import com.vaadin.client.VCaption;
import com.vaadin.client.communication.RpcProxy;
import com.vaadin.client.ui.VColorPickerArea;
import com.vaadin.shared.ui.Connect;
@@ -55,11 +56,7 @@ public class ColorPickerAreaConnector extends AbstractColorPickerConnector {
@Override
protected void setCaption(String caption) {
- if (getState().htmlContentAllowed) {
- getWidget().setHTML(caption);
- } else {
- getWidget().setText(caption);
- }
+ VCaption.setCaptionText(getWidget(), getState());
}
@Override
diff --git a/client/src/com/vaadin/client/ui/colorpicker/ColorPickerConnector.java b/client/src/com/vaadin/client/ui/colorpicker/ColorPickerConnector.java
index 237241fe81..2f0dbd5ce7 100644
--- a/client/src/com/vaadin/client/ui/colorpicker/ColorPickerConnector.java
+++ b/client/src/com/vaadin/client/ui/colorpicker/ColorPickerConnector.java
@@ -55,7 +55,7 @@ public class ColorPickerConnector extends AbstractColorPickerConnector {
@Override
protected void setCaption(String caption) {
- if (getState().htmlContentAllowed) {
+ if (getState().captionAsHtml) {
getWidget().setHtml(caption);
} else {
getWidget().setText(caption);
diff --git a/client/src/com/vaadin/client/ui/form/FormConnector.java b/client/src/com/vaadin/client/ui/form/FormConnector.java
index 25046f8b9a..857c2bd40e 100644
--- a/client/src/com/vaadin/client/ui/form/FormConnector.java
+++ b/client/src/com/vaadin/client/ui/form/FormConnector.java
@@ -26,6 +26,7 @@ import com.vaadin.client.LayoutManager;
import com.vaadin.client.Paintable;
import com.vaadin.client.TooltipInfo;
import com.vaadin.client.UIDL;
+import com.vaadin.client.VCaption;
import com.vaadin.client.ui.AbstractComponentContainerConnector;
import com.vaadin.client.ui.ShortcutActionHandler;
import com.vaadin.client.ui.VForm;
@@ -102,7 +103,7 @@ public class FormConnector extends AbstractComponentContainerConnector
boolean legendEmpty = true;
if (getState().caption != null) {
- getWidget().caption.setInnerText(getState().caption);
+ VCaption.setCaptionText(getWidget().caption, getState());
legendEmpty = false;
} else {
getWidget().caption.setInnerText("");
diff --git a/client/src/com/vaadin/client/ui/gridlayout/GridLayoutConnector.java b/client/src/com/vaadin/client/ui/gridlayout/GridLayoutConnector.java
index 36262ef3d5..3102af8da9 100644
--- a/client/src/com/vaadin/client/ui/gridlayout/GridLayoutConnector.java
+++ b/client/src/com/vaadin/client/ui/gridlayout/GridLayoutConnector.java
@@ -185,7 +185,6 @@ public class GridLayoutConnector extends AbstractComponentContainerConnector
VCaption caption = layoutSlot.getCaption();
if (caption == null) {
caption = new VCaption(childConnector, getConnection());
-
Widget widget = childConnector.getWidget();
layout.setCaption(widget, caption);
diff --git a/client/src/com/vaadin/client/ui/link/LinkConnector.java b/client/src/com/vaadin/client/ui/link/LinkConnector.java
index 42c42cf06e..5a12445655 100644
--- a/client/src/com/vaadin/client/ui/link/LinkConnector.java
+++ b/client/src/com/vaadin/client/ui/link/LinkConnector.java
@@ -18,6 +18,7 @@ package com.vaadin.client.ui.link;
import com.google.gwt.dom.client.Style.Display;
import com.google.gwt.user.client.DOM;
+import com.vaadin.client.VCaption;
import com.vaadin.client.communication.StateChangeEvent;
import com.vaadin.client.ui.AbstractComponentConnector;
import com.vaadin.client.ui.Icon;
@@ -72,7 +73,7 @@ public class LinkConnector extends AbstractComponentConnector {
getWidget().targetHeight = getState().targetHeight;
// Set link caption
- getWidget().captionElement.setInnerText(getState().caption);
+ VCaption.setCaptionText(getWidget().captionElement, getState());
// handle error
if (null != getState().errorMessage) {
diff --git a/client/src/com/vaadin/client/ui/nativebutton/NativeButtonConnector.java b/client/src/com/vaadin/client/ui/nativebutton/NativeButtonConnector.java
index 6968f59574..2aae9beae6 100644
--- a/client/src/com/vaadin/client/ui/nativebutton/NativeButtonConnector.java
+++ b/client/src/com/vaadin/client/ui/nativebutton/NativeButtonConnector.java
@@ -22,6 +22,7 @@ import com.google.gwt.event.dom.client.FocusHandler;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.user.client.DOM;
import com.vaadin.client.EventHelper;
+import com.vaadin.client.VCaption;
import com.vaadin.client.communication.StateChangeEvent;
import com.vaadin.client.ui.AbstractComponentConnector;
import com.vaadin.client.ui.Icon;
@@ -64,11 +65,7 @@ public class NativeButtonConnector extends AbstractComponentConnector implements
blurHandlerRegistration);
// Set text
- if (getState().htmlContentAllowed) {
- getWidget().setHTML(getState().caption);
- } else {
- getWidget().setText(getState().caption);
- }
+ VCaption.setCaptionText(getWidget(), getState());
// handle error
if (null != getState().errorMessage) {
diff --git a/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java b/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java
index 0c09ae49c6..c2157650a5 100644
--- a/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java
+++ b/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java
@@ -276,7 +276,7 @@ public abstract class AbstractOrderedLayoutConnector extends
}
slot.setCaption(caption, icon, styles, error, showError, required,
- enabled);
+ enabled, child.getState().captionAsHtml);
AriaHelper.handleInputRequired(child.getWidget(), required);
AriaHelper.handleInputInvalid(child.getWidget(), showError);
diff --git a/client/src/com/vaadin/client/ui/orderedlayout/Slot.java b/client/src/com/vaadin/client/ui/orderedlayout/Slot.java
index b1d7dd2804..4b60f11ab4 100644
--- a/client/src/com/vaadin/client/ui/orderedlayout/Slot.java
+++ b/client/src/com/vaadin/client/ui/orderedlayout/Slot.java
@@ -440,7 +440,7 @@ public final class Slot extends SimplePanel {
}
/**
- * Set the caption of the slot
+ * Set the caption of the slot as text
*
* @param captionText
* The text of the caption
@@ -459,6 +459,34 @@ public final class Slot extends SimplePanel {
*/
public void setCaption(String captionText, Icon icon, List<String> styles,
String error, boolean showError, boolean required, boolean enabled) {
+ setCaption(captionText, icon, styles, error, showError, required,
+ enabled, false);
+ }
+
+ /**
+ * Set the caption of the slot
+ *
+ * @param captionText
+ * The text of the caption
+ * @param icon
+ * The icon
+ * @param styles
+ * The style names
+ * @param error
+ * The error message
+ * @param showError
+ * Should the error message be shown
+ * @param required
+ * Is the (field) required
+ * @param enabled
+ * Is the component enabled
+ * @param captionAsHtml
+ * true if the caption should be rendered as HTML, false
+ * otherwise
+ */
+ public void setCaption(String captionText, Icon icon, List<String> styles,
+ String error, boolean showError, boolean required, boolean enabled,
+ boolean captionAsHtml) {
// TODO place for optimization: check if any of these have changed
// since last time, and only run those changes
@@ -507,7 +535,11 @@ public final class Slot extends SimplePanel {
if (captionText.trim().equals("")) {
this.captionText.setInnerHTML("&nbsp;");
} else {
- this.captionText.setInnerText(captionText);
+ if (captionAsHtml) {
+ this.captionText.setInnerHTML(captionText);
+ } else {
+ this.captionText.setInnerText(captionText);
+ }
}
} else if (this.captionText != null) {
this.captionText.removeFromParent();
diff --git a/client/src/com/vaadin/client/ui/textfield/TextFieldConnector.java b/client/src/com/vaadin/client/ui/textfield/TextFieldConnector.java
index cba827bcef..1a4b64b0a6 100644
--- a/client/src/com/vaadin/client/ui/textfield/TextFieldConnector.java
+++ b/client/src/com/vaadin/client/ui/textfield/TextFieldConnector.java
@@ -87,17 +87,10 @@ public class TextFieldConnector extends AbstractFieldConnector implements
* change in the queue (in which case we count more on the server side
* value).
*/
-
- boolean valueChanged = !uidl
- .getBooleanAttribute(TextFieldConstants.ATTR_NO_VALUE_CHANGE_BETWEEN_PAINTS);
- // null check is not enough since the value is sometimes null but
- // sometimes empty. Fix for #15144
- boolean valueBeforeEditEmpty = getWidget().valueBeforeEdit == null
- || getWidget().valueBeforeEdit.isEmpty();
- boolean textDoesNotEqualOldValue = !text
- .equals(getWidget().valueBeforeEdit);
-
- if (valueChanged || valueBeforeEditEmpty || textDoesNotEqualOldValue) {
+ if (!(uidl
+ .getBooleanAttribute(TextFieldConstants.ATTR_NO_VALUE_CHANGE_BETWEEN_PAINTS)
+ && getWidget().valueBeforeEdit != null && text
+ .equals(getWidget().valueBeforeEdit))) {
getWidget().updateFieldContent(text);
}
diff --git a/common.xml b/common.xml
index 6e28ab6a60..edd941c5e3 100644
--- a/common.xml
+++ b/common.xml
@@ -386,6 +386,10 @@
<!-- Copy resources -->
<copy todir="${test.classes}" failonerror="false">
<fileset dir="${test.resources}" />
+ <!-- include html templates used in declarative tests -->
+ <fileset dir="${test.src}">
+ <include name="**/*.html"/>
+ </fileset>
</copy>
</target>
diff --git a/push/build.xml b/push/build.xml
index 0a106f5023..b7d57cf4d3 100644
--- a/push/build.xml
+++ b/push/build.xml
@@ -16,7 +16,7 @@
<property name="vaadinPush.debug.js" location="${result.dir}/js/VAADIN/vaadinPush.debug.js" />
<!-- Keep the version number in sync with ivy.xml, server/src/com/vaadin/server/Constants.java -->
- <property name="atmosphere.runtime.version" value="2.1.2.vaadin6" />
+ <property name="atmosphere.runtime.version" value="2.2.4.vaadin2" />
<property name="jquery.js" location="lib/jquery/jquery-1.11.0.js" />
<path id="classpath.compile.custom" />
diff --git a/push/ivy.xml b/push/ivy.xml
index fef53b4c9b..b899b34af7 100644
--- a/push/ivy.xml
+++ b/push/ivy.xml
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ivy-module [
<!-- Keep the version number in sync with build.xml -->
- <!ENTITY atmosphere.runtime.version "2.1.2.vaadin6">
+ <!ENTITY atmosphere.runtime.version "2.2.4.vaadin2">
- <!ENTITY atmosphere.js.version "2.1.5.vaadin4">
+ <!ENTITY atmosphere.js.version "2.2.6.vaadin3">
]>
<ivy-module version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
diff --git a/server/ivy.xml b/server/ivy.xml
index 73384313a1..2901be8090 100644
--- a/server/ivy.xml
+++ b/server/ivy.xml
@@ -60,7 +60,7 @@
</dependency>
<!-- Jsoup for BootstrapHandler -->
- <dependency org="org.jsoup" name="jsoup" rev="1.6.3"
+ <dependency org="org.jsoup" name="jsoup" rev="1.8.1"
conf="build,ide,test -> default" />
<!-- TESTING DEPENDENCIES -->
diff --git a/server/src/com/vaadin/annotations/DesignRoot.java b/server/src/com/vaadin/annotations/DesignRoot.java
new file mode 100644
index 0000000000..a00a00dc0b
--- /dev/null
+++ b/server/src/com/vaadin/annotations/DesignRoot.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import com.vaadin.ui.declarative.Design;
+
+/**
+ * Marks the component as the root of a design (html) file.
+ * <p>
+ * Used together with {@link Design#read(com.vaadin.ui.Component)} to be able
+ * the load the design without further configuration. The design is loaded from
+ * the same package as the annotated class and by default the design filename is
+ * derived from the class name. Using the {@link #value()} parameter you can
+ * specify another design file name.
+ *
+ * @since 7.4
+ * @author Vaadin Ltd
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface DesignRoot {
+ String value() default "";
+}
diff --git a/server/src/com/vaadin/annotations/Viewport.java b/server/src/com/vaadin/annotations/Viewport.java
new file mode 100644
index 0000000000..c5b0abd56f
--- /dev/null
+++ b/server/src/com/vaadin/annotations/Viewport.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.annotations;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Defines a viewport tag that will be added to the HTML of the host page of a
+ * UI class.
+ * <p>
+ * If you want to dynamically provide different viewport values for different
+ * browser, you should use {@link ViewportGeneratorClass} instead.
+ *
+ * @since 7.4
+ *
+ * @author Vaadin Ltd
+ */
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+@Inherited
+@Documented
+public @interface Viewport {
+ /**
+ * Gets the viewport tag content.
+ *
+ * @return the viewport tag content
+ */
+ public String value();
+}
diff --git a/server/src/com/vaadin/annotations/ViewportGeneratorClass.java b/server/src/com/vaadin/annotations/ViewportGeneratorClass.java
new file mode 100644
index 0000000000..aec7ac07e6
--- /dev/null
+++ b/server/src/com/vaadin/annotations/ViewportGeneratorClass.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.annotations;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import com.vaadin.server.ViewportGenerator;
+
+/**
+ * Defines a viewport tag generator class that will be used for generating the
+ * content of a viewport tag that will be added to the HTML of the host page of
+ * a UI class.
+ * <p>
+ * If you want to use the same viewport values for all requests, you can use the
+ * simpler {@link Viewport} annotation instead.
+ *
+ * @see ViewportGenerator
+ *
+ * @since 7.4
+ *
+ * @author Vaadin Ltd
+ */
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+@Inherited
+@Documented
+public @interface ViewportGeneratorClass {
+ /**
+ * Gets the viewport generator class to use. Please note that the class must
+ * be public and have a default constructor. It must additionally be
+ * declared as static if it's declared as an inner class.
+ *
+ * @return the viewport generator class
+ */
+ public Class<? extends ViewportGenerator> value();
+}
diff --git a/server/src/com/vaadin/data/fieldgroup/DefaultFieldGroupFieldFactory.java b/server/src/com/vaadin/data/fieldgroup/DefaultFieldGroupFieldFactory.java
index 9c2e4b2f83..98fed3ad01 100644
--- a/server/src/com/vaadin/data/fieldgroup/DefaultFieldGroupFieldFactory.java
+++ b/server/src/com/vaadin/data/fieldgroup/DefaultFieldGroupFieldFactory.java
@@ -52,6 +52,13 @@ public class DefaultFieldGroupFieldFactory implements FieldGroupFieldFactory {
protected DefaultFieldGroupFieldFactory() {
}
+ /**
+ * Gets the singleton instance.
+ *
+ * @since 7.4
+ *
+ * @return the singleton instance
+ */
public static DefaultFieldGroupFieldFactory get() {
return INSTANCE;
}
diff --git a/server/src/com/vaadin/data/fieldgroup/FieldGroup.java b/server/src/com/vaadin/data/fieldgroup/FieldGroup.java
index 7e96e9e882..1b598ef720 100644
--- a/server/src/com/vaadin/data/fieldgroup/FieldGroup.java
+++ b/server/src/com/vaadin/data/fieldgroup/FieldGroup.java
@@ -1167,7 +1167,7 @@ public class FieldGroup implements Serializable {
/**
* Clears the value of all fields.
*
- * @since
+ * @since 7.4
*/
public void clear() {
for (Field<?> f : getFields()) {
diff --git a/server/src/com/vaadin/data/util/AbstractInMemoryContainer.java b/server/src/com/vaadin/data/util/AbstractInMemoryContainer.java
index 5ddc11ec6f..f0d0d63973 100644
--- a/server/src/com/vaadin/data/util/AbstractInMemoryContainer.java
+++ b/server/src/com/vaadin/data/util/AbstractInMemoryContainer.java
@@ -979,7 +979,9 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
* Notify item set change listeners that an item has been added to the
* container.
*
- * @param postion
+ * @since 7.4
+ *
+ * @param position
* position of the added item in the view
* @param itemId
* id of the added item
@@ -1012,9 +1014,11 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
* Notify item set change listeners that an item has been removed from the
* container.
*
- * @param position
- * position of the removed item in the view prior to removal
+ * @since 7.4
*
+ * @param position
+ * position of the removed item in the view prior to removal (if
+ * was visible)
* @param itemId
* id of the removed item, of type {@link Object} to satisfy
* {@link Container#removeItem(Object)} API
diff --git a/server/src/com/vaadin/data/util/BeanItem.java b/server/src/com/vaadin/data/util/BeanItem.java
index 1be8b70f47..71f51c3feb 100644
--- a/server/src/com/vaadin/data/util/BeanItem.java
+++ b/server/src/com/vaadin/data/util/BeanItem.java
@@ -74,6 +74,8 @@ public class BeanItem<BT> extends PropertysetItem {
* <code>are</code> methods are not supported.
* </p>
*
+ * @since 7.4
+ *
* @param bean
* the Java Bean to copy properties from.
* @param beanClass
diff --git a/server/src/com/vaadin/data/util/BeanUtil.java b/server/src/com/vaadin/data/util/BeanUtil.java
index e2f85a765c..1356cf5359 100644
--- a/server/src/com/vaadin/data/util/BeanUtil.java
+++ b/server/src/com/vaadin/data/util/BeanUtil.java
@@ -27,6 +27,8 @@ import java.util.List;
/**
* Utility class for Java Beans information access.
*
+ * @since 7.4
+ *
* @author Vaadin Ltd
*/
public final class BeanUtil implements Serializable {
diff --git a/server/src/com/vaadin/data/util/converter/StringToBigIntegerConverter.java b/server/src/com/vaadin/data/util/converter/StringToBigIntegerConverter.java
index d176ac2e0d..6695aa71ac 100644
--- a/server/src/com/vaadin/data/util/converter/StringToBigIntegerConverter.java
+++ b/server/src/com/vaadin/data/util/converter/StringToBigIntegerConverter.java
@@ -33,7 +33,7 @@ import java.util.Locale;
* </p>
*
* @author Vaadin Ltd
- * @since
+ * @since 7.4
*/
public class StringToBigIntegerConverter extends
AbstractStringToNumberConverter<BigInteger> {
diff --git a/server/src/com/vaadin/data/util/converter/StringToByteConverter.java b/server/src/com/vaadin/data/util/converter/StringToByteConverter.java
index 26f52d108a..719fced0ed 100644
--- a/server/src/com/vaadin/data/util/converter/StringToByteConverter.java
+++ b/server/src/com/vaadin/data/util/converter/StringToByteConverter.java
@@ -28,7 +28,7 @@ import java.util.Locale;
* </p>
*
* @author Vaadin Ltd
- * @since
+ * @since 7.4
*/
public class StringToByteConverter extends
AbstractStringToNumberConverter<Byte> {
diff --git a/server/src/com/vaadin/data/util/converter/StringToEnumConverter.java b/server/src/com/vaadin/data/util/converter/StringToEnumConverter.java
index e91dd2a303..96fdc7baa8 100644
--- a/server/src/com/vaadin/data/util/converter/StringToEnumConverter.java
+++ b/server/src/com/vaadin/data/util/converter/StringToEnumConverter.java
@@ -27,7 +27,7 @@ import java.util.Locale;
* </p>
*
* @author Vaadin Ltd
- * @since
+ * @since 7.4
*/
public class StringToEnumConverter implements Converter<String, Enum> {
diff --git a/server/src/com/vaadin/data/util/converter/StringToShortConverter.java b/server/src/com/vaadin/data/util/converter/StringToShortConverter.java
index 4ee085286f..554b958ee0 100644
--- a/server/src/com/vaadin/data/util/converter/StringToShortConverter.java
+++ b/server/src/com/vaadin/data/util/converter/StringToShortConverter.java
@@ -28,7 +28,7 @@ import java.util.Locale;
* </p>
*
* @author Vaadin Ltd
- * @since
+ * @since 7.4
*/
public class StringToShortConverter extends
AbstractStringToNumberConverter<Short> {
diff --git a/server/src/com/vaadin/data/validator/BigDecimalRangeValidator.java b/server/src/com/vaadin/data/validator/BigDecimalRangeValidator.java
index 9b1d2bb565..1363d230f6 100644
--- a/server/src/com/vaadin/data/validator/BigDecimalRangeValidator.java
+++ b/server/src/com/vaadin/data/validator/BigDecimalRangeValidator.java
@@ -21,7 +21,7 @@ import java.math.BigDecimal;
* Validator for validating that an {@link BigDecimal} is inside a given range.
*
* @author Vaadin Ltd.
- * @since
+ * @since 7.4
*/
@SuppressWarnings("serial")
public class BigDecimalRangeValidator extends RangeValidator<BigDecimal> {
diff --git a/server/src/com/vaadin/data/validator/BigIntegerRangeValidator.java b/server/src/com/vaadin/data/validator/BigIntegerRangeValidator.java
index bfe9dadc3f..ecf1990192 100644
--- a/server/src/com/vaadin/data/validator/BigIntegerRangeValidator.java
+++ b/server/src/com/vaadin/data/validator/BigIntegerRangeValidator.java
@@ -21,7 +21,7 @@ import java.math.BigInteger;
* Validator for validating that an {@link BigInteger} is inside a given range.
*
* @author Vaadin Ltd.
- * @since
+ * @since 7.4
*/
@SuppressWarnings("serial")
public class BigIntegerRangeValidator extends RangeValidator<BigInteger> {
diff --git a/server/src/com/vaadin/data/validator/ByteRangeValidator.java b/server/src/com/vaadin/data/validator/ByteRangeValidator.java
index c09a290d8a..b147212c06 100644
--- a/server/src/com/vaadin/data/validator/ByteRangeValidator.java
+++ b/server/src/com/vaadin/data/validator/ByteRangeValidator.java
@@ -19,7 +19,7 @@ package com.vaadin.data.validator;
* Validator for validating that an {@link Byte} is inside a given range.
*
* @author Vaadin Ltd.
- * @since
+ * @since 7.4
*/
@SuppressWarnings("serial")
public class ByteRangeValidator extends RangeValidator<Byte> {
diff --git a/server/src/com/vaadin/data/validator/FloatRangeValidator.java b/server/src/com/vaadin/data/validator/FloatRangeValidator.java
index 903c8c475f..ee29cf16b1 100644
--- a/server/src/com/vaadin/data/validator/FloatRangeValidator.java
+++ b/server/src/com/vaadin/data/validator/FloatRangeValidator.java
@@ -19,7 +19,7 @@ package com.vaadin.data.validator;
* Validator for validating that a {@link Float} is inside a given range.
*
* @author Vaadin Ltd.
- * @since
+ * @since 7.4
*/
@SuppressWarnings("serial")
public class FloatRangeValidator extends RangeValidator<Float> {
diff --git a/server/src/com/vaadin/data/validator/LongRangeValidator.java b/server/src/com/vaadin/data/validator/LongRangeValidator.java
index 829b37e37b..c4d8a9c9ca 100644
--- a/server/src/com/vaadin/data/validator/LongRangeValidator.java
+++ b/server/src/com/vaadin/data/validator/LongRangeValidator.java
@@ -19,7 +19,7 @@ package com.vaadin.data.validator;
* Validator for validating that an {@link Long} is inside a given range.
*
* @author Vaadin Ltd.
- * @since
+ * @since 7.4
*/
@SuppressWarnings("serial")
public class LongRangeValidator extends RangeValidator<Long> {
diff --git a/server/src/com/vaadin/data/validator/ShortRangeValidator.java b/server/src/com/vaadin/data/validator/ShortRangeValidator.java
index 70e0b7c1e8..a8b0d3aeb4 100644
--- a/server/src/com/vaadin/data/validator/ShortRangeValidator.java
+++ b/server/src/com/vaadin/data/validator/ShortRangeValidator.java
@@ -19,7 +19,7 @@ package com.vaadin.data.validator;
* Validator for validating that an {@link Short} is inside a given range.
*
* @author Vaadin Ltd.
- * @since
+ * @since 7.4
*/
@SuppressWarnings("serial")
public class ShortRangeValidator extends RangeValidator<Short> {
diff --git a/server/src/com/vaadin/server/AbstractDeploymentConfiguration.java b/server/src/com/vaadin/server/AbstractDeploymentConfiguration.java
index 43d4570d90..2554e421c8 100644
--- a/server/src/com/vaadin/server/AbstractDeploymentConfiguration.java
+++ b/server/src/com/vaadin/server/AbstractDeploymentConfiguration.java
@@ -19,6 +19,8 @@ package com.vaadin.server;
* An abstract base class for DeploymentConfiguration implementations. This
* class provides default implementation for common config properties.
*
+ * @since 7.4
+ *
* @author Vaadin Ltd
*/
public abstract class AbstractDeploymentConfiguration implements
diff --git a/server/src/com/vaadin/server/AbstractExtension.java b/server/src/com/vaadin/server/AbstractExtension.java
index 6395daebd1..c72cc9cb39 100644
--- a/server/src/com/vaadin/server/AbstractExtension.java
+++ b/server/src/com/vaadin/server/AbstractExtension.java
@@ -45,7 +45,7 @@ public abstract class AbstractExtension extends AbstractClientConnector
/**
* Creates a new extension instance that extends the provided connector.
*
- * @since
+ * @since 7.4
*
* @param target
* the connector to extend
diff --git a/server/src/com/vaadin/server/AbstractJavaScriptExtension.java b/server/src/com/vaadin/server/AbstractJavaScriptExtension.java
index 2f2752c317..e182319c85 100644
--- a/server/src/com/vaadin/server/AbstractJavaScriptExtension.java
+++ b/server/src/com/vaadin/server/AbstractJavaScriptExtension.java
@@ -138,7 +138,7 @@ public abstract class AbstractJavaScriptExtension extends AbstractExtension {
/**
* Creates a new JavaScript extension extending the provided connector.
*
- * @since
+ * @since 7.4
*
* @param target
* the connector to extend
diff --git a/server/src/com/vaadin/server/BootstrapHandler.java b/server/src/com/vaadin/server/BootstrapHandler.java
index c34e986fce..985d7ef765 100644
--- a/server/src/com/vaadin/server/BootstrapHandler.java
+++ b/server/src/com/vaadin/server/BootstrapHandler.java
@@ -37,6 +37,8 @@ import org.jsoup.nodes.Element;
import org.jsoup.nodes.Node;
import org.jsoup.parser.Tag;
+import com.vaadin.annotations.Viewport;
+import com.vaadin.annotations.ViewportGeneratorClass;
import com.vaadin.shared.ApplicationConstants;
import com.vaadin.shared.Version;
import com.vaadin.shared.communication.PushMode;
@@ -48,10 +50,10 @@ import elemental.json.JsonObject;
import elemental.json.impl.JsonUtil;
/**
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
- *
+ *
* @deprecated As of 7.0. Will likely change or be removed in a future version
*/
@Deprecated
@@ -287,6 +289,40 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler {
head.appendElement("meta").attr("http-equiv", "X-UA-Compatible")
.attr("content", "IE=11;chrome=1");
+ Class<? extends UI> uiClass = context.getUIClass();
+
+ String viewportContent = null;
+ Viewport viewportAnnotation = uiClass.getAnnotation(Viewport.class);
+ ViewportGeneratorClass viewportGeneratorClassAnnotation = uiClass
+ .getAnnotation(ViewportGeneratorClass.class);
+ if (viewportAnnotation != null
+ && viewportGeneratorClassAnnotation != null) {
+ throw new IllegalStateException(uiClass.getCanonicalName()
+ + " cannot be annotated with both @"
+ + Viewport.class.getSimpleName() + " and @"
+ + ViewportGeneratorClass.class.getSimpleName());
+ }
+
+ if (viewportAnnotation != null) {
+ viewportContent = viewportAnnotation.value();
+ } else if (viewportGeneratorClassAnnotation != null) {
+ Class<? extends ViewportGenerator> viewportGeneratorClass = viewportGeneratorClassAnnotation
+ .value();
+ try {
+ viewportContent = viewportGeneratorClass.newInstance()
+ .getViewport(context.getRequest());
+ } catch (Exception e) {
+ throw new RuntimeException(
+ "Error processing viewport generator "
+ + viewportGeneratorClass.getCanonicalName(), e);
+ }
+ }
+
+ if (viewportContent != null) {
+ head.appendElement("meta").attr("name", "viewport")
+ .attr("content", viewportContent);
+ }
+
String title = response.getUIProvider().getPageTitle(
new UICreateEvent(context.getRequest(), context.getUIClass()));
if (title != null) {
@@ -339,9 +375,9 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler {
* Override this method if you want to add some custom html around around
* the div element into which the actual Vaadin application will be
* rendered.
- *
+ *
* @param context
- *
+ *
* @throws IOException
*/
private void setupMainDiv(BootstrapContext context) throws IOException {
@@ -553,13 +589,13 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler {
/**
* Get the URI for the application theme.
- *
+ *
* A portal-wide default theme is fetched from the portal shared resource
* directory (if any), other themes from the portlet.
- *
+ *
* @param context
* @param themeName
- *
+ *
* @return
*/
public String getThemeUri(BootstrapContext context, String themeName) {
@@ -572,7 +608,7 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler {
/**
* Override if required
- *
+ *
* @param context
* @return
*/
@@ -584,7 +620,7 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler {
/**
* Don not override.
- *
+ *
* @param context
* @return
*/
diff --git a/server/src/com/vaadin/server/BrowserWindowOpener.java b/server/src/com/vaadin/server/BrowserWindowOpener.java
index 8cc1faa728..c1b8cbe91e 100644
--- a/server/src/com/vaadin/server/BrowserWindowOpener.java
+++ b/server/src/com/vaadin/server/BrowserWindowOpener.java
@@ -130,6 +130,8 @@ public class BrowserWindowOpener extends AbstractExtension {
* be opened in a new browser window/tab when the extended component is
* clicked.
*
+ * @since 7.4
+ *
* @param url
* URL to open
*/
@@ -142,6 +144,8 @@ public class BrowserWindowOpener extends AbstractExtension {
* {@code resource} will be opened in a new browser window/tab when the
* extended component is clicked.
*
+ * @since 7.4
+ *
* @param resource
* resource to open
*/
@@ -152,6 +156,8 @@ public class BrowserWindowOpener extends AbstractExtension {
/**
* Returns the resource for this instance.
*
+ * @since 7.4
+ *
* @return resource to open browser window
*/
public Resource getResource() {
@@ -163,6 +169,8 @@ public class BrowserWindowOpener extends AbstractExtension {
* {@code null} if this instance is not URL resource based (a non URL based
* resource has been set for it).
*
+ * @since 7.4
+ *
* @return URL to open in the new browser window/tab when the extended
* component is clicked
*/
diff --git a/server/src/com/vaadin/server/Constants.java b/server/src/com/vaadin/server/Constants.java
index 5841bfac4d..02a992a882 100644
--- a/server/src/com/vaadin/server/Constants.java
+++ b/server/src/com/vaadin/server/Constants.java
@@ -67,7 +67,7 @@ public interface Constants {
// Keep the version number in sync with push/build.xml and other locations
// listed in that file
- static final String REQUIRED_ATMOSPHERE_RUNTIME_VERSION = "2.1.2.vaadin6";
+ static final String REQUIRED_ATMOSPHERE_RUNTIME_VERSION = "2.2.4.vaadin2";
static final String INVALID_ATMOSPHERE_VERSION_WARNING = "\n"
+ "=================================================================\n"
diff --git a/server/src/com/vaadin/server/DeploymentConfiguration.java b/server/src/com/vaadin/server/DeploymentConfiguration.java
index 3124729773..3c20518c39 100644
--- a/server/src/com/vaadin/server/DeploymentConfiguration.java
+++ b/server/src/com/vaadin/server/DeploymentConfiguration.java
@@ -166,12 +166,16 @@ public interface DeploymentConfiguration extends Serializable {
* Gets UI class configuration option value.
*
* @return UI class name
+ *
+ * @since 7.4
*/
public String getUIClassName();
/**
* Gets UI provider class configuration option value.
*
+ * @since 7.4
+ *
* @return UI class name
*/
public String getUIProviderClassName();
@@ -180,17 +184,23 @@ public interface DeploymentConfiguration extends Serializable {
* Gets Widgetset configuration option value. {@code defaultValue} is
* returned if widgetset parameter is not configured.
*
+ * @since 7.4
+ *
* @return UI class name
*/
public String getWidgetset(String defaultValue);
/**
* Gets resources path configuration option value.
+ *
+ * @since 7.4
*/
public String getResourcesPath();
/**
* Gets class loader configuration option value.
+ *
+ * @since 7.4
*/
public String getClassLoaderName();
diff --git a/server/src/com/vaadin/server/SizeWithUnit.java b/server/src/com/vaadin/server/SizeWithUnit.java
new file mode 100644
index 0000000000..4c3c51eaec
--- /dev/null
+++ b/server/src/com/vaadin/server/SizeWithUnit.java
@@ -0,0 +1,127 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.server;
+
+import java.io.Serializable;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import com.vaadin.server.Sizeable.Unit;
+import com.vaadin.shared.util.SharedUtil;
+
+/**
+ * A class for representing a value-unit pair. Also contains utility methods for
+ * parsing such pairs from a string.
+ *
+ * @since 7.4
+ * @author Vaadin Ltd
+ */
+public class SizeWithUnit implements Serializable {
+ private float size;
+ private Unit unit;
+ private static final Pattern sizePattern = Pattern
+ .compile(SharedUtil.SIZE_PATTERN);
+
+ /**
+ * Constructs a new SizeWithUnit object representing the pair (size, unit).
+ *
+ * @param size
+ * a numeric value
+ * @param unit
+ * a unit
+ */
+ public SizeWithUnit(float size, Unit unit) {
+ this.size = size;
+ this.unit = unit;
+ }
+
+ /**
+ * Returns the numeric value stored in this object.
+ *
+ * @return the value of this (value, unit) pair
+ */
+ public float getSize() {
+ return size;
+ }
+
+ /**
+ * Returns the unit stored in this object.
+ *
+ * @return the unit of this (value, unit) pair
+ */
+ public Unit getUnit() {
+ return unit;
+ }
+
+ /**
+ * Returns an object whose numeric value and unit are taken from the string
+ * s. If s does not specify a unit and defaultUnit is not null, defaultUnit
+ * is used as the unit. If defaultUnit is null and s is a nonempty string
+ * representing a unitless number, an exception is thrown. Null or empty
+ * string will produce {-1,Unit#PIXELS}.
+ *
+ * @param s
+ * the string to be parsed
+ * @param defaultUnit
+ * The unit to be used if s does not contain any unit. Use null
+ * for no default unit.
+ * @return an object containing the parsed value and unit
+ */
+ public static SizeWithUnit parseStringSize(String s, Unit defaultUnit) {
+ if (s == null) {
+ return null;
+ }
+ s = s.trim();
+ if ("".equals(s)) {
+ return null;
+ }
+ float size = 0;
+ Unit unit = null;
+ Matcher matcher = sizePattern.matcher(s);
+ if (matcher.find()) {
+ size = Float.parseFloat(matcher.group(1));
+ if (size < 0) {
+ size = -1;
+ unit = Unit.PIXELS;
+ } else {
+ String symbol = matcher.group(2);
+ if ((symbol != null && symbol.length() > 0)
+ || defaultUnit == null) {
+ unit = Unit.getUnitFromSymbol(symbol);
+ } else {
+ unit = defaultUnit;
+ }
+ }
+ } else {
+ throw new IllegalArgumentException("Invalid size argument: \"" + s
+ + "\" (should match " + sizePattern.pattern() + ")");
+ }
+ return new SizeWithUnit(size, unit);
+ }
+
+ /**
+ * Returns an object whose numeric value and unit are taken from the string
+ * s. Null or empty string will produce {-1,Unit#PIXELS}. An exception is
+ * thrown if s specifies a number without a unit.
+ *
+ * @param s
+ * the string to be parsed
+ * @return an object containing the parsed value and unit
+ */
+ public static SizeWithUnit parseStringSize(String s) {
+ return parseStringSize(s, null);
+ }
+} \ No newline at end of file
diff --git a/server/src/com/vaadin/server/VaadinPortletResponse.java b/server/src/com/vaadin/server/VaadinPortletResponse.java
index 7a0a68d116..d9f133ac8a 100644
--- a/server/src/com/vaadin/server/VaadinPortletResponse.java
+++ b/server/src/com/vaadin/server/VaadinPortletResponse.java
@@ -30,6 +30,8 @@ import javax.portlet.PortletResponse;
import javax.portlet.ResourceResponse;
import javax.servlet.http.Cookie;
+import com.google.gwt.thirdparty.guava.common.html.HtmlEscapers;
+
/**
* Wrapper for {@link PortletResponse} and its subclasses.
*
@@ -128,6 +130,9 @@ public class VaadinPortletResponse implements VaadinResponse {
@Override
public void sendError(int errorCode, String message) throws IOException {
setStatus(errorCode);
+ if (message != null) {
+ message = HtmlEscapers.htmlEscaper().escape(message);
+ }
getWriter().write(message);
}
diff --git a/server/src/com/vaadin/server/VaadinServiceClassLoaderUtil.java b/server/src/com/vaadin/server/VaadinServiceClassLoaderUtil.java
index c9e73e2a29..8c85a6b3b3 100644
--- a/server/src/com/vaadin/server/VaadinServiceClassLoaderUtil.java
+++ b/server/src/com/vaadin/server/VaadinServiceClassLoaderUtil.java
@@ -21,7 +21,7 @@ import java.security.PrivilegedAction;
/**
* Utility class used by {@link VaadinService#setDefaultClassLoader()}.
*
- * @since
+ * @since 7.4
* @author Vaadin Ltd
*/
class VaadinServiceClassLoaderUtil {
diff --git a/server/src/com/vaadin/server/ViewportGenerator.java b/server/src/com/vaadin/server/ViewportGenerator.java
new file mode 100644
index 0000000000..33cc1341af
--- /dev/null
+++ b/server/src/com/vaadin/server/ViewportGenerator.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.server;
+
+import java.io.Serializable;
+
+/**
+ * Callback for generating a viewport tag content based on a request.
+ *
+ * @see ViewportGenerator
+ *
+ * @since 7.4
+ *
+ * @author Vaadin Ltd
+ */
+public interface ViewportGenerator extends Serializable {
+ /**
+ * Generates a viewport tag based on a request.
+ *
+ * @param request
+ * the request for which to generate a viewport tag
+ * @return the viewport tag content
+ */
+ public String getViewport(VaadinRequest request);
+}
diff --git a/server/src/com/vaadin/server/communication/PushRequestHandler.java b/server/src/com/vaadin/server/communication/PushRequestHandler.java
index 308f94686f..40eb1b688e 100644
--- a/server/src/com/vaadin/server/communication/PushRequestHandler.java
+++ b/server/src/com/vaadin/server/communication/PushRequestHandler.java
@@ -28,6 +28,7 @@ import org.atmosphere.cpr.AtmosphereFramework;
import org.atmosphere.cpr.AtmosphereInterceptor;
import org.atmosphere.cpr.AtmosphereRequest;
import org.atmosphere.cpr.AtmosphereResponse;
+import org.atmosphere.interceptor.HeartbeatInterceptor;
import com.vaadin.server.RequestHandler;
import com.vaadin.server.ServiceDestroyEvent;
@@ -57,12 +58,6 @@ public class PushRequestHandler implements RequestHandler,
private AtmosphereFramework atmosphere;
private PushHandler pushHandler;
- /**
- * Atmosphere 2.x has a race condition when AtmosphereFramework init(config)
- * is run from two threads at once. See http://dev.vaadin.com/ticket/13528
- */
- private static Object atmosphereInitRaceConditionWorkaroundLock = new Object();
-
public PushRequestHandler(VaadinServletService service)
throws ServiceException {
@@ -92,42 +87,46 @@ public class PushRequestHandler implements RequestHandler,
}
});
- synchronized (atmosphereInitRaceConditionWorkaroundLock) {
- pushHandler = new PushHandler(service);
- atmosphere.addAtmosphereHandler("/*", pushHandler.handler);
- atmosphere.addInitParameter(ApplicationConfig.BROADCASTER_CACHE,
- UUIDBroadcasterCache.class.getName());
- atmosphere.addInitParameter(
- ApplicationConfig.PROPERTY_SESSION_SUPPORT, "true");
- atmosphere.addInitParameter(ApplicationConfig.MESSAGE_DELIMITER,
- String.valueOf(PushConstants.MESSAGE_DELIMITER));
-
- final String bufferSize = String
- .valueOf(PushConstants.WEBSOCKET_BUFFER_SIZE);
- atmosphere.addInitParameter(
- ApplicationConfig.WEBSOCKET_BUFFER_SIZE, bufferSize);
- atmosphere.addInitParameter(
- ApplicationConfig.WEBSOCKET_MAXTEXTSIZE, bufferSize);
- atmosphere.addInitParameter(
- ApplicationConfig.WEBSOCKET_MAXBINARYSIZE, bufferSize);
- atmosphere.addInitParameter(
- ApplicationConfig.PROPERTY_ALLOW_SESSION_TIMEOUT_REMOVAL,
- "false");
- // Disable Atmosphere's message about commercial support
- atmosphere.addInitParameter(
- "org.atmosphere.cpr.showSupportMessage", "false");
-
- try {
- atmosphere.init(vaadinServletConfig);
-
- // Ensure the client-side knows how to split the message stream
- // into individual messages when using certain transports
- AtmosphereInterceptor trackMessageSize = new TrackMessageSizeInterceptor();
- trackMessageSize.configure(atmosphere.getAtmosphereConfig());
- atmosphere.interceptor(trackMessageSize);
- } catch (ServletException e) {
- throw new ServiceException("Atmosphere init failed", e);
- }
+ pushHandler = new PushHandler(service);
+ atmosphere.addAtmosphereHandler("/*", pushHandler.handler);
+ atmosphere.addInitParameter(ApplicationConfig.BROADCASTER_CACHE,
+ UUIDBroadcasterCache.class.getName());
+ atmosphere.addInitParameter(ApplicationConfig.PROPERTY_SESSION_SUPPORT,
+ "true");
+ atmosphere.addInitParameter(ApplicationConfig.MESSAGE_DELIMITER,
+ String.valueOf(PushConstants.MESSAGE_DELIMITER));
+
+ // Disable heartbeat (it does not emit correct events client side)
+ // https://github.com/Atmosphere/atmosphere-javascript/issues/141
+ atmosphere.addInitParameter(
+ ApplicationConfig.DISABLE_ATMOSPHEREINTERCEPTORS,
+ HeartbeatInterceptor.class.getName());
+
+ final String bufferSize = String
+ .valueOf(PushConstants.WEBSOCKET_BUFFER_SIZE);
+ atmosphere.addInitParameter(ApplicationConfig.WEBSOCKET_BUFFER_SIZE,
+ bufferSize);
+ atmosphere.addInitParameter(ApplicationConfig.WEBSOCKET_MAXTEXTSIZE,
+ bufferSize);
+ atmosphere.addInitParameter(ApplicationConfig.WEBSOCKET_MAXBINARYSIZE,
+ bufferSize);
+ atmosphere.addInitParameter(
+ ApplicationConfig.PROPERTY_ALLOW_SESSION_TIMEOUT_REMOVAL,
+ "false");
+ // Disable Atmosphere's message about commercial support
+ atmosphere.addInitParameter("org.atmosphere.cpr.showSupportMessage",
+ "false");
+
+ try {
+ atmosphere.init(vaadinServletConfig);
+
+ // Ensure the client-side knows how to split the message stream
+ // into individual messages when using certain transports
+ AtmosphereInterceptor trackMessageSize = new TrackMessageSizeInterceptor();
+ trackMessageSize.configure(atmosphere.getAtmosphereConfig());
+ atmosphere.interceptor(trackMessageSize);
+ } catch (ServletException e) {
+ throw new ServiceException("Atmosphere init failed", e);
}
}
diff --git a/server/src/com/vaadin/ui/AbsoluteLayout.java b/server/src/com/vaadin/ui/AbsoluteLayout.java
index af47981db6..12aa8ea9a6 100644
--- a/server/src/com/vaadin/ui/AbsoluteLayout.java
+++ b/server/src/com/vaadin/ui/AbsoluteLayout.java
@@ -21,6 +21,10 @@ import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+import org.jsoup.nodes.Node;
+
import com.vaadin.event.LayoutEvents.LayoutClickEvent;
import com.vaadin.event.LayoutEvents.LayoutClickListener;
import com.vaadin.event.LayoutEvents.LayoutClickNotifier;
@@ -30,6 +34,8 @@ import com.vaadin.shared.EventId;
import com.vaadin.shared.MouseEventDetails;
import com.vaadin.shared.ui.absolutelayout.AbsoluteLayoutServerRpc;
import com.vaadin.shared.ui.absolutelayout.AbsoluteLayoutState;
+import com.vaadin.ui.declarative.DesignAttributeHandler;
+import com.vaadin.ui.declarative.DesignContext;
/**
* AbsoluteLayout is a layout implementation that mimics html absolute
@@ -40,6 +46,13 @@ import com.vaadin.shared.ui.absolutelayout.AbsoluteLayoutState;
public class AbsoluteLayout extends AbstractLayout implements
LayoutClickNotifier {
+ // constants for design attributes
+ private static final String ATTR_TOP = ":top";
+ private static final String ATTR_RIGHT = ":right";
+ private static final String ATTR_BOTTOM = ":bottom";
+ private static final String ATTR_LEFT = ":left";
+ private static final String ATTR_Z_INDEX = ":z-index";
+
private AbsoluteLayoutServerRpc rpc = new AbsoluteLayoutServerRpc() {
@Override
@@ -658,4 +671,98 @@ public class AbsoluteLayout extends AbstractLayout implements
public void removeListener(LayoutClickListener listener) {
removeLayoutClickListener(listener);
}
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractComponent#readDesign(org.jsoup.nodes .Node,
+ * com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void readDesign(Element design, DesignContext designContext) {
+ // process default attributes
+ super.readDesign(design, designContext);
+ // handle children
+ for (Element childComponent : design.children()) {
+ Attributes attr = childComponent.attributes();
+ Component newChild = designContext.readDesign(childComponent);
+ StringBuilder css = new StringBuilder();
+ if (attr.hasKey(ATTR_TOP)) {
+ css.append("top:").append(attr.get(ATTR_TOP)).append(";");
+ }
+ if (attr.hasKey(ATTR_RIGHT)) {
+ css.append("right:").append(attr.get(ATTR_RIGHT)).append(";");
+ }
+ if (attr.hasKey(ATTR_BOTTOM)) {
+ css.append("bottom:").append(attr.get(ATTR_BOTTOM)).append(";");
+ }
+ if (attr.hasKey(ATTR_LEFT)) {
+ css.append("left:").append(attr.get(ATTR_LEFT)).append(";");
+ }
+ if (attr.hasKey(ATTR_Z_INDEX)) {
+ css.append("z-index:").append(attr.get(ATTR_Z_INDEX))
+ .append(";");
+ }
+ addComponent(newChild, css.toString());
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractComponent#writeDesign(org.jsoup.nodes.Node,
+ * com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void writeDesign(Element design, DesignContext designContext) {
+ super.writeDesign(design, designContext);
+ AbsoluteLayout def = designContext.getDefaultInstance(this);
+ if (!designContext.shouldWriteChildren(this, def)) {
+ return;
+ }
+ // handle children
+ for (Component child : this) {
+ Element childElement = designContext.createElement(child);
+ design.appendChild(childElement);
+ child.writeDesign(childElement, designContext);
+ // handle position
+ ComponentPosition position = getPosition(child);
+ writePositionAttribute(childElement, ATTR_TOP, position
+ .getTopUnits().getSymbol(), position.getTopValue());
+ writePositionAttribute(childElement, ATTR_RIGHT, position
+ .getRightUnits().getSymbol(), position.getRightValue());
+ writePositionAttribute(childElement, ATTR_BOTTOM, position
+ .getBottomUnits().getSymbol(), position.getBottomValue());
+ writePositionAttribute(childElement, ATTR_LEFT, position
+ .getLeftUnits().getSymbol(), position.getLeftValue());
+ // handle z-index
+ if (position.getZIndex() >= 0) {
+ childElement
+ .attr(ATTR_Z_INDEX, String.valueOf(position.zIndex));
+ }
+ }
+ }
+
+ /**
+ * Private method for writing position attributes
+ *
+ * @since
+ * @param node
+ * target node
+ * @param key
+ * attribute key
+ * @param symbol
+ * value symbol
+ * @param value
+ * the value
+ */
+ private void writePositionAttribute(Node node, String key, String symbol,
+ Float value) {
+ if (value != null) {
+ String valueString = DesignAttributeHandler.formatFloat(value
+ .floatValue());
+ node.attr(key, valueString + symbol);
+ }
+ }
+
}
diff --git a/server/src/com/vaadin/ui/AbstractColorPicker.java b/server/src/com/vaadin/ui/AbstractColorPicker.java
index acf3b2c042..608a42d33b 100644
--- a/server/src/com/vaadin/ui/AbstractColorPicker.java
+++ b/server/src/com/vaadin/ui/AbstractColorPicker.java
@@ -455,9 +455,11 @@ public abstract class AbstractColorPicker extends AbstractComponent implements
* @param htmlContentAllowed
* <code>true</code> if caption is rendered as HTML,
* <code>false</code> otherwise
+ * @deprecated as of , use {@link #setCaptionAsHtml(boolean)} instead
*/
+ @Deprecated
public void setHtmlContentAllowed(boolean htmlContentAllowed) {
- getState().htmlContentAllowed = htmlContentAllowed;
+ setCaptionAsHtml(htmlContentAllowed);
}
/**
@@ -465,8 +467,10 @@ public abstract class AbstractColorPicker extends AbstractComponent implements
*
* @return <code>true</code> if the caption text is to be rendered as HTML,
* <code>false</code> otherwise
+ * @deprecated as of , use {@link #isCaptionAsHtml()} instead
*/
+ @Deprecated
public boolean isHtmlContentAllowed() {
- return getState(false).htmlContentAllowed;
+ return isCaptionAsHtml();
}
}
diff --git a/server/src/com/vaadin/ui/AbstractComponent.java b/server/src/com/vaadin/ui/AbstractComponent.java
index 5c4fba739d..9ff6dff21e 100644
--- a/server/src/com/vaadin/ui/AbstractComponent.java
+++ b/server/src/com/vaadin/ui/AbstractComponent.java
@@ -16,29 +16,44 @@
package com.vaadin.ui;
-import java.io.Serializable;
import java.lang.reflect.Method;
import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
+import java.util.Set;
import java.util.StringTokenizer;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
+import java.util.logging.Logger;
+
+import org.jsoup.nodes.Attribute;
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
import com.vaadin.event.ActionManager;
import com.vaadin.event.ConnectorActionManager;
import com.vaadin.event.ShortcutListener;
import com.vaadin.server.AbstractClientConnector;
+import com.vaadin.server.AbstractErrorMessage.ContentMode;
import com.vaadin.server.ComponentSizeValidator;
import com.vaadin.server.ErrorMessage;
+import com.vaadin.server.ErrorMessage.ErrorLevel;
+import com.vaadin.server.Extension;
import com.vaadin.server.Resource;
+import com.vaadin.server.Responsive;
+import com.vaadin.server.SizeWithUnit;
+import com.vaadin.server.Sizeable;
+import com.vaadin.server.UserError;
import com.vaadin.server.VaadinSession;
import com.vaadin.shared.AbstractComponentState;
import com.vaadin.shared.ComponentConstants;
import com.vaadin.shared.ui.ComponentStateUtil;
import com.vaadin.shared.util.SharedUtil;
import com.vaadin.ui.Field.ValueChangeEvent;
+import com.vaadin.ui.declarative.DesignAttributeHandler;
+import com.vaadin.ui.declarative.DesignContext;
import com.vaadin.util.ReflectTools;
/**
@@ -46,7 +61,7 @@ import com.vaadin.util.ReflectTools;
* {@link Component} interface. Basic UI components that are not derived from an
* external component can inherit this class to easily qualify as Vaadin
* components. Most components in Vaadin do just that.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -83,8 +98,6 @@ public abstract class AbstractComponent extends AbstractClientConnector
private float height = SIZE_UNDEFINED;
private Unit widthUnit = Unit.PIXELS;
private Unit heightUnit = Unit.PIXELS;
- private static final Pattern sizePattern = Pattern
- .compile(SharedUtil.SIZE_PATTERN);
/**
* Keeps track of the Actions added to this component; the actual
@@ -98,6 +111,8 @@ public abstract class AbstractComponent extends AbstractClientConnector
private Boolean explicitImmediateValue;
+ protected static final String DESIGN_ATTR_PLAIN_TEXT = "plain-text";
+
/* Constructor */
/**
@@ -241,7 +256,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
* Sets the component's caption <code>String</code>. Caption is the visible
* name of the component. This method will trigger a
* {@link RepaintRequestEvent}.
- *
+ *
* @param caption
* the new caption <code>String</code> for the component.
*/
@@ -250,6 +265,35 @@ public abstract class AbstractComponent extends AbstractClientConnector
getState().caption = caption;
}
+ /**
+ * Sets whether the caption is rendered as HTML.
+ * <p>
+ * If set to true, the captions are rendered in the browser as HTML and the
+ * developer is responsible for ensuring no harmful HTML is used. If set to
+ * false, the caption is rendered in the browser as plain text.
+ * <p>
+ * The default is false, i.e. to render that caption as plain text.
+ *
+ * @param captionAsHtml
+ * true if the captions are rendered as HTML, false if rendered
+ * as plain text
+ */
+ public void setCaptionAsHtml(boolean captionAsHtml) {
+ getState().captionAsHtml = captionAsHtml;
+ }
+
+ /**
+ * Checks whether captions are rendered as HTML
+ * <p>
+ * The default is false, i.e. to render that caption as plain text.
+ *
+ * @return true if the captions are rendered as HTML, false if rendered as
+ * plain text
+ */
+ public boolean isCaptionAsHtml() {
+ return getState(false).captionAsHtml;
+ }
+
/*
* Don't add a JavaDoc comment here, we use the default documentation from
* implemented interface.
@@ -272,7 +316,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Sets the locale of this component.
- *
+ *
* <pre>
* // Component for which the locale is meaningful
* InlineDateField date = new InlineDateField(&quot;Datum&quot;);
@@ -284,8 +328,8 @@ public abstract class AbstractComponent extends AbstractClientConnector
* date.setResolution(DateField.RESOLUTION_DAY);
* layout.addComponent(date);
* </pre>
- *
- *
+ *
+ *
* @param locale
* the locale to become this component's locale.
*/
@@ -311,7 +355,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Sets the component's icon. This method will trigger a
* {@link RepaintRequestEvent}.
- *
+ *
* @param icon
* the icon to be shown with the component's caption.
*/
@@ -377,7 +421,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Sets the component's immediate mode to the specified status.
- *
+ *
* @param immediate
* the boolean value specifying if the component should be in the
* immediate mode after the call.
@@ -438,11 +482,11 @@ public abstract class AbstractComponent extends AbstractClientConnector
* Sets the component's description. See {@link #getDescription()} for more
* information on what the description is. This method will trigger a
* {@link RepaintRequestEvent}.
- *
+ *
* The description is displayed as HTML in tooltips or directly in certain
* components so care should be taken to avoid creating the possibility for
* HTML injection and possibly XSS vulnerabilities.
- *
+ *
* @param description
* the new description string for the component.
*/
@@ -491,7 +535,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
* To find the Window that contains the component, use {@code Window w =
* getParent(Window.class);}
* </p>
- *
+ *
* @param <T>
* The type of the ancestor
* @param parentType
@@ -512,7 +556,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Gets the error message for this component.
- *
+ *
* @return ErrorMessage containing the description of the error state of the
* component or null, if the component contains no errors. Extending
* classes should override this method if they support other error
@@ -525,9 +569,9 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Gets the component's error message.
- *
+ *
* @link Terminal.ErrorMessage#ErrorMessage(String, int)
- *
+ *
* @return the component's error message.
*/
public ErrorMessage getComponentError() {
@@ -537,9 +581,9 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Sets the component's error message. The message may contain certain XML
* tags, for more information see
- *
+ *
* @link Component.ErrorMessage#ErrorMessage(String, int)
- *
+ *
* @param componentError
* the new <code>ErrorMessage</code> of the component.
*/
@@ -616,7 +660,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Build CSS compatible string representation of height.
- *
+ *
* @return CSS height
*/
private String getCSSHeight() {
@@ -625,7 +669,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Build CSS compatible string representation of width.
- *
+ *
* @return CSS width
*/
private String getCSSWidth() {
@@ -635,12 +679,12 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Returns the shared state bean with information to be sent from the server
* to the client.
- *
+ *
* Subclasses should override this method and set any relevant fields of the
* state returned by super.getState().
- *
+ *
* @since 7.0
- *
+ *
* @return updated component shared state
*/
@Override
@@ -731,7 +775,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Sets the data object, that can be used for any application specific data.
* The component does not use or modify this data.
- *
+ *
* @param data
* the Application specific data.
* @since 3.1
@@ -742,7 +786,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Gets the application specific data. See {@link #setData(Object)}.
- *
+ *
* @return the Application specific data set with setData function.
* @since 3.1
*/
@@ -873,7 +917,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
*/
@Override
public void setWidth(String width) {
- Size size = parseStringSize(width);
+ SizeWithUnit size = SizeWithUnit.parseStringSize(width);
if (size != null) {
setWidth(size.getSize(), size.getUnit());
} else {
@@ -888,7 +932,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
*/
@Override
public void setHeight(String height) {
- Size size = parseStringSize(height);
+ SizeWithUnit size = SizeWithUnit.parseStringSize(height);
if (size != null) {
setHeight(size.getSize(), size.getUnit());
} else {
@@ -897,51 +941,350 @@ public abstract class AbstractComponent extends AbstractClientConnector
}
/*
- * Returns array with size in index 0 unit in index 1. Null or empty string
- * will produce {-1,Unit#PIXELS}
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.Component#readDesign(org.jsoup.nodes.Element,
+ * com.vaadin.ui.declarative.DesignContext)
*/
- private static Size parseStringSize(String s) {
- if (s == null) {
- return null;
+ @Override
+ public void readDesign(Element design, DesignContext designContext) {
+ Attributes attr = design.attributes();
+ // handle default attributes
+ for (String attribute : getDefaultAttributes()) {
+ if (design.hasAttr(attribute)) {
+ DesignAttributeHandler.assignValue(this, attribute,
+ design.attr(attribute));
+ }
+
+ }
+ // handle immediate
+ if (attr.hasKey("immediate")) {
+ setImmediate(DesignAttributeHandler.parseBoolean(attr
+ .get("immediate")));
+ }
+
+ // handle locale
+ if (attr.hasKey("locale")) {
+ setLocale(getLocaleFromString(attr.get("locale")));
+ }
+ // handle width and height
+ readSize(attr);
+ // handle component error
+ if (attr.hasKey("error")) {
+ UserError error = new UserError(attr.get("error"),
+ ContentMode.HTML, ErrorLevel.ERROR);
+ setComponentError(error);
+ }
+ // Tab index when applicable
+ if (design.hasAttr("tabindex") && this instanceof Focusable) {
+ ((Focusable) this).setTabIndex(DesignAttributeHandler
+ .readAttribute("tabindex", design.attributes(),
+ Integer.class));
+ }
+
+ // handle responsive
+ if (attr.hasKey("responsive")) {
+ setResponsive(DesignAttributeHandler.parseBoolean(attr
+ .get("responsive")));
+ }
+ // check for unsupported attributes
+ Set<String> supported = new HashSet<String>();
+ supported.addAll(getDefaultAttributes());
+ supported.addAll(getCustomAttributes());
+ for (Attribute a : attr) {
+ if (!a.getKey().startsWith(":") && !supported.contains(a.getKey())) {
+ getLogger().info(
+ "Unsupported attribute found when reading from design : "
+ + a.getKey());
+ }
}
- s = s.trim();
- if ("".equals(s)) {
+ }
+
+ /**
+ * Constructs a Locale corresponding to the given string. The string should
+ * consist of one, two or three parts with '_' between the different parts
+ * if there is more than one part. The first part specifies the language,
+ * the second part the country and the third part the variant of the locale.
+ *
+ * @param localeString
+ * the locale specified as a string
+ * @return the Locale object corresponding to localeString
+ */
+ private Locale getLocaleFromString(String localeString) {
+ if (localeString == null) {
return null;
}
- float size = 0;
- Unit unit = null;
- Matcher matcher = sizePattern.matcher(s);
- if (matcher.find()) {
- size = Float.parseFloat(matcher.group(1));
- if (size < 0) {
- size = -1;
- unit = Unit.PIXELS;
- } else {
- String symbol = matcher.group(2);
- unit = Unit.getUnitFromSymbol(symbol);
+ String[] parts = localeString.split("_");
+ if (parts.length > 3) {
+ throw new RuntimeException("Cannot parse the locale string: "
+ + localeString);
+ }
+ switch (parts.length) {
+ case 1:
+ return new Locale(parts[0]);
+ case 2:
+ return new Locale(parts[0], parts[1]);
+ default:
+ return new Locale(parts[0], parts[1], parts[2]);
+ }
+ }
+
+ /**
+ * Toggles responsiveness of this component.
+ *
+ * @since 7.4
+ * @param responsive
+ * boolean enables responsiveness, false disables
+ */
+ private void setResponsive(boolean responsive) {
+ if (responsive) {
+ // make responsive if necessary
+ if (!isResponsive()) {
+ Responsive.makeResponsive(this);
+ }
+ } else {
+ // remove responsive extensions
+ List<Extension> extensions = new ArrayList<Extension>(
+ getExtensions());
+ for (Extension e : extensions) {
+ if (e instanceof Responsive) {
+ removeExtension(e);
+ }
+ }
+ }
+ }
+
+ /**
+ * Returns true if the component is responsive
+ *
+ * @since 7.4
+ * @return true if the component is responsive
+ */
+ private boolean isResponsive() {
+ for (Extension e : getExtensions()) {
+ if (e instanceof Responsive) {
+ return true;
}
+ }
+ return false;
+ }
+
+ /**
+ * Reads the size of this component from the given design attributes. If the
+ * attributes do not contain relevant size information, defaults is
+ * consulted.
+ *
+ * @param attributes
+ * the design attributes
+ * @param defaultInstance
+ * instance of the class that has default sizing.
+ */
+ private void readSize(Attributes attributes) {
+ // read width
+ if (attributes.hasKey("width-auto") || attributes.hasKey("size-auto")) {
+ this.setWidth(null);
+ } else if (attributes.hasKey("width-full")
+ || attributes.hasKey("size-full")) {
+ this.setWidth("100%");
+ } else if (attributes.hasKey("width")) {
+ this.setWidth(attributes.get("width"));
+ }
+
+ // read height
+ if (attributes.hasKey("height-auto") || attributes.hasKey("size-auto")) {
+ this.setHeight(null);
+ } else if (attributes.hasKey("height-full")
+ || attributes.hasKey("size-full")) {
+ this.setHeight("100%");
+ } else if (attributes.hasKey("height")) {
+ this.setHeight(attributes.get("height"));
+ }
+ }
+
+ /**
+ * Writes the size related attributes for the component if they differ from
+ * the defaults
+ *
+ * @param component
+ * the component
+ * @param attributes
+ * the attribute map where the attribute are written
+ * @param defaultInstance
+ * the default instance of the class for fetching the default
+ * values
+ */
+ private void writeSize(Attributes attributes, Component defaultInstance) {
+ if (hasEqualSize(defaultInstance)) {
+ // we have default values -> ignore
+ return;
+ }
+ boolean widthFull = getWidth() == 100f
+ && getWidthUnits().equals(Sizeable.Unit.PERCENTAGE);
+ boolean heightFull = getHeight() == 100f
+ && getHeightUnits().equals(Sizeable.Unit.PERCENTAGE);
+ boolean widthAuto = getWidth() == -1;
+ boolean heightAuto = getHeight() == -1;
+
+ // first try the full shorthands
+ if (widthFull && heightFull) {
+ attributes.put("size-full", "true");
+ } else if (widthAuto && heightAuto) {
+ attributes.put("size-auto", "true");
} else {
- throw new IllegalArgumentException("Invalid size argument: \"" + s
- + "\" (should match " + sizePattern.pattern() + ")");
+ // handle width
+ if (!hasEqualWidth(defaultInstance)) {
+ if (widthFull) {
+ attributes.put("width-full", "true");
+ } else if (widthAuto) {
+ attributes.put("width-auto", "true");
+ } else {
+ String widthString = DesignAttributeHandler
+ .formatFloat(getWidth())
+ + getWidthUnits().getSymbol();
+ attributes.put("width", widthString);
+
+ }
+ }
+ if (!hasEqualHeight(defaultInstance)) {
+ // handle height
+ if (heightFull) {
+ attributes.put("height-full", "true");
+ } else if (heightAuto) {
+ attributes.put("height-auto", "true");
+ } else {
+ String heightString = DesignAttributeHandler
+ .formatFloat(getHeight())
+ + getHeightUnits().getSymbol();
+ attributes.put("height", heightString);
+ }
+ }
}
- return new Size(size, unit);
}
- private static class Size implements Serializable {
- float size;
- Unit unit;
+ /**
+ * Test if the given component has equal width with this instance
+ *
+ * @param component
+ * the component for the width comparison
+ * @return true if the widths are equal
+ */
+ private boolean hasEqualWidth(Component component) {
+ return getWidth() == component.getWidth()
+ && getWidthUnits().equals(component.getWidthUnits());
+ }
- public Size(float size, Unit unit) {
- this.size = size;
- this.unit = unit;
+ /**
+ * Test if the given component has equal height with this instance
+ *
+ * @param component
+ * the component for the height comparison
+ * @return true if the heights are equal
+ */
+ private boolean hasEqualHeight(Component component) {
+ return getHeight() == component.getHeight()
+ && getHeightUnits().equals(component.getHeightUnits());
+ }
+
+ /**
+ * Test if the given components has equal size with this instance
+ *
+ * @param component
+ * the component for the size comparison
+ * @return true if the sizes are equal
+ */
+ private boolean hasEqualSize(Component component) {
+ return hasEqualWidth(component) && hasEqualHeight(component);
+ }
+
+ /**
+ * Returns a collection of attributes that do not require custom handling
+ * when reading or writing design. These are typically attributes of some
+ * primitive type. The default implementation searches setters with
+ * primitive values
+ *
+ * @return a collection of attributes that can be read and written using the
+ * default approach.
+ */
+ private Collection<String> getDefaultAttributes() {
+ Collection<String> attributes = DesignAttributeHandler
+ .getSupportedAttributes(this.getClass());
+ attributes.removeAll(getCustomAttributes());
+ return attributes;
+ }
+
+ /**
+ * Returns a collection of attributes that should not be handled by the
+ * basic implementation of the {@link readDesign} and {@link writeDesign}
+ * methods. Typically these are handled in a custom way in the overridden
+ * versions of the above methods
+ *
+ * @since 7.4
+ *
+ * @return the collection of attributes that are not handled by the basic
+ * implementation
+ */
+ protected Collection<String> getCustomAttributes() {
+ ArrayList<String> l = new ArrayList<String>(
+ Arrays.asList(customAttributes));
+ if (this instanceof Focusable) {
+ l.add("tab-index");
+ l.add("tabindex");
}
+ return l;
+ }
+
+ private static final String[] customAttributes = new String[] { "width",
+ "height", "debug-id", "error", "width-auto", "height-auto",
+ "width-full", "height-full", "size-auto", "size-full",
+ "responsive", "immediate", "locale", "read-only", "_id" };
- public float getSize() {
- return size;
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.Component#writeDesign(org.jsoup.nodes.Element,
+ * com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void writeDesign(Element design, DesignContext designContext) {
+ // clear element contents
+ DesignAttributeHandler.clearElement(design);
+ AbstractComponent def = designContext.getDefaultInstance(this);
+ Attributes attr = design.attributes();
+ // handle default attributes
+ for (String attribute : getDefaultAttributes()) {
+ DesignAttributeHandler.writeAttribute(this, attribute, attr, def);
+ }
+ // handle immediate
+ if (explicitImmediateValue != null) {
+ DesignAttributeHandler.writeAttribute("immediate", attr,
+ explicitImmediateValue, def.isImmediate(), Boolean.class);
+ }
+ // handle locale
+ if (getLocale() != null
+ && (getParent() == null || !getLocale().equals(
+ getParent().getLocale()))) {
+ design.attr("locale", getLocale().toString());
+ }
+ // handle size
+ writeSize(attr, def);
+ // handle component error
+ String errorMsg = getComponentError() != null ? getComponentError()
+ .getFormattedHtmlMessage() : null;
+ String defErrorMsg = def.getComponentError() != null ? def
+ .getComponentError().getFormattedHtmlMessage() : null;
+ if (!SharedUtil.equals(errorMsg, defErrorMsg)) {
+ attr.put("error", errorMsg);
+ }
+ // handle tab index
+ if (this instanceof Focusable) {
+ DesignAttributeHandler.writeAttribute("tabindex", attr,
+ ((Focusable) this).getTabIndex(),
+ ((Focusable) def).getTabIndex(), Integer.class);
}
- public Unit getUnit() {
- return unit;
+ // handle responsive
+ if (isResponsive()) {
+ attr.put("responsive", "");
}
}
@@ -952,7 +1295,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Gets the {@link ActionManager} used to manage the
* {@link ShortcutListener}s added to this {@link Field}.
- *
+ *
* @return the ActionManager in use
*/
protected ActionManager getActionManager() {
@@ -996,7 +1339,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Determine whether a <code>content</code> component is equal to, or the
* ancestor of this component.
- *
+ *
* @param content
* the potential ancestor element
* @return <code>true</code> if the relationship holds
@@ -1012,4 +1355,8 @@ public abstract class AbstractComponent extends AbstractClientConnector
}
return false;
}
+
+ private static final Logger getLogger() {
+ return Logger.getLogger(AbstractComponent.class.getName());
+ }
}
diff --git a/server/src/com/vaadin/ui/AbstractField.java b/server/src/com/vaadin/ui/AbstractField.java
index df7bbb68a2..9b9c7efd86 100644
--- a/server/src/com/vaadin/ui/AbstractField.java
+++ b/server/src/com/vaadin/ui/AbstractField.java
@@ -25,6 +25,10 @@ import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
+import java.util.logging.Logger;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
import com.vaadin.data.Buffered;
import com.vaadin.data.Property;
@@ -43,6 +47,8 @@ import com.vaadin.server.CompositeErrorMessage;
import com.vaadin.server.ErrorMessage;
import com.vaadin.shared.AbstractFieldState;
import com.vaadin.shared.util.SharedUtil;
+import com.vaadin.ui.declarative.DesignAttributeHandler;
+import com.vaadin.ui.declarative.DesignContext;
/**
* <p>
@@ -1738,4 +1744,55 @@ public abstract class AbstractField<T> extends AbstractComponent implements
isListeningToPropertyEvents = false;
}
}
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractComponent#readDesign(org.jsoup.nodes .Element,
+ * com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void readDesign(Element design, DesignContext designContext) {
+ super.readDesign(design, designContext);
+ Attributes attr = design.attributes();
+ if (design.hasAttr("readonly")) {
+ setReadOnly(DesignAttributeHandler.readAttribute("readonly", attr,
+ Boolean.class));
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractComponent#getCustomAttributes()
+ */
+ @Override
+ protected Collection<String> getCustomAttributes() {
+ Collection<String> attributes = super.getCustomAttributes();
+ attributes.add("readonly");
+ // must be handled by subclasses
+ attributes.add("value");
+ return attributes;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractComponent#writeDesign(org.jsoup.nodes.Element
+ * , com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void writeDesign(Element design, DesignContext designContext) {
+ super.writeDesign(design, designContext);
+ AbstractField def = (AbstractField) designContext
+ .getDefaultInstance(this);
+ Attributes attr = design.attributes();
+ // handle readonly
+ DesignAttributeHandler.writeAttribute("readonly", attr,
+ super.isReadOnly(), def.isReadOnly(), Boolean.class);
+ }
+
+ private static final Logger getLogger() {
+ return Logger.getLogger(AbstractField.class.getName());
+ }
}
diff --git a/server/src/com/vaadin/ui/AbstractOrderedLayout.java b/server/src/com/vaadin/ui/AbstractOrderedLayout.java
index 638f6bc3f9..67bcfc904c 100644
--- a/server/src/com/vaadin/ui/AbstractOrderedLayout.java
+++ b/server/src/com/vaadin/ui/AbstractOrderedLayout.java
@@ -16,8 +16,13 @@
package com.vaadin.ui;
+import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedList;
+import java.util.logging.Logger;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
import com.vaadin.event.LayoutEvents.LayoutClickEvent;
import com.vaadin.event.LayoutEvents.LayoutClickListener;
@@ -26,10 +31,13 @@ import com.vaadin.server.Sizeable;
import com.vaadin.shared.Connector;
import com.vaadin.shared.EventId;
import com.vaadin.shared.MouseEventDetails;
+import com.vaadin.shared.ui.AlignmentInfo;
import com.vaadin.shared.ui.MarginInfo;
import com.vaadin.shared.ui.orderedlayout.AbstractOrderedLayoutServerRpc;
import com.vaadin.shared.ui.orderedlayout.AbstractOrderedLayoutState;
import com.vaadin.shared.ui.orderedlayout.AbstractOrderedLayoutState.ChildComponentData;
+import com.vaadin.ui.declarative.DesignAttributeHandler;
+import com.vaadin.ui.declarative.DesignContext;
@SuppressWarnings("serial")
public abstract class AbstractOrderedLayout extends AbstractLayout implements
@@ -459,4 +467,121 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
setExpandRatio(target, expandRatio);
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractComponent#readDesign(org.jsoup.nodes .Element,
+ * com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void readDesign(Element design, DesignContext designContext) {
+ // process default attributes
+ super.readDesign(design, designContext);
+ // handle margin
+ if (design.hasAttr("margin")) {
+ setMargin(DesignAttributeHandler.readAttribute("margin",
+ design.attributes(), Boolean.class));
+ }
+ // handle children
+ for (Element childComponent : design.children()) {
+ Attributes attr = childComponent.attributes();
+ Component newChild = designContext.readDesign(childComponent);
+ addComponent(newChild);
+ // handle alignment
+ int bitMask = 0;
+ if (attr.hasKey(":middle")) {
+ bitMask += AlignmentInfo.Bits.ALIGNMENT_VERTICAL_CENTER;
+ } else if (attr.hasKey(":bottom")) {
+ bitMask += AlignmentInfo.Bits.ALIGNMENT_BOTTOM;
+ } else {
+ bitMask += AlignmentInfo.Bits.ALIGNMENT_TOP;
+ }
+ if (attr.hasKey(":center")) {
+ bitMask += AlignmentInfo.Bits.ALIGNMENT_HORIZONTAL_CENTER;
+ } else if (attr.hasKey(":right")) {
+ bitMask += AlignmentInfo.Bits.ALIGNMENT_RIGHT;
+ } else {
+ bitMask += AlignmentInfo.Bits.ALIGNMENT_LEFT;
+ }
+ setComponentAlignment(newChild, new Alignment(bitMask));
+ // handle expand ratio
+ if (attr.hasKey(":expand")) {
+ String value = attr.get(":expand");
+ if (value.length() > 0) {
+ try {
+ float ratio = Float.valueOf(value);
+ setExpandRatio(newChild, ratio);
+ } catch (NumberFormatException nfe) {
+ getLogger().info(
+ "Failed to parse expand ratio " + value);
+ }
+ } else {
+ setExpandRatio(newChild, 1.0f);
+ }
+ }
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractComponent#writeDesign(org.jsoup.nodes.Element
+ * , com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void writeDesign(Element design, DesignContext designContext) {
+ // write default attributes
+ super.writeDesign(design, designContext);
+ // handle margin
+ AbstractOrderedLayout def = (AbstractOrderedLayout) designContext
+ .getDefaultInstance(this);
+ if (getMargin().getBitMask() != def.getMargin().getBitMask()) {
+ design.attr("margin", "");
+ }
+ // handle children
+ if (!designContext.shouldWriteChildren(this, def)) {
+ return;
+ }
+
+ for (Component child : this) {
+ Element childElement = designContext.createElement(child);
+ design.appendChild(childElement);
+ // handle alignment
+ Alignment alignment = getComponentAlignment(child);
+ if (alignment.isMiddle()) {
+ childElement.attr(":middle", "");
+ } else if (alignment.isBottom()) {
+ childElement.attr(":bottom", "");
+ }
+ if (alignment.isCenter()) {
+ childElement.attr(":center", "");
+ } else if (alignment.isRight()) {
+ childElement.attr(":right", "");
+ }
+ // handle expand ratio
+ float expandRatio = getExpandRatio(child);
+ if (expandRatio == 1.0f) {
+ childElement.attr(":expand", "");
+ } else if (expandRatio > 0) {
+ childElement.attr(":expand",
+ DesignAttributeHandler.formatFloat(expandRatio));
+ }
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractComponent#getCustomAttributes()
+ */
+ @Override
+ protected Collection<String> getCustomAttributes() {
+ Collection<String> customAttributes = super.getCustomAttributes();
+ customAttributes.add("margin");
+ return customAttributes;
+ }
+
+ private static Logger getLogger() {
+ return Logger.getLogger(AbstractOrderedLayout.class.getName());
+ }
}
diff --git a/server/src/com/vaadin/ui/AbstractSelect.java b/server/src/com/vaadin/ui/AbstractSelect.java
index 1a3eeb88a3..d5e47b2286 100644
--- a/server/src/com/vaadin/ui/AbstractSelect.java
+++ b/server/src/com/vaadin/ui/AbstractSelect.java
@@ -1729,6 +1729,8 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Removes orphaned ids from selection.
+ *
+ * @since 7.4
*/
protected void adjustSelection() {
Object value = getValue();
diff --git a/server/src/com/vaadin/ui/AbstractSingleComponentContainer.java b/server/src/com/vaadin/ui/AbstractSingleComponentContainer.java
index e7b5205f2d..244feb3bb9 100644
--- a/server/src/com/vaadin/ui/AbstractSingleComponentContainer.java
+++ b/server/src/com/vaadin/ui/AbstractSingleComponentContainer.java
@@ -18,9 +18,13 @@ package com.vaadin.ui;
import java.util.Collections;
import java.util.Iterator;
+import org.jsoup.nodes.Element;
+
import com.vaadin.server.ComponentSizeValidator;
import com.vaadin.server.VaadinService;
import com.vaadin.server.VaadinSession;
+import com.vaadin.ui.declarative.DesignContext;
+import com.vaadin.ui.declarative.DesignException;
/**
* Abstract base class for component containers that have only one child
@@ -274,4 +278,50 @@ public abstract class AbstractSingleComponentContainer extends
repaintChangedChildTree(dirtyChild, childrenMayBecomeUndefined, true);
}
-}
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractComponent#readDesign(org.jsoup.nodes .Element,
+ * com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void readDesign(Element design, DesignContext designContext) {
+ // process default attributes
+ super.readDesign(design, designContext);
+ // handle child element, checking that the design specifies at most one
+ // child
+ int childCount = design.children().size();
+ if (childCount > 1) {
+ throw new DesignException("The container of type "
+ + getClass().toString()
+ + " can have only one child component.");
+ } else if (childCount == 1) {
+ Element childElement = design.children().get(0);
+ Component newChild = designContext.readDesign(childElement);
+ setContent(newChild);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractComponent#writeDesign(org.jsoup.nodes.Element
+ * , com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void writeDesign(Element design, DesignContext designContext) {
+ // write default attributes (also clears children and attributes)
+ super.writeDesign(design, designContext);
+ AbstractSingleComponentContainer def = designContext
+ .getDefaultInstance(this);
+ if (!designContext.shouldWriteChildren(this, def)) {
+ return;
+ }
+ // handle child component
+ Component child = getContent();
+ if (child != null) {
+ Element childNode = designContext.createElement(child);
+ design.appendChild(childNode);
+ }
+ }
+} \ No newline at end of file
diff --git a/server/src/com/vaadin/ui/AbstractSplitPanel.java b/server/src/com/vaadin/ui/AbstractSplitPanel.java
index a78f192fa2..414681f5dd 100644
--- a/server/src/com/vaadin/ui/AbstractSplitPanel.java
+++ b/server/src/com/vaadin/ui/AbstractSplitPanel.java
@@ -18,16 +18,23 @@ package com.vaadin.ui;
import java.io.Serializable;
import java.lang.reflect.Method;
+import java.util.Collection;
import java.util.Iterator;
+import org.jsoup.nodes.Element;
+
import com.vaadin.event.ConnectorEventListener;
import com.vaadin.event.MouseEvents.ClickEvent;
+import com.vaadin.server.SizeWithUnit;
import com.vaadin.server.Sizeable;
import com.vaadin.shared.EventId;
import com.vaadin.shared.MouseEventDetails;
import com.vaadin.shared.ui.splitpanel.AbstractSplitPanelRpc;
import com.vaadin.shared.ui.splitpanel.AbstractSplitPanelState;
import com.vaadin.shared.ui.splitpanel.AbstractSplitPanelState.SplitterState;
+import com.vaadin.ui.declarative.DesignAttributeHandler;
+import com.vaadin.ui.declarative.DesignContext;
+import com.vaadin.ui.declarative.DesignException;
import com.vaadin.util.ReflectTools;
/**
@@ -351,7 +358,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
* by the first region, but if split position is reversed the measuring is
* done by the second region instead.
*
- * @since
+ * @since 7.4
* @return {@code true} if reversed, {@code false} otherwise.
* @see #setSplitPosition(float, boolean)
*/
@@ -558,4 +565,125 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
private SplitterState getSplitterState(boolean markAsDirty) {
return ((AbstractSplitPanelState) super.getState(markAsDirty)).splitterState;
}
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractComponent#readDesign(org.jsoup.nodes .Element,
+ * com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void readDesign(Element design, DesignContext designContext) {
+ // handle default attributes
+ super.readDesign(design, designContext);
+ // handle custom attributes, use default values if no explicit value
+ // set
+ // There is no setter for reversed, so it will be handled using
+ // setSplitPosition.
+ boolean reversed = false;
+ if (design.hasAttr("reversed")) {
+ reversed = DesignAttributeHandler.readAttribute("reversed",
+ design.attributes(), Boolean.class);
+ setSplitPosition(getSplitPosition(), reversed);
+ }
+ if (design.hasAttr("split-position")) {
+ SizeWithUnit splitPosition = SizeWithUnit.parseStringSize(
+ design.attr("split-position"), Unit.PERCENTAGE);
+ setSplitPosition(splitPosition.getSize(), splitPosition.getUnit(),
+ reversed);
+ }
+ if (design.hasAttr("min-split-position")) {
+ SizeWithUnit minSplitPosition = SizeWithUnit.parseStringSize(
+ design.attr("min-split-position"), Unit.PERCENTAGE);
+ setMinSplitPosition(minSplitPosition.getSize(),
+ minSplitPosition.getUnit());
+ }
+ if (design.hasAttr("max-split-position")) {
+ SizeWithUnit maxSplitPosition = SizeWithUnit.parseStringSize(
+ design.attr("max-split-position"), Unit.PERCENTAGE);
+ setMaxSplitPosition(maxSplitPosition.getSize(),
+ maxSplitPosition.getUnit());
+ }
+ // handle children
+ if (design.children().size() > 2) {
+ throw new DesignException(
+ "A split panel can contain at most two components.");
+ }
+ for (Element childElement : design.children()) {
+ Component childComponent = designContext.readDesign(childElement);
+ if (childElement.hasAttr(":second")) {
+ setSecondComponent(childComponent);
+ } else {
+ addComponent(childComponent);
+ }
+ }
+ }
+
+ @Override
+ protected Collection<String> getCustomAttributes() {
+ Collection<String> attributes = super.getCustomAttributes();
+ // the setters of the properties do not accept strings such as "20px"
+ attributes.add("split-position");
+ attributes.add("min-split-position");
+ attributes.add("max-split-position");
+ // no explicit setter for reversed
+ attributes.add("reversed");
+ return attributes;
+ }
+
+ @Override
+ public void writeDesign(Element design, DesignContext designContext) {
+ // handle default attributes (also clears children and attributes)
+ super.writeDesign(design, designContext);
+ // handle custom attributes (write only if a value is not the
+ // default value)
+ AbstractSplitPanel def = (AbstractSplitPanel) designContext
+ .getDefaultInstance(this);
+ if (getSplitPosition() != def.getSplitPosition()
+ || !def.getSplitPositionUnit().equals(getSplitPositionUnit())) {
+ String splitPositionString = asString(getSplitPosition())
+ + getSplitPositionUnit();
+ design.attr("split-position", splitPositionString);
+ }
+ if (getMinSplitPosition() != def.getMinSplitPosition()
+ || !def.getMinSplitPositionUnit().equals(
+ getMinSplitPositionUnit())) {
+ design.attr("min-split-position", asString(getMinSplitPosition())
+ + getMinSplitPositionUnit());
+ }
+ if (getMaxSplitPosition() != def.getMaxSplitPosition()
+ || !def.getMaxSplitPositionUnit().equals(
+ getMaxSplitPositionUnit())) {
+ design.attr("max-split-position", asString(getMaxSplitPosition())
+ + getMaxSplitPositionUnit());
+ }
+ if (getSplitterState().positionReversed) {
+ design.attr("reversed", "");
+ }
+ // handle child components
+ if (!designContext.shouldWriteChildren(this, def)) {
+ return;
+ }
+ Component firstComponent = getFirstComponent();
+ Component secondComponent = getSecondComponent();
+ if (firstComponent != null) {
+ Element childElement = designContext.createElement(firstComponent);
+ design.appendChild(childElement);
+ }
+ if (secondComponent != null) {
+ Element childElement = designContext.createElement(secondComponent);
+ if (firstComponent == null) {
+ childElement.attr(":second", "");
+ }
+ design.appendChild(childElement);
+ }
+ }
+
+ private String asString(float number) {
+ int truncated = (int) number;
+ if (truncated == number) {
+ return "" + truncated;
+ }
+ return "" + number;
+ }
}
diff --git a/server/src/com/vaadin/ui/AbstractTextField.java b/server/src/com/vaadin/ui/AbstractTextField.java
index ea0372bc8c..93025ac0fd 100644
--- a/server/src/com/vaadin/ui/AbstractTextField.java
+++ b/server/src/com/vaadin/ui/AbstractTextField.java
@@ -16,8 +16,12 @@
package com.vaadin.ui;
+import java.util.Collection;
import java.util.Map;
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+
import com.vaadin.event.FieldEvents.BlurEvent;
import com.vaadin.event.FieldEvents.BlurListener;
import com.vaadin.event.FieldEvents.BlurNotifier;
@@ -31,6 +35,8 @@ import com.vaadin.server.PaintException;
import com.vaadin.server.PaintTarget;
import com.vaadin.shared.ui.textfield.AbstractTextFieldState;
import com.vaadin.shared.ui.textfield.TextFieldConstants;
+import com.vaadin.ui.declarative.DesignAttributeHandler;
+import com.vaadin.ui.declarative.DesignContext;
public abstract class AbstractTextField extends AbstractField<String> implements
BlurNotifier, FocusNotifier, TextChangeNotifier, LegacyComponent {
@@ -757,4 +763,51 @@ public abstract class AbstractTextField extends AbstractField<String> implements
removeBlurListener(listener);
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractField#readDesign(org.jsoup.nodes.Element ,
+ * com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void readDesign(Element design, DesignContext designContext) {
+ super.readDesign(design, designContext);
+ Attributes attr = design.attributes();
+ if (attr.hasKey("maxlength")) {
+ setMaxLength(DesignAttributeHandler.readAttribute("maxlength",
+ attr, Integer.class));
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractField#getCustomAttributes()
+ */
+ @Override
+ protected Collection<String> getCustomAttributes() {
+ Collection<String> customAttributes = super.getCustomAttributes();
+ customAttributes.add("maxlength");
+ customAttributes.add("max-length"); // to prevent this appearing in
+ // output
+ customAttributes.add("cursor-position");
+ return customAttributes;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractField#writeDesign(org.jsoup.nodes.Element,
+ * com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void writeDesign(Element design, DesignContext designContext) {
+ super.writeDesign(design, designContext);
+ AbstractTextField def = (AbstractTextField) designContext
+ .getDefaultInstance(this);
+ Attributes attr = design.attributes();
+ DesignAttributeHandler.writeAttribute("maxlength", attr,
+ getMaxLength(), def.getMaxLength(), Integer.class);
+ }
+
}
diff --git a/server/src/com/vaadin/ui/Button.java b/server/src/com/vaadin/ui/Button.java
index e58ad7bee5..677f29ba13 100644
--- a/server/src/com/vaadin/ui/Button.java
+++ b/server/src/com/vaadin/ui/Button.java
@@ -18,6 +18,10 @@ package com.vaadin.ui;
import java.io.Serializable;
import java.lang.reflect.Method;
+import java.util.Collection;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
import com.vaadin.event.Action;
import com.vaadin.event.FieldEvents;
@@ -35,6 +39,8 @@ import com.vaadin.shared.MouseEventDetails;
import com.vaadin.shared.ui.button.ButtonServerRpc;
import com.vaadin.shared.ui.button.ButtonState;
import com.vaadin.ui.Component.Focusable;
+import com.vaadin.ui.declarative.DesignAttributeHandler;
+import com.vaadin.ui.declarative.DesignContext;
import com.vaadin.util.ReflectTools;
/**
@@ -636,7 +642,7 @@ public class Button extends AbstractComponent implements
/**
* Set whether the caption text is rendered as HTML or not. You might need
- * to retheme button to allow higher content than the original text style.
+ * to re-theme button to allow higher content than the original text style.
*
* If set to true, the captions are passed to the browser as html and the
* developer is responsible for ensuring no harmful html is used. If set to
@@ -647,7 +653,7 @@ public class Button extends AbstractComponent implements
* <code>false</code> otherwise
*/
public void setHtmlContentAllowed(boolean htmlContentAllowed) {
- getState().htmlContentAllowed = htmlContentAllowed;
+ getState().captionAsHtml = htmlContentAllowed;
}
/**
@@ -657,7 +663,85 @@ public class Button extends AbstractComponent implements
* <code>false</code> otherwise
*/
public boolean isHtmlContentAllowed() {
- return getState(false).htmlContentAllowed;
+ return getState(false).captionAsHtml;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractComponent#readDesign(org.jsoup.nodes .Element,
+ * com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void readDesign(Element design, DesignContext designContext) {
+ super.readDesign(design, designContext);
+ Attributes attr = design.attributes();
+ String content = design.html();
+ setCaption(content);
+ // plain-text (default is html)
+ Boolean plain = DesignAttributeHandler.readAttribute(
+ DESIGN_ATTR_PLAIN_TEXT, attr, Boolean.class);
+ if (plain == null || !plain) {
+ setHtmlContentAllowed(true);
+ }
+ if (attr.hasKey("icon-alt")) {
+ setIconAlternateText(DesignAttributeHandler.readAttribute(
+ "icon-alt", attr, String.class));
+ }
+ // click-shortcut
+ removeClickShortcut();
+ ShortcutAction action = DesignAttributeHandler.readAttribute(
+ "click-shortcut", attr, ShortcutAction.class);
+ if (action != null) {
+ setClickShortcut(action.getKeyCode(), action.getModifiers());
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractComponent#getCustomAttributes()
+ */
+ @Override
+ protected Collection<String> getCustomAttributes() {
+ Collection<String> result = super.getCustomAttributes();
+ result.add(DESIGN_ATTR_PLAIN_TEXT);
+ result.add("caption");
+ result.add("icon-alt");
+ result.add("icon-alternate-text");
+ result.add("click-shortcut");
+ result.add("html-content-allowed");
+ result.add("caption-as-html");
+ return result;
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractComponent#writeDesign(org.jsoup.nodes.Element
+ * , com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void writeDesign(Element design, DesignContext designContext) {
+ super.writeDesign(design, designContext);
+ Attributes attr = design.attributes();
+ Button def = (Button) designContext.getDefaultInstance(this);
+ String content = getCaption();
+ if (content != null) {
+ design.html(content);
+ }
+ // plain-text (default is html)
+ if (!isHtmlContentAllowed()) {
+ design.attr(DESIGN_ATTR_PLAIN_TEXT, "");
+ }
+ // icon-alt
+ DesignAttributeHandler.writeAttribute("icon-alt", attr,
+ getIconAlternateText(), def.getIconAlternateText(),
+ String.class);
+ // click-shortcut
+ if (clickShortcut != null) {
+ DesignAttributeHandler.writeAttribute("click-shortcut", attr,
+ clickShortcut, null, ShortcutAction.class);
+ }
+ }
}
diff --git a/server/src/com/vaadin/ui/Calendar.java b/server/src/com/vaadin/ui/Calendar.java
index 72ff6eb0e0..5b5c390fa1 100644
--- a/server/src/com/vaadin/ui/Calendar.java
+++ b/server/src/com/vaadin/ui/Calendar.java
@@ -918,7 +918,7 @@ public class Calendar extends AbstractComponent implements
*
* @return true if the client is allowed to click events
* @see #isClientChangeAllowed()
- * @deprecated Override {@link #fireEventClick(Integer)} instead.
+ * @deprecated As of 7.4, override {@link #fireEventClick(Integer)} instead.
*/
@Deprecated
protected boolean isEventClickAllowed() {
diff --git a/server/src/com/vaadin/ui/CheckBox.java b/server/src/com/vaadin/ui/CheckBox.java
index 7d9da30f29..e98a2b61b9 100644
--- a/server/src/com/vaadin/ui/CheckBox.java
+++ b/server/src/com/vaadin/ui/CheckBox.java
@@ -16,6 +16,11 @@
package com.vaadin.ui;
+import java.util.Collection;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+
import com.vaadin.data.Property;
import com.vaadin.event.FieldEvents.BlurEvent;
import com.vaadin.event.FieldEvents.BlurListener;
@@ -25,6 +30,8 @@ import com.vaadin.event.FieldEvents.FocusListener;
import com.vaadin.shared.MouseEventDetails;
import com.vaadin.shared.ui.checkbox.CheckBoxServerRpc;
import com.vaadin.shared.ui.checkbox.CheckBoxState;
+import com.vaadin.ui.declarative.DesignAttributeHandler;
+import com.vaadin.ui.declarative.DesignContext;
public class CheckBox extends AbstractField<Boolean> {
@@ -203,4 +210,58 @@ public class CheckBox extends AbstractField<Boolean> {
Boolean value = getValue();
return (null == value) ? false : value.booleanValue();
}
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractField#readDesign(org.jsoup.nodes.Element,
+ * com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void readDesign(Element design, DesignContext designContext) {
+ super.readDesign(design, designContext);
+ if (design.hasAttr("checked")) {
+ this.setValue(DesignAttributeHandler.readAttribute("checked",
+ design.attributes(), Boolean.class));
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractField#getCustomAttributes()
+ */
+ @Override
+ protected Collection<String> getCustomAttributes() {
+ Collection<String> attributes = super.getCustomAttributes();
+ attributes.add("checked");
+ return attributes;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractField#writeDesign(org.jsoup.nodes.Element,
+ * com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void writeDesign(Element design, DesignContext designContext) {
+ super.writeDesign(design, designContext);
+ CheckBox def = (CheckBox) designContext.getDefaultInstance(this);
+ Attributes attr = design.attributes();
+ DesignAttributeHandler.writeAttribute("checked", attr, getValue(),
+ def.getValue(), Boolean.class);
+ }
+
+ @Override
+ public void clear() {
+ setValue(Boolean.FALSE);
+ }
+
+ @Override
+ public boolean isEmpty() {
+ return getValue() == null || getValue().equals(Boolean.FALSE);
+
+ }
+
}
diff --git a/server/src/com/vaadin/ui/Component.java b/server/src/com/vaadin/ui/Component.java
index e10b5e1cd9..9e0816a398 100644
--- a/server/src/com/vaadin/ui/Component.java
+++ b/server/src/com/vaadin/ui/Component.java
@@ -19,6 +19,8 @@ package com.vaadin.ui;
import java.io.Serializable;
import java.util.Locale;
+import org.jsoup.nodes.Element;
+
import com.vaadin.event.ConnectorEvent;
import com.vaadin.event.ConnectorEventListener;
import com.vaadin.event.FieldEvents;
@@ -27,6 +29,7 @@ import com.vaadin.server.ErrorMessage;
import com.vaadin.server.Resource;
import com.vaadin.server.Sizeable;
import com.vaadin.server.VariableOwner;
+import com.vaadin.ui.declarative.DesignContext;
/**
* {@code Component} is the top-level interface that is and must be implemented
@@ -726,6 +729,44 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
*/
public String getDescription();
+ /* Declarative support */
+
+ /**
+ * Reads the component state from the given design.
+ * <p>
+ * The component is responsible not only for updating its own state but also
+ * for ensuring that its children update their state based on the design.
+ * <p>
+ * It is assumed that the component is in its default state when this method
+ * is called. Reading should only take into consideration attributes
+ * specified in the design and not reset any unspecified attributes to their
+ * defaults.
+ * <p>
+ * This method must not modify the design.
+ *
+ * @since 7.4
+ * @param design
+ * The design as HTML to obtain the state from
+ * @param designContext
+ * The DesignContext instance used for parsing the design
+ */
+ public void readDesign(Element design, DesignContext designContext);
+
+ /**
+ * Writes the component state to the given design.
+ * <p>
+ * The component is responsible not only for writing its own state but also
+ * for ensuring that its children write their state to the design.
+ * <p>
+ * This method must not modify the component state.
+ *
+ * @since 7.4
+ * @param design
+ * The design as HTML to update with the current state
+ * @param designContext
+ */
+ public void writeDesign(Element design, DesignContext designContext);
+
/* Component event framework */
/**
diff --git a/server/src/com/vaadin/ui/CssLayout.java b/server/src/com/vaadin/ui/CssLayout.java
index 350423576f..dbedfa53ff 100644
--- a/server/src/com/vaadin/ui/CssLayout.java
+++ b/server/src/com/vaadin/ui/CssLayout.java
@@ -18,6 +18,8 @@ package com.vaadin.ui;
import java.util.Iterator;
import java.util.LinkedList;
+import org.jsoup.nodes.Element;
+
import com.vaadin.event.LayoutEvents.LayoutClickEvent;
import com.vaadin.event.LayoutEvents.LayoutClickListener;
import com.vaadin.event.LayoutEvents.LayoutClickNotifier;
@@ -26,6 +28,7 @@ import com.vaadin.shared.EventId;
import com.vaadin.shared.MouseEventDetails;
import com.vaadin.shared.ui.csslayout.CssLayoutServerRpc;
import com.vaadin.shared.ui.csslayout.CssLayoutState;
+import com.vaadin.ui.declarative.DesignContext;
/**
* CssLayout is a layout component that can be used in browser environment only.
@@ -354,4 +357,43 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier {
return components.get(index);
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractComponent#readDesign(org.jsoup.nodes .Element,
+ * com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void readDesign(Element design, DesignContext designContext) {
+ // process default attributes
+ super.readDesign(design, designContext);
+ // handle children
+ for (Element childComponent : design.children()) {
+ Component newChild = designContext.readDesign(childComponent);
+ addComponent(newChild);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractComponent#writeDesign(org.jsoup.nodes.Element
+ * , com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void writeDesign(Element design, DesignContext designContext) {
+ // write default attributes
+ super.writeDesign(design, designContext);
+ CssLayout def = designContext.getDefaultInstance(this);
+ // handle children
+ if (!designContext.shouldWriteChildren(this, def)) {
+ return;
+ }
+ Element designElement = design;
+ for (Component child : this) {
+ Element childNode = designContext.createElement(child);
+ designElement.appendChild(childNode);
+ }
+ }
+
}
diff --git a/server/src/com/vaadin/ui/Field.java b/server/src/com/vaadin/ui/Field.java
index 6dee4de6cb..8a9acd570f 100644
--- a/server/src/com/vaadin/ui/Field.java
+++ b/server/src/com/vaadin/ui/Field.java
@@ -120,7 +120,7 @@ public interface Field<T> extends Component, BufferedValidatable, Property<T>,
* In general, "empty" state is same as null. As an exception, TextField
* also treats empty string as "empty".
*
- * @since
+ * @since 7.4
* @return true if the field is empty, false otherwise
*/
public boolean isEmpty();
@@ -131,7 +131,7 @@ public interface Field<T> extends Component, BufferedValidatable, Property<T>,
* The field value is typically reset to the initial value of the field.
* Calling {@link #isEmpty()} on a cleared field must always returns true.
*
- * @since
+ * @since 7.4
*/
public void clear();
diff --git a/server/src/com/vaadin/ui/Label.java b/server/src/com/vaadin/ui/Label.java
index c73840e6e9..a6ee11bdd5 100644
--- a/server/src/com/vaadin/ui/Label.java
+++ b/server/src/com/vaadin/ui/Label.java
@@ -17,8 +17,11 @@
package com.vaadin.ui;
import java.lang.reflect.Method;
+import java.util.Collection;
import java.util.Locale;
+import org.jsoup.nodes.Element;
+
import com.vaadin.data.Property;
import com.vaadin.data.util.AbstractProperty;
import com.vaadin.data.util.LegacyPropertyHelper;
@@ -27,6 +30,7 @@ import com.vaadin.data.util.converter.ConverterUtil;
import com.vaadin.shared.ui.label.ContentMode;
import com.vaadin.shared.ui.label.LabelState;
import com.vaadin.shared.util.SharedUtil;
+import com.vaadin.ui.declarative.DesignContext;
/**
* Label component for showing non-editable short texts.
@@ -570,4 +574,57 @@ public class Label extends AbstractComponent implements Property<String>,
return LegacyPropertyHelper.legacyPropertyToString(this);
}
}
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractComponent#readDesign(org.jsoup.nodes .Element,
+ * com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void readDesign(Element design, DesignContext designContext) {
+ super.readDesign(design, designContext);
+ String innerHtml = design.html();
+ if (innerHtml != null && !"".equals(innerHtml)) {
+ setValue(innerHtml);
+ }
+ if (design.hasAttr(DESIGN_ATTR_PLAIN_TEXT)) {
+ setContentMode(ContentMode.TEXT);
+ } else {
+ setContentMode(ContentMode.HTML);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractComponent#getCustomAttributes()
+ */
+ @Override
+ protected Collection<String> getCustomAttributes() {
+ Collection<String> result = super.getCustomAttributes();
+ result.add("value");
+ result.add("content-mode");
+ result.add("plain-text");
+ return result;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractComponent#writeDesign(org.jsoup.nodes.Element
+ * , com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void writeDesign(Element design, DesignContext designContext) {
+ super.writeDesign(design, designContext);
+ String content = getValue();
+ if (content != null) {
+ design.html(getValue());
+ }
+ // plain-text (default is html)
+ if (getContentMode() == ContentMode.TEXT) {
+ design.attr(DESIGN_ATTR_PLAIN_TEXT, "");
+ }
+ }
}
diff --git a/server/src/com/vaadin/ui/Panel.java b/server/src/com/vaadin/ui/Panel.java
index 9b1d8fd5fa..6458d5f57d 100644
--- a/server/src/com/vaadin/ui/Panel.java
+++ b/server/src/com/vaadin/ui/Panel.java
@@ -16,8 +16,11 @@
package com.vaadin.ui;
+import java.util.Collection;
import java.util.Map;
+import org.jsoup.nodes.Element;
+
import com.vaadin.event.Action;
import com.vaadin.event.Action.Handler;
import com.vaadin.event.ActionManager;
@@ -31,6 +34,7 @@ import com.vaadin.shared.MouseEventDetails;
import com.vaadin.shared.ui.panel.PanelServerRpc;
import com.vaadin.shared.ui.panel.PanelState;
import com.vaadin.ui.Component.Focusable;
+import com.vaadin.ui.declarative.DesignContext;
/**
* Panel - a simple single component container.
@@ -339,4 +343,22 @@ public class Panel extends AbstractSingleComponentContainer implements
return (PanelState) super.getState(markAsDirty);
}
+ @Override
+ public void readDesign(Element design, DesignContext designContext) {
+ super.readDesign(design, designContext);
+ }
+
+ @Override
+ protected Collection<String> getCustomAttributes() {
+ Collection<String> attributes = super.getCustomAttributes();
+ return attributes;
+ }
+
+ @Override
+ public void writeDesign(Element design, DesignContext designContext) {
+ super.writeDesign(design, designContext);
+ // handle tabindex
+ Panel def = (Panel) designContext.getDefaultInstance(this);
+ }
+
}
diff --git a/server/src/com/vaadin/ui/PasswordField.java b/server/src/com/vaadin/ui/PasswordField.java
index 107e40c149..1894804775 100644
--- a/server/src/com/vaadin/ui/PasswordField.java
+++ b/server/src/com/vaadin/ui/PasswordField.java
@@ -15,7 +15,12 @@
*/
package com.vaadin.ui;
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+
import com.vaadin.data.Property;
+import com.vaadin.ui.declarative.DesignAttributeHandler;
+import com.vaadin.ui.declarative.DesignContext;
/**
* A field that is used to enter secret text information like passwords. The
@@ -76,4 +81,36 @@ public class PasswordField extends AbstractTextField {
this();
setCaption(caption);
}
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractField#readDesign(org.jsoup.nodes.Element ,
+ * com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void readDesign(Element design, DesignContext designContext) {
+ super.readDesign(design, designContext);
+ Attributes attr = design.attributes();
+ if (attr.hasKey("value")) {
+ setValue(DesignAttributeHandler.readAttribute("value", attr,
+ String.class));
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractTextField#writeDesign(org.jsoup.nodes.Element
+ * , com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void writeDesign(Element design, DesignContext designContext) {
+ super.writeDesign(design, designContext);
+ AbstractTextField def = (AbstractTextField) designContext
+ .getDefaultInstance(this);
+ Attributes attr = design.attributes();
+ DesignAttributeHandler.writeAttribute("value", attr, getValue(),
+ def.getValue(), String.class);
+ }
}
diff --git a/server/src/com/vaadin/ui/TabSheet.java b/server/src/com/vaadin/ui/TabSheet.java
index 88002104b1..266c93e81f 100644
--- a/server/src/com/vaadin/ui/TabSheet.java
+++ b/server/src/com/vaadin/ui/TabSheet.java
@@ -19,11 +19,15 @@ package com.vaadin.ui;
import java.io.Serializable;
import java.lang.reflect.Method;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+
import com.vaadin.event.FieldEvents.BlurEvent;
import com.vaadin.event.FieldEvents.BlurListener;
import com.vaadin.event.FieldEvents.BlurNotifier;
@@ -40,6 +44,9 @@ import com.vaadin.shared.ui.tabsheet.TabsheetClientRpc;
import com.vaadin.shared.ui.tabsheet.TabsheetServerRpc;
import com.vaadin.shared.ui.tabsheet.TabsheetState;
import com.vaadin.ui.Component.Focusable;
+import com.vaadin.ui.declarative.DesignAttributeHandler;
+import com.vaadin.ui.declarative.DesignContext;
+import com.vaadin.ui.declarative.DesignException;
import com.vaadin.ui.themes.Reindeer;
import com.vaadin.ui.themes.Runo;
@@ -243,7 +250,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
* the removed tab if it's not the last one, otherwise will choose the
* closer enabled tab to the left.
*
- * @since
+ * @since 7.4
* @param removedTabIndex
* the index of the selected tab which was just remove.
* @return the index of the tab to be selected or -1 if there are no more
@@ -1446,4 +1453,172 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
protected TabsheetState getState() {
return (TabsheetState) super.getState();
}
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractComponent#readDesign(org.jsoup.nodes .Element,
+ * com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void readDesign(Element design, DesignContext designContext) {
+ super.readDesign(design, designContext);
+ // create new tabs
+ for (Element tab : design.children()) {
+ if (!tab.tagName().equals("tab")) {
+ throw new DesignException("Invalid tag name for tabsheet tab "
+ + tab.tagName());
+ }
+ readTabFromDesign(tab, designContext);
+ }
+ }
+
+ /**
+ * Reads the given tab element from design
+ *
+ * @since 7.4
+ *
+ * @param tabElement
+ * the element to be read
+ * @param designContext
+ * the design context
+ */
+ private void readTabFromDesign(Element tabElement,
+ DesignContext designContext) {
+ Attributes attr = tabElement.attributes();
+ if (tabElement.children().size() != 1) {
+ throw new DesignException(
+ "A tab must have exactly one child element");
+ }
+ // create the component that is in tab content
+ Element content = tabElement.child(0);
+ Component child = designContext.readDesign(content);
+ Tab tab = this.addTab(child);
+ if (attr.hasKey("visible")) {
+ tab.setVisible(DesignAttributeHandler.readAttribute("visible",
+ attr, Boolean.class));
+ }
+ if (attr.hasKey("closable")) {
+ tab.setClosable(DesignAttributeHandler.readAttribute("closable",
+ attr, Boolean.class));
+ }
+ if (attr.hasKey("caption")) {
+ tab.setCaption(DesignAttributeHandler.readAttribute("caption",
+ attr, String.class));
+ }
+ if (attr.hasKey("enabled")) {
+ tab.setEnabled(DesignAttributeHandler.readAttribute("enabled",
+ attr, Boolean.class));
+ }
+ if (attr.hasKey("icon")) {
+ tab.setIcon(DesignAttributeHandler.readAttribute("icon", attr,
+ Resource.class));
+ }
+ if (attr.hasKey("icon-alt")) {
+ tab.setIconAlternateText(DesignAttributeHandler.readAttribute(
+ "icon-alt", attr, String.class));
+ }
+ if (attr.hasKey("description")) {
+ tab.setDescription(DesignAttributeHandler.readAttribute(
+ "description", attr, String.class));
+ }
+ if (attr.hasKey("style-name")) {
+ tab.setStyleName(DesignAttributeHandler.readAttribute("style-name",
+ attr, String.class));
+ }
+ if (attr.hasKey("id")) {
+ tab.setId(DesignAttributeHandler.readAttribute("id", attr,
+ String.class));
+ }
+ if (attr.hasKey("selected")) {
+ boolean selected = DesignAttributeHandler.readAttribute("selected",
+ attr, Boolean.class);
+ if (selected) {
+ this.setSelectedTab(tab.getComponent());
+ }
+ }
+ }
+
+ /**
+ * Writes the given tab to design
+ *
+ * @since 7.4
+ * @param design
+ * the design node for tabsheet
+ * @param designContext
+ * the design context
+ * @param tab
+ * the tab to be written
+ */
+ private void writeTabToDesign(Element design, DesignContext designContext,
+ Tab tab) {
+ // get default tab instance
+ Tab def = new TabSheetTabImpl(null, null, null);
+ // create element for tab
+ Element tabElement = design.appendElement("tab");
+ // add tab content
+ tabElement.appendChild(designContext.createElement(tab.getComponent()));
+ Attributes attr = tabElement.attributes();
+ // write attributes
+ DesignAttributeHandler.writeAttribute("visible", attr, tab.isVisible(),
+ def.isVisible(), Boolean.class);
+ DesignAttributeHandler.writeAttribute("closable", attr,
+ tab.isClosable(), def.isClosable(), Boolean.class);
+ DesignAttributeHandler.writeAttribute("caption", attr,
+ tab.getCaption(), def.getCaption(), String.class);
+ DesignAttributeHandler.writeAttribute("enabled", attr, tab.isEnabled(),
+ def.isEnabled(), Boolean.class);
+ DesignAttributeHandler.writeAttribute("icon", attr, tab.getIcon(),
+ def.getIcon(), Resource.class);
+ DesignAttributeHandler.writeAttribute("icon-alt", attr,
+ tab.getIconAlternateText(), def.getIconAlternateText(),
+ String.class);
+ DesignAttributeHandler.writeAttribute("description", attr,
+ tab.getDescription(), def.getDescription(), String.class);
+ DesignAttributeHandler.writeAttribute("style-name", attr,
+ tab.getStyleName(), def.getStyleName(), String.class);
+ DesignAttributeHandler.writeAttribute("id", attr, tab.getId(),
+ def.getId(), String.class);
+ if (getSelectedTab() != null
+ && getSelectedTab().equals(tab.getComponent())) {
+ // use write attribute to get consistent handling for boolean
+ DesignAttributeHandler.writeAttribute("selected", attr, true,
+ false, boolean.class);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractComponent#getCustomAttributes()
+ */
+ @Override
+ protected Collection<String> getCustomAttributes() {
+ Collection<String> attributes = super.getCustomAttributes();
+ // no need to list tab attributes since they are considered internal
+ return attributes;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractComponent#writeDesign(org.jsoup.nodes.Element
+ * , com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void writeDesign(Element design, DesignContext designContext) {
+ super.writeDesign(design, designContext);
+ TabSheet def = (TabSheet) designContext.getDefaultInstance(this);
+ Attributes attr = design.attributes();
+
+ // write tabs
+ if (!designContext.shouldWriteChildren(this, def)) {
+ return;
+ }
+ for (Component component : this) {
+ Tab tab = this.getTab(component);
+ writeTabToDesign(design, designContext, tab);
+ }
+ }
+
}
diff --git a/server/src/com/vaadin/ui/TextArea.java b/server/src/com/vaadin/ui/TextArea.java
index e38be8ad3c..c8103f9c5b 100644
--- a/server/src/com/vaadin/ui/TextArea.java
+++ b/server/src/com/vaadin/ui/TextArea.java
@@ -16,8 +16,11 @@
package com.vaadin.ui;
+import org.jsoup.nodes.Element;
+
import com.vaadin.data.Property;
import com.vaadin.shared.ui.textarea.TextAreaState;
+import com.vaadin.ui.declarative.DesignContext;
/**
* A text field that supports multi line editing.
@@ -133,4 +136,27 @@ public class TextArea extends AbstractTextField {
return getState(false).wordwrap;
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractField#readDesign(org.jsoup.nodes.Element ,
+ * com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void readDesign(Element design, DesignContext designContext) {
+ super.readDesign(design, designContext);
+ setValue(design.html());
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractTextField#writeDesign(org.jsoup.nodes.Element
+ * , com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void writeDesign(Element design, DesignContext designContext) {
+ super.writeDesign(design, designContext);
+ design.html(getValue());
+ }
}
diff --git a/server/src/com/vaadin/ui/TextField.java b/server/src/com/vaadin/ui/TextField.java
index 1fc10c6ced..2a61e93211 100644
--- a/server/src/com/vaadin/ui/TextField.java
+++ b/server/src/com/vaadin/ui/TextField.java
@@ -16,7 +16,12 @@
package com.vaadin.ui;
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+
import com.vaadin.data.Property;
+import com.vaadin.ui.declarative.DesignAttributeHandler;
+import com.vaadin.ui.declarative.DesignContext;
/**
* <p>
@@ -102,6 +107,38 @@ public class TextField extends AbstractTextField {
/*
* (non-Javadoc)
*
+ * @see com.vaadin.ui.AbstractTextField#readDesign(org.jsoup.nodes.Element,
+ * com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void readDesign(Element design, DesignContext designContext) {
+ super.readDesign(design, designContext);
+ Attributes attr = design.attributes();
+ if (attr.hasKey("value")) {
+ setValue(DesignAttributeHandler.readAttribute("value", attr,
+ String.class));
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractTextField#writeDesign(org.jsoup.nodes.Element
+ * , com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void writeDesign(Element design, DesignContext designContext) {
+ super.writeDesign(design, designContext);
+ AbstractTextField def = (AbstractTextField) designContext
+ .getDefaultInstance(this);
+ Attributes attr = design.attributes();
+ DesignAttributeHandler.writeAttribute("value", attr, getValue(),
+ def.getValue(), String.class);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
* @see com.vaadin.ui.AbstractField#clear()
*/
@Override
diff --git a/server/src/com/vaadin/ui/declarative/Design.java b/server/src/com/vaadin/ui/declarative/Design.java
new file mode 100644
index 0000000000..59393a7815
--- /dev/null
+++ b/server/src/com/vaadin/ui/declarative/Design.java
@@ -0,0 +1,481 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.ui.declarative;
+
+import java.beans.IntrospectionException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Serializable;
+import java.lang.annotation.Annotation;
+import java.util.Collection;
+
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Document;
+import org.jsoup.nodes.Document.OutputSettings.Syntax;
+import org.jsoup.nodes.DocumentType;
+import org.jsoup.nodes.Element;
+import org.jsoup.nodes.Node;
+import org.jsoup.parser.Parser;
+import org.jsoup.select.Elements;
+
+import com.vaadin.annotations.DesignRoot;
+import com.vaadin.ui.Component;
+import com.vaadin.ui.declarative.DesignContext.ComponentCreatedEvent;
+import com.vaadin.ui.declarative.DesignContext.ComponentCreationListener;
+
+/**
+ * Design is used for reading a component hierarchy from an html string or input
+ * stream and, conversely, for writing an html representation corresponding to a
+ * given component hierarchy.
+ *
+ * <p>
+ * In html form a valid nonempty component hierarchy contains a single root
+ * element located under the &lt;body&gt; tag. A hierarchy of components is
+ * achieved by nesting other elements under the root element. An empty component
+ * hierarchy is represented as no elements under the &lt;body&gt; tag.
+ *
+ * <p>
+ * For writing a component hierarchy the root element is specified as a
+ * Component parameter or as a DesignContext object containing the root
+ * Component. An empty hierarchy can be written by giving a null root Component.
+ *
+ * @since 7.4
+ * @author Vaadin Ltd
+ */
+public class Design implements Serializable {
+ /**
+ * Parses the given input stream into a jsoup document
+ *
+ * @param html
+ * the stream containing the design
+ * @return the parsed jsoup document
+ * @throws IOException
+ */
+ private static Document parse(InputStream html) {
+ try {
+ Document doc = Jsoup.parse(html, "UTF-8", "", Parser.htmlParser());
+ return doc;
+ } catch (IOException e) {
+ throw new DesignException("The html document cannot be parsed.");
+ }
+
+ }
+
+ /**
+ * Constructs a component hierarchy from the design specified as an html
+ * document. The hierarchy must contain at most one top-level component,
+ * which should be located under &lt;body&gt;. Also invalid html containing
+ * the hierarchy without &lt;html&gt;, &lt;head&gt; and &lt;body&gt; tags is
+ * accepted. You can optionally pass an instance for the root component with
+ * some uninitialized instance fields. The fields will be automatically
+ * populated when parsing the design based on the component ids, local ids,
+ * and captions of the components in the design.
+ *
+ * @param html
+ * the html document describing the component design
+ * @param rootInstance
+ * the root instance with fields to be mapped to components in
+ * the design
+ * @return the DesignContext created while traversing the tree. The
+ * top-level component of the created component hierarchy can be
+ * accessed using result.getRootComponent(), where result is the
+ * object returned by this method.
+ * @throws IOException
+ */
+ private static DesignContext parse(InputStream html, Component rootInstance) {
+ Document doc = parse(html);
+ return designToComponentTree(doc, rootInstance);
+ }
+
+ /**
+ * Constructs a component hierarchy from the design specified as an html
+ * document given as a string. The hierarchy must contain at most one
+ * top-level component, which should be located under &lt;body&gt;. Also
+ * invalid html containing the hierarchy without &lt;html&gt;, &lt;head&gt;
+ * and &lt;body&gt; tags is accepted. You can optionally pass an instance
+ * for the root component with some uninitialized instance fields. The
+ * fields will be automatically populated when parsing the design based on
+ * the component ids, local ids, and captions of the components in the
+ * design.
+ *
+ * @param html
+ * the html document describing the component design
+ * @param rootInstance
+ * the root instance with fields to be mapped to components in
+ * the design
+ * @return the DesignContext created while traversing the tree. The
+ * top-level component of the created component hierarchy can be
+ * accessed using result.getRootComponent(), where result is the
+ * object returned by this method.
+ * @throws IOException
+ */
+ private static DesignContext parse(String html, Component rootInstance) {
+ Document doc = Jsoup.parse(html);
+ return designToComponentTree(doc, rootInstance);
+ }
+
+ /**
+ * Constructs a component hierarchy from the design specified as an html
+ * tree.
+ *
+ * <p>
+ * If a component root is given, the component instances created during
+ * reading the design are assigned to its member fields based on their id,
+ * local id, and caption
+ *
+ * @param doc
+ * the html tree
+ * @param componentRoot
+ * optional component root instance. The type must match the type
+ * of the root element in the design. Any member fields whose
+ * type is assignable from {@link Component} are bound to fields
+ * in the design based on id/local id/caption
+ */
+ private static DesignContext designToComponentTree(Document doc,
+ Component componentRoot) {
+ if (componentRoot == null) {
+ return designToComponentTree(doc, null, null);
+ } else {
+ return designToComponentTree(doc, componentRoot,
+ componentRoot.getClass());
+ }
+
+ }
+
+ /**
+ * Constructs a component hierarchy from the design specified as an html
+ * tree.
+ *
+ * <p>
+ * If a component root is given, the component instances created during
+ * reading the design are assigned to its member fields based on their id,
+ * local id, and caption
+ *
+ * @param doc
+ * the html tree
+ * @param componentRoot
+ * optional component root instance. The type must match the type
+ * of the root element in the design.
+ * @param classWithFields
+ * a class (componentRoot class or a super class) with some
+ * member fields. The member fields whose type is assignable from
+ * {@link Component} are bound to fields in the design based on
+ * id/local id/caption
+ */
+ private static DesignContext designToComponentTree(Document doc,
+ Component componentRoot, Class<?> classWithFields) {
+ DesignContext designContext = new DesignContext(doc);
+ designContext.readPackageMappings(doc);
+ // No special handling for a document without a body element - should be
+ // taken care of by jsoup.
+ Element root = doc.body();
+ Elements children = root.children();
+ if (children.size() != 1) {
+ throw new DesignException(
+ "The first level of a component hierarchy should contain exactly one root component, but found "
+ + children.size());
+ }
+ Element element = children.first();
+ if (componentRoot != null) {
+ // user has specified root instance that may have member fields that
+ // should be bound
+ final FieldBinder binder;
+ try {
+ binder = new FieldBinder(componentRoot, classWithFields);
+ } catch (IntrospectionException e) {
+ throw new DesignException(
+ "Could not bind fields of the root component", e);
+ }
+ // create listener for component creations that binds the created
+ // components to the componentRoot instance fields
+ ComponentCreationListener creationListener = new ComponentCreationListener() {
+ @Override
+ public void componentCreated(ComponentCreatedEvent event) {
+ binder.bindField(event.getComponent(), event.getLocalId());
+ }
+ };
+ designContext.addComponentCreationListener(creationListener);
+ // create subtree
+ designContext.readDesign(element, componentRoot);
+ // make sure that all the member fields are bound
+ Collection<String> unboundFields = binder.getUnboundFields();
+ if (!unboundFields.isEmpty()) {
+ throw new DesignException(
+ "Found unbound fields from component root "
+ + unboundFields);
+ }
+ // no need to listen anymore
+ designContext.removeComponentCreationListener(creationListener);
+ } else {
+ // createChild creates the entire component hierarchy
+ componentRoot = designContext.readDesign(element);
+ }
+ designContext.setRootComponent(componentRoot);
+ return designContext;
+ }
+
+ /**
+ * Generates an html tree representation of the component hierarchy having
+ * the root designContext.getRootComponent(). The hierarchy is stored under
+ * &lt;body&gt; in the tree. The generated tree represents a valid html
+ * document.
+ *
+ *
+ * @param designContext
+ * a DesignContext object specifying the root component
+ * (designContext.getRootComponent()) of the hierarchy
+ * @return an html tree representation of the component hierarchy
+ */
+ private static Document createHtml(DesignContext designContext) {
+ // Create the html tree skeleton.
+ Document doc = new Document("");
+ DocumentType docType = new DocumentType("html", "", "", "");
+ doc.appendChild(docType);
+ Element html = doc.createElement("html");
+ doc.appendChild(html);
+ html.appendChild(doc.createElement("head"));
+ Element body = doc.createElement("body");
+ html.appendChild(body);
+
+ // Append the design under <body> in the html tree. createNode
+ // creates the entire component hierarchy rooted at the
+ // given root node.
+ Component root = designContext.getRootComponent();
+ Node rootNode = designContext.createElement(root);
+ body.appendChild(rootNode);
+ designContext.writePackageMappings(doc);
+ return doc;
+ }
+
+ /**
+ * Loads a design for the given root component.
+ * <p>
+ * This methods assumes that the component class (or a super class) has been
+ * marked with an {@link DesignRoot} annotation and will either use the
+ * value from the annotation to locate the design file, or will fall back to
+ * using a design with the same same as the annotated class file (with an
+ * .html extension)
+ * <p>
+ * Any {@link Component} type fields in the root component which are not
+ * assigned (i.e. are null) are mapped to corresponding components in the
+ * design. Matching is done based on field name in the component class and
+ * id/local id/caption in the design file.
+ * <p>
+ * The type of the root component must match the root element in the design
+ *
+ * @param rootComponent
+ * The root component of the layout
+ * @return The design context used in the load operation
+ * @throws DesignException
+ * If the design could not be loaded
+ */
+ public static DesignContext read(Component rootComponent)
+ throws DesignException {
+ // Try to find an @DesignRoot annotation on the class or any parent
+ // class
+ Class<? extends Component> annotatedClass = findClassWithAnnotation(
+ rootComponent.getClass(), DesignRoot.class);
+ if (annotatedClass == null) {
+ throw new IllegalArgumentException(
+ "The class "
+ + rootComponent.getClass().getName()
+ + " or any of its superclasses do not have an @DesignRoot annotation");
+ }
+
+ DesignRoot designAnnotation = annotatedClass
+ .getAnnotation(DesignRoot.class);
+ String filename = designAnnotation.value();
+ if (filename.equals("")) {
+ // No value, assume the html file is named as the class
+ filename = annotatedClass.getSimpleName() + ".html";
+ }
+
+ InputStream stream = annotatedClass.getResourceAsStream(filename);
+ if (stream == null) {
+ throw new DesignException("Unable to find design file " + filename
+ + " in " + annotatedClass.getPackage().getName());
+ }
+
+ Document doc = parse(stream);
+ DesignContext context = designToComponentTree(doc, rootComponent,
+ annotatedClass);
+
+ return context;
+
+ }
+
+ /**
+ * Find the first class with the given annotation, starting the search from
+ * the given class and moving upwards in the class hierarchy.
+ *
+ * @param componentClass
+ * the class to check
+ * @param annotationClass
+ * the annotation to look for
+ * @return the first class with the given annotation or null if no class
+ * with the annotation was found
+ */
+ private static Class<? extends Component> findClassWithAnnotation(
+ Class<? extends Component> componentClass,
+ Class<? extends Annotation> annotationClass) {
+ if (componentClass == null) {
+ return null;
+ }
+
+ if (componentClass.isAnnotationPresent(annotationClass)) {
+ return componentClass;
+ }
+
+ Class<?> superClass = componentClass.getSuperclass();
+ if (!Component.class.isAssignableFrom(superClass)) {
+ return null;
+ }
+
+ return findClassWithAnnotation((Class<? extends Component>) superClass,
+ annotationClass);
+ }
+
+ /**
+ * Loads a design from the given file name using the given root component.
+ * <p>
+ * Any {@link Component} type fields in the root component which are not
+ * assigned (i.e. are null) are mapped to corresponding components in the
+ * design. Matching is done based on field name in the component class and
+ * id/local id/caption in the design file.
+ * <p>
+ * The type of the root component must match the root element in the design.
+ *
+ * @param filename
+ * The file name to load. Loaded from the same package as the
+ * root component
+ * @param rootComponent
+ * The root component of the layout
+ * @return The design context used in the load operation
+ * @throws DesignException
+ * If the design could not be loaded
+ */
+ public static DesignContext read(String filename, Component rootComponent)
+ throws DesignException {
+ InputStream stream = rootComponent.getClass().getResourceAsStream(
+ filename);
+ if (stream == null) {
+ throw new DesignException("File " + filename
+ + " was not found in the package "
+ + rootComponent.getClass().getPackage().getName());
+ }
+ return read(stream, rootComponent);
+ }
+
+ /**
+ * Loads a design from the given stream using the given root component. If
+ * rootComponent is null, the type of the root node is read from the design.
+ * <p>
+ * Any {@link Component} type fields in the root component which are not
+ * assigned (i.e. are null) are mapped to corresponding components in the
+ * design. Matching is done based on field name in the component class and
+ * id/local id/caption in the design file.
+ * <p>
+ * If rootComponent is not null, its type must match the type of the root
+ * element in the design
+ *
+ * @param stream
+ * The stream to read the design from
+ * @param rootComponent
+ * The root component of the layout
+ * @return The design context used in the load operation
+ * @throws DesignException
+ * If the design could not be loaded
+ */
+ public static DesignContext read(InputStream design, Component rootComponent) {
+ if (design == null) {
+ throw new DesignException("Stream cannot be null");
+ }
+ Document doc = parse(design);
+ DesignContext context = designToComponentTree(doc, rootComponent);
+
+ return context;
+ }
+
+ /**
+ * Loads a design from the given input stream
+ *
+ * @param design
+ * The stream to read the design from
+ * @return The root component of the design
+ */
+ public static Component read(InputStream design) {
+ DesignContext context = read(design, null);
+ return context.getRootComponent();
+ }
+
+ /**
+ * Writes the given component tree in design format to the given output
+ * stream
+ *
+ * @param component
+ * the root component of the component tree
+ * @param outputStream
+ * the output stream to write the design to. The design is always
+ * written as UTF-8
+ * @throws IOException
+ */
+ public static void write(Component component, OutputStream outputStream)
+ throws IOException {
+ DesignContext dc = new DesignContext();
+ dc.setRootComponent(component);
+ write(dc, outputStream);
+ }
+
+ /**
+ * Writes the component, given in the design context, in design format to
+ * the given output stream. The design context is used for writing local ids
+ * and other information not available in the component tree.
+ *
+ * @param designContext
+ * the DesignContext object specifying the component hierarchy
+ * and the local id values of the objects
+ * @param outputStream
+ * the output stream to write the design to. The design is always
+ * written as UTF-8
+ * @throws IOException
+ * if writing fails
+ */
+ public static void write(DesignContext designContext,
+ OutputStream outputStream) throws IOException {
+ Document doc = createHtml(designContext);
+ write(doc, outputStream);
+ }
+
+ /**
+ * Writes the given jsoup document to the output stream (in UTF-8)
+ *
+ * @param doc
+ * the document to write
+ * @param outputStream
+ * the stream to write to
+ * @throws IOException
+ * if writing fails
+ */
+ private static void write(Document doc, OutputStream outputStream)
+ throws IOException {
+ doc.outputSettings().indentAmount(4);
+ doc.outputSettings().syntax(Syntax.html);
+ doc.outputSettings().prettyPrint(true);
+ outputStream.write(doc.html().getBytes());
+ }
+
+}
diff --git a/server/src/com/vaadin/ui/declarative/DesignAttributeHandler.java b/server/src/com/vaadin/ui/declarative/DesignAttributeHandler.java
new file mode 100644
index 0000000000..be7d023ebf
--- /dev/null
+++ b/server/src/com/vaadin/ui/declarative/DesignAttributeHandler.java
@@ -0,0 +1,715 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.ui.declarative;
+
+import java.beans.BeanInfo;
+import java.beans.IntrospectionException;
+import java.beans.Introspector;
+import java.beans.PropertyDescriptor;
+import java.io.File;
+import java.io.Serializable;
+import java.lang.reflect.Method;
+import java.text.DecimalFormat;
+import java.text.DecimalFormatSymbols;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.jsoup.nodes.Attribute;
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+import org.jsoup.nodes.Node;
+
+import com.vaadin.event.ShortcutAction;
+import com.vaadin.event.ShortcutAction.KeyCode;
+import com.vaadin.event.ShortcutAction.ModifierKey;
+import com.vaadin.server.ExternalResource;
+import com.vaadin.server.FileResource;
+import com.vaadin.server.FontAwesome;
+import com.vaadin.server.Resource;
+import com.vaadin.server.ThemeResource;
+import com.vaadin.shared.util.SharedUtil;
+import com.vaadin.ui.Component;
+
+/**
+ * Default attribute handler implementation used when parsing designs to
+ * component trees. Handles all the component attributes that do not require
+ * custom handling.
+ *
+ * @since 7.4
+ * @author Vaadin Ltd
+ */
+public class DesignAttributeHandler implements Serializable {
+
+ private static Logger getLogger() {
+ return Logger.getLogger(DesignAttributeHandler.class.getName());
+ }
+
+ private static Map<Class, AttributeCacheEntry> cache = Collections
+ .synchronizedMap(new HashMap<Class, AttributeCacheEntry>());
+
+ /**
+ * Clears the children and attributes of the given element
+ *
+ * @param design
+ * the element to be cleared
+ */
+ public static void clearElement(Element design) {
+ Attributes attr = design.attributes();
+ for (Attribute a : attr.asList()) {
+ attr.remove(a.getKey());
+ }
+ List<Node> children = new ArrayList<Node>();
+ children.addAll(design.childNodes());
+ for (Node node : children) {
+ node.remove();
+ }
+ }
+
+ /**
+ * Assigns the specified design attribute to the given component.
+ *
+ * @param target
+ * the target to which the attribute should be set
+ * @param attribute
+ * the name of the attribute to be set
+ * @param value
+ * the string value of the attribute
+ * @return true on success
+ */
+ public static boolean assignValue(Object target, String attribute,
+ String value) {
+ if (target == null || attribute == null || value == null) {
+ throw new IllegalArgumentException(
+ "Parameters with null value not allowed");
+ }
+ boolean success = false;
+ try {
+ Method setter = findSetterForAttribute(target.getClass(), attribute);
+ if (setter == null) {
+ // if we don't have the setter, there is no point in continuing
+ success = false;
+ } else {
+ // we have a value from design attributes, let's use that
+ Object param = fromAttributeValue(
+ setter.getParameterTypes()[0], value);
+ setter.invoke(target, param);
+ success = true;
+ }
+ } catch (Exception e) {
+ getLogger().log(Level.WARNING,
+ "Failed to set attribute " + attribute, e);
+ }
+ if (!success) {
+ getLogger().info(
+ "property " + attribute
+ + " ignored by default attribute handler");
+ }
+ return success;
+ }
+
+ /**
+ * Searches for supported setter and getter types from the specified class
+ * and returns the list of corresponding design attributes
+ *
+ * @param clazz
+ * the class scanned for setters
+ * @return the list of supported design attributes
+ */
+ public static Collection<String> getSupportedAttributes(Class<?> clazz) {
+ resolveSupportedAttributes(clazz);
+ return cache.get(clazz).getAttributes();
+ }
+
+ /**
+ * Resolves the supported attributes and corresponding getters and setters
+ * for the class using introspection. After resolving, the information is
+ * cached internally by this class
+ *
+ * @param clazz
+ * the class to resolve the supported attributes for
+ */
+ private static void resolveSupportedAttributes(Class<?> clazz) {
+ if (clazz == null) {
+ throw new IllegalArgumentException("The clazz can not be null");
+ }
+ if (cache.containsKey(clazz.getCanonicalName())) {
+ // NO-OP
+ return;
+ }
+ BeanInfo beanInfo;
+ try {
+ beanInfo = Introspector.getBeanInfo(clazz);
+ } catch (IntrospectionException e) {
+ throw new RuntimeException(
+ "Could not get supported attributes for class "
+ + clazz.getName());
+ }
+ AttributeCacheEntry entry = new AttributeCacheEntry();
+ for (PropertyDescriptor descriptor : beanInfo.getPropertyDescriptors()) {
+ Method getter = descriptor.getReadMethod();
+ Method setter = descriptor.getWriteMethod();
+ if (getter != null && setter != null
+ && isSupported(descriptor.getPropertyType())) {
+ String attribute = toAttributeName(descriptor.getName());
+ entry.addAttribute(attribute, getter, setter);
+ }
+ }
+ cache.put(clazz, entry);
+ }
+
+ /**
+ * Writes the specified attribute to the design if it differs from the
+ * default value got from the <code> defaultInstance <code>
+ *
+ * @param component
+ * the component used to get the attribute value
+ * @param attribute
+ * the key for the attribute
+ * @param attr
+ * the attribute list where the attribute will be written
+ * @param defaultInstance
+ * the default instance for comparing default values
+ */
+ public static void writeAttribute(Component component, String attribute,
+ Attributes attr, Component defaultInstance) {
+ Method getter = findGetterForAttribute(component.getClass(), attribute);
+ if (getter == null) {
+ getLogger().warning(
+ "Could not find getter for attribute " + attribute);
+ } else {
+ try {
+ // compare the value with default value
+ Object value = getter.invoke(component);
+ Object defaultValue = getter.invoke(defaultInstance);
+ // if the values are not equal, write the data
+ if (!SharedUtil.equals(value, defaultValue)) {
+ String attributeValue = toAttributeValue(
+ getter.getReturnType(), value);
+ attr.put(attribute, attributeValue);
+ }
+ } catch (Exception e) {
+ getLogger()
+ .log(Level.SEVERE,
+ "Failed to invoke getter for attribute "
+ + attribute, e);
+ }
+ }
+ }
+
+ /**
+ * Reads the given attribute from a set of attributes.
+ *
+ * @param attribute
+ * the attribute key
+ * @param attributes
+ * the set of attributes to read from
+ * @param outputType
+ * the output type for the attribute
+ * @return the attribute value or the default value if the attribute is not
+ * found
+ */
+ @SuppressWarnings("unchecked")
+ public static <T> T readAttribute(String attribute, Attributes attributes,
+ Class<T> outputType) {
+ if (!isSupported(outputType)) {
+ throw new IllegalArgumentException("output type: "
+ + outputType.getName() + " not supported");
+ }
+ if (!attributes.hasKey(attribute)) {
+ return null;
+ } else {
+ try {
+ String value = attributes.get(attribute);
+ return (T) fromAttributeValue(outputType, value);
+ } catch (Exception e) {
+ throw new DesignException("Failed to read attribute "
+ + attribute, e);
+ }
+ }
+ }
+
+ /**
+ * Writes the given attribute value to a set of attributes if it differs
+ * from the default attribute value.
+ *
+ * @param attribute
+ * the attribute key
+ * @param attributes
+ * the set of attributes where the new attribute is written
+ * @param value
+ * the attribute value
+ * @param defaultValue
+ * the default attribute value
+ * @param inputType
+ * the type of the input value
+ */
+ public static <T> void writeAttribute(String attribute,
+ Attributes attributes, T value, T defaultValue, Class<T> inputType) {
+ if (!isSupported(inputType)) {
+ throw new IllegalArgumentException("input type: "
+ + inputType.getName() + " not supported");
+ }
+ if (!SharedUtil.equals(value, defaultValue)) {
+ String attributeValue = toAttributeValue(inputType, value);
+ attributes.put(attribute, attributeValue);
+ }
+ }
+
+ /**
+ * Formats the given design attribute value. The method is provided to
+ * ensure consistent number formatting for design attribute values
+ *
+ * @param number
+ * the number to be formatted
+ * @return the formatted number
+ */
+ public static String formatFloat(float number) {
+ return getDecimalFormat().format(number);
+ }
+
+ /**
+ * Formats the given design attribute value. The method is provided to
+ * ensure consistent number formatting for design attribute values
+ *
+ * @param number
+ * the number to be formatted
+ * @return the formatted number
+ */
+ public static String formatDouble(double number) {
+ return getDecimalFormat().format(number);
+ }
+
+ /**
+ * Convert ShortcutAction to attribute string presentation
+ *
+ * @param shortcut
+ * the shortcut action
+ * @return the action as attribute string presentation
+ */
+ private static String formatShortcutAction(ShortcutAction shortcut) {
+ StringBuilder sb = new StringBuilder();
+ // handle modifiers
+ if (shortcut.getModifiers() != null) {
+ for (int modifier : shortcut.getModifiers()) {
+ sb.append(ShortcutKeyMapper.getStringForKeycode(modifier))
+ .append("-");
+ }
+ }
+ // handle keycode
+ sb.append(ShortcutKeyMapper.getStringForKeycode(shortcut.getKeyCode()));
+ return sb.toString();
+ }
+
+ /**
+ * Reads shortcut action from attribute presentation
+ *
+ * @param attributeValue
+ * attribute presentation of shortcut action
+ * @return shortcut action with keycode and modifier keys from attribute
+ * value
+ */
+ private static ShortcutAction readShortcutAction(String attributeValue) {
+ if (attributeValue.length() == 0) {
+ return null;
+ }
+ String[] parts = attributeValue.split("-");
+ // handle keycode
+ String keyCodePart = parts[parts.length - 1];
+ int keyCode = ShortcutKeyMapper.getKeycodeForString(keyCodePart);
+ if (keyCode < 0) {
+ throw new IllegalArgumentException("Invalid shortcut definition "
+ + attributeValue);
+ }
+ // handle modifiers
+ int[] modifiers = null;
+ if (parts.length > 1) {
+ modifiers = new int[parts.length - 1];
+ }
+ for (int i = 0; i < parts.length - 1; i++) {
+ int modifier = ShortcutKeyMapper.getKeycodeForString(parts[i]);
+ if (modifier > 0) {
+ modifiers[i] = modifier;
+ } else {
+ throw new IllegalArgumentException(
+ "Invalid shortcut definition " + attributeValue);
+ }
+ }
+ return new ShortcutAction(null, keyCode, modifiers);
+ }
+
+ /**
+ * Creates the decimal format used when writing attributes to the design.
+ *
+ * @return the decimal format
+ */
+ private static DecimalFormat getDecimalFormat() {
+ DecimalFormatSymbols symbols = new DecimalFormatSymbols(new Locale(
+ "en_US"));
+ DecimalFormat fmt = new DecimalFormat("0.###", symbols);
+ fmt.setGroupingUsed(false);
+ return fmt;
+ }
+
+ /**
+ * Returns the design attribute name corresponding the given method name.
+ * For example given a method name <code>setPrimaryStyleName</code> the
+ * return value would be <code>primary-style-name</code>
+ *
+ * @param propertyName
+ * the property name returned by {@link IntroSpector}
+ * @return the design attribute name corresponding the given method name
+ */
+ private static String toAttributeName(String propertyName) {
+ String[] words = propertyName.split("(?<!^)(?=[A-Z])");
+ StringBuilder builder = new StringBuilder();
+ for (int i = 0; i < words.length; i++) {
+ if (builder.length() > 0) {
+ builder.append("-");
+ }
+ builder.append(words[i].toLowerCase());
+ }
+ return builder.toString();
+ }
+
+ /**
+ * Parses the given attribute value to specified target type
+ *
+ * @param targetType
+ * the target type for the value
+ * @param value
+ * the parsed value
+ * @return the object of specified target type
+ */
+ private static Object fromAttributeValue(Class<?> targetType, String value) {
+ if (targetType == String.class) {
+ return value;
+ }
+ // special handling for boolean type. The attribute evaluates to true if
+ // it is present and the value is not "false" or "FALSE". Thus empty
+ // value evaluates to true.
+ if (targetType == Boolean.TYPE || targetType == Boolean.class) {
+ return parseBoolean(value);
+ }
+ if (targetType == Integer.TYPE || targetType == Integer.class) {
+ return Integer.valueOf(value);
+ }
+ if (targetType == Byte.TYPE || targetType == Byte.class) {
+ return Byte.valueOf(value);
+ }
+ if (targetType == Short.TYPE || targetType == Short.class) {
+ return Short.valueOf(value);
+ }
+ if (targetType == Long.TYPE || targetType == Long.class) {
+ return Long.valueOf(value);
+ }
+ if (targetType == Character.TYPE || targetType == Character.class) {
+ return value.charAt(0);
+ }
+ if (targetType == Float.TYPE || targetType == Float.class) {
+ return Float.valueOf(value);
+ }
+ if (targetType == Double.TYPE || targetType == Double.class) {
+ return Double.valueOf(value);
+ }
+ if (targetType == Resource.class) {
+ return parseResource(value);
+ }
+ if (Enum.class.isAssignableFrom(targetType)) {
+ return Enum.valueOf((Class<? extends Enum>) targetType,
+ value.toUpperCase());
+ }
+ if (targetType == ShortcutAction.class) {
+ return readShortcutAction(value);
+ }
+ return null;
+ }
+
+ /**
+ * Serializes the given value to valid design attribute representation
+ *
+ * @param sourceType
+ * the type of the value
+ * @param value
+ * the value to be serialized
+ * @return the given value as design attribute representation
+ */
+ private static String toAttributeValue(Class<?> sourceType, Object value) {
+ if (value == null) {
+ // TODO: Handle corner case where sourceType is String and default
+ // value is not null. How to represent null value in attributes?
+ return "";
+ }
+ if (sourceType == Resource.class) {
+ if (value instanceof ExternalResource) {
+ return ((ExternalResource) value).getURL();
+ } else if (value instanceof ThemeResource) {
+ return "theme://" + ((ThemeResource) value).getResourceId();
+ } else if (value instanceof FontAwesome) {
+ return "font://" + ((FontAwesome) value).name();
+ } else if (value instanceof FileResource) {
+ String path = ((FileResource) value).getSourceFile().getPath();
+ if (File.separatorChar != '/') {
+ // make sure we use '/' as file separator in templates
+ return path.replace(File.separatorChar, '/');
+ } else {
+ return path;
+ }
+ } else {
+ getLogger().warning(
+ "Unknown resource type " + value.getClass().getName());
+ return null;
+ }
+ } else if (sourceType == Float.class || sourceType == Float.TYPE) {
+ return formatFloat(((Float) value).floatValue());
+ } else if (sourceType == Double.class || sourceType == Double.TYPE) {
+ return formatDouble(((Double) value).doubleValue());
+ } else if (sourceType == ShortcutAction.class) {
+ return formatShortcutAction((ShortcutAction) value);
+ } else {
+ return value.toString();
+ }
+ }
+
+ /**
+ * Parses the given attribute value as resource
+ *
+ * @param value
+ * the attribute value to be parsed
+ * @return resource instance based on the attribute value
+ */
+ private static Resource parseResource(String value) {
+ if (value.startsWith("http://")) {
+ return new ExternalResource(value);
+ } else if (value.startsWith("theme://")) {
+ return new ThemeResource(value.substring(8));
+ } else if (value.startsWith("font://")) {
+ return FontAwesome.valueOf(value.substring(7));
+ } else {
+ return new FileResource(new File(value));
+ }
+ }
+
+ /**
+ * Returns a setter that can be used for assigning the given design
+ * attribute to the class
+ *
+ * @param clazz
+ * the class that is scanned for setters
+ * @param attribute
+ * the design attribute to find setter for
+ * @return the setter method or null if not found
+ */
+ private static Method findSetterForAttribute(Class<?> clazz,
+ String attribute) {
+ resolveSupportedAttributes(clazz);
+ return cache.get(clazz).getSetter(attribute);
+ }
+
+ /**
+ * Returns a getter that can be used for reading the given design attribute
+ * value from the class
+ *
+ * @param clazz
+ * the class that is scanned for getters
+ * @param attribute
+ * the design attribute to find getter for
+ * @return the getter method or null if not found
+ */
+ private static Method findGetterForAttribute(Class<?> clazz,
+ String attribute) {
+ resolveSupportedAttributes(clazz);
+ return cache.get(clazz).getGetter(attribute);
+ }
+
+ // supported property types
+ private static final List<Class<?>> supportedClasses = Arrays
+ .asList(new Class<?>[] { String.class, Boolean.class,
+ Integer.class, Byte.class, Short.class, Long.class,
+ Character.class, Float.class, Double.class, Resource.class,
+ ShortcutAction.class });
+
+ /**
+ * Returns true if the specified value type is supported by this class.
+ * Currently the handler supports primitives, {@link Locale.class} and
+ * {@link Resource.class}.
+ *
+ * @param valueType
+ * the value type to be tested
+ * @return true if the value type is supported, otherwise false
+ */
+ private static boolean isSupported(Class<?> valueType) {
+ return valueType != null
+ && (valueType.isPrimitive()
+ || supportedClasses.contains(valueType) || Enum.class
+ .isAssignableFrom(valueType));
+ }
+
+ /**
+ * Cache object for caching supported attributes and their getters and
+ * setters
+ *
+ * @author Vaadin Ltd
+ */
+ private static class AttributeCacheEntry implements Serializable {
+ private Map<String, Method[]> accessMethods = Collections
+ .synchronizedMap(new HashMap<String, Method[]>());
+
+ private void addAttribute(String attribute, Method getter, Method setter) {
+ Method[] methods = new Method[2];
+ methods[0] = getter;
+ methods[1] = setter;
+ accessMethods.put(attribute, methods);
+ }
+
+ private Collection<String> getAttributes() {
+ ArrayList<String> attributes = new ArrayList<String>();
+ attributes.addAll(accessMethods.keySet());
+ return attributes;
+ }
+
+ private Method getGetter(String attribute) {
+ Method[] methods = accessMethods.get(attribute);
+ return (methods != null && methods.length > 0) ? methods[0] : null;
+ }
+
+ private Method getSetter(String attribute) {
+ Method[] methods = accessMethods.get(attribute);
+ return (methods != null && methods.length > 1) ? methods[1] : null;
+ }
+ }
+
+ /**
+ * Provides mappings between shortcut keycodes and their representation in
+ * design attributes
+ *
+ * @author Vaadin Ltd
+ */
+ private static class ShortcutKeyMapper implements Serializable {
+
+ private static Map<Integer, String> keyCodeMap = Collections
+ .synchronizedMap(new HashMap<Integer, String>());
+ private static Map<String, Integer> presentationMap = Collections
+ .synchronizedMap(new HashMap<String, Integer>());
+
+ static {
+ // map modifiers
+ mapKey(ModifierKey.ALT, "alt");
+ mapKey(ModifierKey.CTRL, "ctrl");
+ mapKey(ModifierKey.META, "meta");
+ mapKey(ModifierKey.SHIFT, "shift");
+ // map keys
+ mapKey(KeyCode.ENTER, "enter");
+ mapKey(KeyCode.ESCAPE, "escape");
+ mapKey(KeyCode.PAGE_UP, "pageup");
+ mapKey(KeyCode.PAGE_DOWN, "pagedown");
+ mapKey(KeyCode.TAB, "tab");
+ mapKey(KeyCode.ARROW_LEFT, "left");
+ mapKey(KeyCode.ARROW_UP, "up");
+ mapKey(KeyCode.ARROW_RIGHT, "right");
+ mapKey(KeyCode.ARROW_DOWN, "down");
+ mapKey(KeyCode.BACKSPACE, "backspace");
+ mapKey(KeyCode.DELETE, "delete");
+ mapKey(KeyCode.INSERT, "insert");
+ mapKey(KeyCode.END, "end");
+ mapKey(KeyCode.HOME, "home");
+ mapKey(KeyCode.F1, "f1");
+ mapKey(KeyCode.F2, "f2");
+ mapKey(KeyCode.F3, "f3");
+ mapKey(KeyCode.F4, "f4");
+ mapKey(KeyCode.F5, "f5");
+ mapKey(KeyCode.F6, "f6");
+ mapKey(KeyCode.F7, "f7");
+ mapKey(KeyCode.F8, "f8");
+ mapKey(KeyCode.F9, "f9");
+ mapKey(KeyCode.F10, "f10");
+ mapKey(KeyCode.F11, "f11");
+ mapKey(KeyCode.F12, "f12");
+ mapKey(KeyCode.NUM0, "0");
+ mapKey(KeyCode.NUM1, "1");
+ mapKey(KeyCode.NUM2, "2");
+ mapKey(KeyCode.NUM3, "3");
+ mapKey(KeyCode.NUM4, "4");
+ mapKey(KeyCode.NUM5, "5");
+ mapKey(KeyCode.NUM6, "6");
+ mapKey(KeyCode.NUM7, "7");
+ mapKey(KeyCode.NUM8, "8");
+ mapKey(KeyCode.NUM9, "9");
+ mapKey(KeyCode.SPACEBAR, "spacebar");
+ mapKey(KeyCode.A, "a");
+ mapKey(KeyCode.B, "b");
+ mapKey(KeyCode.C, "c");
+ mapKey(KeyCode.D, "d");
+ mapKey(KeyCode.E, "e");
+ mapKey(KeyCode.F, "f");
+ mapKey(KeyCode.G, "g");
+ mapKey(KeyCode.H, "h");
+ mapKey(KeyCode.I, "i");
+ mapKey(KeyCode.J, "j");
+ mapKey(KeyCode.K, "k");
+ mapKey(KeyCode.L, "l");
+ mapKey(KeyCode.M, "m");
+ mapKey(KeyCode.N, "n");
+ mapKey(KeyCode.O, "o");
+ mapKey(KeyCode.P, "p");
+ mapKey(KeyCode.Q, "q");
+ mapKey(KeyCode.R, "r");
+ mapKey(KeyCode.S, "s");
+ mapKey(KeyCode.T, "t");
+ mapKey(KeyCode.U, "u");
+ mapKey(KeyCode.V, "v");
+ mapKey(KeyCode.X, "x");
+ mapKey(KeyCode.Y, "y");
+ mapKey(KeyCode.Z, "z");
+ }
+
+ private static void mapKey(int keyCode, String presentation) {
+ keyCodeMap.put(keyCode, presentation);
+ presentationMap.put(presentation, keyCode);
+ }
+
+ private static int getKeycodeForString(String attributePresentation) {
+ Integer code = presentationMap.get(attributePresentation);
+ return code != null ? code.intValue() : -1;
+ }
+
+ private static String getStringForKeycode(int keyCode) {
+ return keyCodeMap.get(keyCode);
+ }
+ }
+
+ /**
+ * Converts the given string attribute value to its corresponding boolean.
+ *
+ * An empty string and "true" are considered to represent a true value and
+ * "false" to represent a false value.
+ *
+ * @param booleanValue
+ * the boolean value from an attribute
+ * @return the parsed boolean
+ */
+ public static boolean parseBoolean(String booleanValue) {
+ return !booleanValue.equalsIgnoreCase("false");
+ }
+
+} \ No newline at end of file
diff --git a/server/src/com/vaadin/ui/declarative/DesignContext.java b/server/src/com/vaadin/ui/declarative/DesignContext.java
new file mode 100644
index 0000000000..ade2494638
--- /dev/null
+++ b/server/src/com/vaadin/ui/declarative/DesignContext.java
@@ -0,0 +1,719 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.ui.declarative;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Document;
+import org.jsoup.nodes.Element;
+import org.jsoup.nodes.Node;
+
+import com.vaadin.annotations.DesignRoot;
+import com.vaadin.ui.Component;
+import com.vaadin.ui.HasComponents;
+
+/**
+ * This class contains contextual information that is collected when a component
+ * tree is constructed based on HTML design template. This information includes
+ * mappings from local ids, global ids and captions to components , as well as a
+ * mapping between prefixes and package names (such as "v" -> "com.vaadin.ui").
+ *
+ * @since 7.4
+ * @author Vaadin Ltd
+ */
+public class DesignContext implements Serializable {
+
+ // cache for object instances
+ private static Map<Class<?>, Component> instanceCache = Collections
+ .synchronizedMap(new HashMap<Class<?>, Component>());
+
+ // The root component of the component hierarchy
+ private Component rootComponent = null;
+ // Attribute names for global id and caption and the prefix name for a local
+ // id
+ public static final String ID_ATTRIBUTE = "id";
+ public static final String CAPTION_ATTRIBUTE = "caption";
+ public static final String LOCAL_ID_ATTRIBUTE = "_id";
+ // Mappings from ids to components. Modified when reading from design.
+ private Map<String, Component> idToComponent = new HashMap<String, Component>();
+ private Map<String, Component> localIdToComponent = new HashMap<String, Component>();
+ private Map<String, Component> captionToComponent = new HashMap<String, Component>();
+ // Mapping from components to local ids. Accessed when writing to
+ // design. Modified when reading from design.
+ private Map<Component, String> componentToLocalId = new HashMap<Component, String>();
+ private Document doc; // required for calling createElement(String)
+ // namespace mappings
+ private Map<String, String> packageToPrefix = new HashMap<String, String>();
+ private Map<String, String> prefixToPackage = new HashMap<String, String>();
+ // prefix names for which no package-mapping element will be created in the
+ // html tree (this includes at least "v" which is always taken to refer
+ // to "com.vaadin.ui".
+ private Map<String, String> defaultPrefixes = new HashMap<String, String>();
+
+ // component creation listeners
+ private List<ComponentCreationListener> listeners = new ArrayList<ComponentCreationListener>();
+
+ public DesignContext(Document doc) {
+ this.doc = doc;
+ // Initialize the mapping between prefixes and package names.
+ defaultPrefixes.put("v", "com.vaadin.ui");
+ for (String prefix : defaultPrefixes.keySet()) {
+ String packageName = defaultPrefixes.get(prefix);
+ mapPrefixToPackage(prefix, packageName);
+ }
+ }
+
+ public DesignContext() {
+ this(new Document(""));
+ }
+
+ /**
+ * Returns a component having the specified local id. If no component is
+ * found, returns null.
+ *
+ * @param localId
+ * The local id of the component
+ * @return a component whose local id equals localId
+ */
+ public Component getComponentByLocalId(String localId) {
+ return localIdToComponent.get(localId);
+ }
+
+ /**
+ * Returns a component having the specified global id. If no component is
+ * found, returns null.
+ *
+ * @param globalId
+ * The global id of the component
+ * @return a component whose global id equals globalId
+ */
+ public Component getComponentById(String globalId) {
+ return idToComponent.get(globalId);
+ }
+
+ /**
+ * Returns a component having the specified caption. If no component is
+ * found, returns null.
+ *
+ * @param caption
+ * The caption of the component
+ * @return a component whose caption equals the caption given as a parameter
+ */
+ public Component getComponentByCaption(String caption) {
+ return captionToComponent.get(caption);
+ }
+
+ /**
+ * Creates a mapping between the given global id and the component. Returns
+ * true if globalId was already mapped to some component. Otherwise returns
+ * false. Also sets the id of the component to globalId.
+ *
+ * If there is a mapping from the component to a global id (gid) different
+ * from globalId, the mapping from gid to component is removed.
+ *
+ * If the string was mapped to a component c different from the given
+ * component, the mapping from c to the string is removed. Similarly, if
+ * component was mapped to some string s different from globalId, the
+ * mapping from s to component is removed.
+ *
+ * @param globalId
+ * The new global id of the component.
+ * @param component
+ * The component whose global id is to be set.
+ * @return true, if there already was a global id mapping from the string to
+ * some component.
+ */
+ private boolean mapId(String globalId, Component component) {
+ Component oldComponent = idToComponent.get(globalId);
+ if (oldComponent != null && !oldComponent.equals(component)) {
+ oldComponent.setId(null);
+ }
+ String oldGID = component.getId();
+ if (oldGID != null && !oldGID.equals(globalId)) {
+ idToComponent.remove(oldGID);
+ }
+ component.setId(globalId);
+ idToComponent.put(globalId, component);
+ return oldComponent != null && !oldComponent.equals(component);
+ }
+
+ /**
+ * Creates a mapping between the given local id and the component. Returns
+ * true if localId was already mapped to some component or if component was
+ * mapped to some string. Otherwise returns false.
+ *
+ * If the string was mapped to a component c different from the given
+ * component, the mapping from c to the string is removed. Similarly, if
+ * component was mapped to some string s different from localId, the mapping
+ * from s to component is removed.
+ *
+ * @param localId
+ * The new local id of the component.
+ * @param component
+ * The component whose local id is to be set.
+ * @return true, if there already was a local id mapping from the string to
+ * some component or from the component to some string. Otherwise
+ * returns false.
+ */
+ private boolean mapLocalId(String localId, Component component) {
+ return twoWayMap(localId, component, localIdToComponent,
+ componentToLocalId);
+ }
+
+ /**
+ * Creates a mapping between the given caption and the component. Returns
+ * true if caption was already mapped to some component.
+ *
+ * Note that unlike mapGlobalId, if some component already has the given
+ * caption, the caption is not cleared from the component. This allows
+ * non-unique captions. However, only one of the components corresponding to
+ * a given caption can be found using the map captionToComponent. Hence, any
+ * captions that are used to identify an object should be unique.
+ *
+ * @param caption
+ * The new caption of the component.
+ * @param component
+ * The component whose caption is to be set.
+ * @return true, if there already was a caption mapping from the string to
+ * some component.
+ */
+ private boolean mapCaption(String caption, Component component) {
+ return captionToComponent.put(caption, component) != null;
+ }
+
+ /**
+ * Creates a two-way mapping between key and value, i.e. adds key -> value
+ * to keyToValue and value -> key to valueToKey. If key was mapped to a
+ * value v different from the given value, the mapping from v to key is
+ * removed. Similarly, if value was mapped to some key k different from key,
+ * the mapping from k to value is removed.
+ *
+ * Returns true if there already was a mapping from key to some value v or
+ * if there was a mapping from value to some key k. Otherwise returns false.
+ *
+ * @param key
+ * The new key in keyToValue.
+ * @param value
+ * The new value in keyToValue.
+ * @param keyToValue
+ * A map from keys to values.
+ * @param valueToKey
+ * A map from values to keys.
+ * @return whether there already was some mapping from key to a value or
+ * from value to a key.
+ */
+ private <S, T> boolean twoWayMap(S key, T value, Map<S, T> keyToValue,
+ Map<T, S> valueToKey) {
+ T oldValue = keyToValue.put(key, value);
+ if (oldValue != null && !oldValue.equals(value)) {
+ valueToKey.remove(oldValue);
+ }
+ S oldKey = valueToKey.put(value, key);
+ if (oldKey != null && !oldKey.equals(key)) {
+ keyToValue.remove(oldKey);
+ }
+ return oldValue != null || oldKey != null;
+ }
+
+ /**
+ * Creates a two-way mapping between a prefix and a package name. Return
+ * true if prefix was already mapped to some package name or packageName to
+ * some prefix.
+ *
+ * @param prefix
+ * the prefix name without an ending dash (for instance, "v" is
+ * always used for "com.vaadin.ui")
+ * @param packageName
+ * the name of the package corresponding to prefix
+ * @return whether there was a mapping from prefix to some package name or
+ * from packageName to some prefix.
+ */
+ private boolean mapPrefixToPackage(String prefix, String packageName) {
+ return twoWayMap(prefix, packageName, prefixToPackage, packageToPrefix);
+ }
+
+ /**
+ * Returns the default instance for the given class. The instance must not
+ * be modified by the caller.
+ *
+ * @param abstractComponent
+ * @return the default instance for the given class. The return value must
+ * not be modified by the caller
+ */
+ public <T> T getDefaultInstance(Component component) {
+ // If the root is a @DesignRoot component, it can't use itself as a
+ // reference or the written design will be empty
+
+ // If the root component in some other way initializes itself in the
+ // constructor
+ if (getRootComponent() == component
+ && component.getClass().isAnnotationPresent(DesignRoot.class)) {
+ return (T) getDefaultInstance((Class<? extends Component>) component
+ .getClass().getSuperclass());
+ }
+ return (T) getDefaultInstance(component.getClass());
+ }
+
+ private Component getDefaultInstance(
+ Class<? extends Component> componentClass) {
+ Component instance = instanceCache.get(componentClass);
+ if (instance == null) {
+ try {
+ instance = componentClass.newInstance();
+ instanceCache.put(componentClass, instance);
+ } catch (InstantiationException e) {
+ throw new RuntimeException("Could not instantiate "
+ + componentClass.getName());
+ } catch (IllegalAccessException e) {
+ throw new RuntimeException("Could not instantiate "
+ + componentClass.getName());
+ }
+ }
+ return instance;
+ }
+
+ /**
+ * Reads and stores the mappings from prefixes to package names from meta
+ * tags located under <head> in the html document.
+ */
+ protected void readPackageMappings(Document doc) {
+ Element head = doc.head();
+ if (head == null) {
+ return;
+ }
+ for (Node child : head.childNodes()) {
+ if (child instanceof Element) {
+ Element childElement = (Element) child;
+ if ("meta".equals(childElement.tagName())) {
+ Attributes attributes = childElement.attributes();
+ if (attributes.hasKey("name")
+ && attributes.hasKey("content")
+ && "package-mapping".equals(attributes.get("name"))) {
+ String contentString = attributes.get("content");
+ String[] parts = contentString.split(":");
+ if (parts.length != 2) {
+ throw new DesignException("The meta tag '"
+ + child.toString() + "' cannot be parsed.");
+ }
+ String prefixName = parts[0];
+ String packageName = parts[1];
+ twoWayMap(prefixName, packageName, prefixToPackage,
+ packageToPrefix);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Writes the package mappings (prefix -> package name) of this object to
+ * the specified document.
+ * <p>
+ * The prefixes are stored as <meta> tags under <head> in the document.
+ *
+ * @param doc
+ * the Jsoup document tree where the package mappings are written
+ */
+ public void writePackageMappings(Document doc) {
+ Element head = doc.head();
+ for (String prefix : prefixToPackage.keySet()) {
+ // Only store the prefix-name mapping if it is not a default mapping
+ // (such as "v" -> "com.vaadin.ui")
+ if (defaultPrefixes.get(prefix) == null) {
+ Node newNode = doc.createElement("meta");
+ newNode.attr("name", "package-mapping");
+ String prefixToPackageName = prefix + ":"
+ + prefixToPackage.get(prefix);
+ newNode.attr("content", prefixToPackageName);
+ head.appendChild(newNode);
+ }
+ }
+ }
+
+ /**
+ * Creates an html tree node corresponding to the given element. Also
+ * initializes its attributes by calling writeDesign. As a result of the
+ * writeDesign() call, this method creates the entire subtree rooted at the
+ * returned Node.
+ *
+ * @param childComponent
+ * The component with state that is written in to the node
+ * @return An html tree node corresponding to the given component. The tag
+ * name of the created node is derived from the class name of
+ * childComponent.
+ */
+ public Element createElement(Component childComponent) {
+ Class<?> componentClass = childComponent.getClass();
+ String packageName = componentClass.getPackage().getName();
+ String prefix = packageToPrefix.get(packageName);
+ if (prefix == null) {
+ prefix = packageName.replace('.', '_');
+ twoWayMap(prefix, packageName, prefixToPackage, packageToPrefix);
+ }
+ prefix = prefix + "-";
+ String className = classNameToElementName(componentClass
+ .getSimpleName());
+ Element newElement = doc.createElement(prefix + className);
+ childComponent.writeDesign(newElement, this);
+ // Handle the local id. Global id and caption should have been taken
+ // care of by writeDesign.
+ String localId = componentToLocalId.get(childComponent);
+ if (localId != null) {
+ newElement.attr(LOCAL_ID_ATTRIBUTE, localId);
+ }
+ return newElement;
+ }
+
+ /**
+ * Creates the name of the html tag corresponding to the given class name.
+ * The name is derived by converting each uppercase letter to lowercase and
+ * inserting a dash before the letter. No dash is inserted before the first
+ * letter of the class name.
+ *
+ * @param className
+ * the name of the class without a package name
+ * @return the html tag name corresponding to className
+ */
+ private String classNameToElementName(String className) {
+ StringBuilder result = new StringBuilder();
+ for (int i = 0; i < className.length(); i++) {
+ Character c = className.charAt(i);
+ if (Character.isUpperCase(c)) {
+ if (i > 0) {
+ result.append("-");
+ }
+ result.append(Character.toLowerCase(c));
+ } else {
+ result.append(c);
+ }
+ }
+ return result.toString();
+ }
+
+ /**
+ * Reads the given design node and creates the corresponding component tree
+ *
+ * @param componentDesign
+ * The design element containing the description of the component
+ * to be created
+ * @return the root component of component tree
+ */
+ public Component readDesign(Element componentDesign) {
+ // Create the component.
+ Component component = instantiateComponent(componentDesign);
+ readDesign(componentDesign, component);
+ fireComponentCreatedEvent(componentToLocalId.get(component), component);
+ return component;
+ }
+
+ /**
+ *
+ * Reads the given design node and populates the given component with the
+ * corresponding component tree
+ * <p>
+ * Additionally registers the component id, local id and caption of the
+ * given component and all its children in the context
+ *
+ * @param componentDesign
+ * The design element containing the description of the component
+ * to be created
+ * @param component
+ * The component which corresponds to the design element
+ */
+ public void readDesign(Element componentDesign, Component component) {
+ component.readDesign(componentDesign, this);
+ // Get the ids and the caption of the component and store them in the
+ // maps of this design context.
+ org.jsoup.nodes.Attributes attributes = componentDesign.attributes();
+ // global id: only update the mapping, the id has already been set for
+ // the component
+ String id = component.getId();
+ if (id != null && id.length() > 0) {
+ boolean mappingExists = mapId(id, component);
+ if (mappingExists) {
+ throw new DesignException(
+ "The following global id is not unique: " + id);
+ }
+ }
+ // local id: this is not a property of a component, so need to fetch it
+ // from the attributes of componentDesign
+ if (attributes.hasKey(LOCAL_ID_ATTRIBUTE)) {
+ String localId = attributes.get(LOCAL_ID_ATTRIBUTE);
+ boolean mappingExists = mapLocalId(localId, component);
+ if (mappingExists) {
+ throw new DesignException(
+ "the following local id is not unique: " + localId);
+ }
+ }
+ // caption: a property of a component, possibly not unique
+ String caption = component.getCaption();
+ if (caption != null) {
+ mapCaption(caption, component);
+ }
+ }
+
+ /**
+ * Creates a Component corresponding to the given node. Does not set the
+ * attributes for the created object.
+ *
+ * @param node
+ * a node of an html tree
+ * @return a Component corresponding to node, with no attributes set.
+ */
+ private Component instantiateComponent(Node node) {
+ // Extract the package and class names.
+ String qualifiedClassName = tagNameToClassName(node);
+ try {
+ Class<? extends Component> componentClass = resolveComponentClass(qualifiedClassName);
+ Component newComponent = componentClass.newInstance();
+ return newComponent;
+ } catch (Exception e) {
+ throw new DesignException("No component class could be found for "
+ + node.nodeName() + ".", e);
+ }
+ }
+
+ /**
+ * Returns the qualified class name corresponding to the given html tree
+ * node. The class name is extracted from the tag name of node.
+ *
+ * @param node
+ * an html tree node
+ * @return The qualified class name corresponding to the given node.
+ */
+ private String tagNameToClassName(Node node) {
+ String tagName = node.nodeName();
+ if (tagName.equals("v-addon")) {
+ return node.attr("class");
+ }
+ // Otherwise, get the full class name using the prefix to package
+ // mapping. Example: "v-vertical-layout" ->
+ // "com.vaadin.ui.VerticalLayout"
+ String[] parts = tagName.split("-");
+ if (parts.length < 2) {
+ throw new DesignException("The tagname '" + tagName
+ + "' is invalid: missing prefix.");
+ }
+ String prefixName = parts[0];
+ String packageName = prefixToPackage.get(prefixName);
+ if (packageName == null) {
+ throw new DesignException("Unknown tag: " + tagName);
+ }
+ int firstCharacterIndex = prefixName.length() + 1; // +1 is for '-'
+ tagName = tagName.substring(firstCharacterIndex,
+ firstCharacterIndex + 1).toUpperCase(Locale.ENGLISH)
+ + tagName.substring(firstCharacterIndex + 1);
+ int i;
+ while ((i = tagName.indexOf("-")) != -1) {
+ int length = tagName.length();
+ if (i != length - 1) {
+ tagName = tagName.substring(0, i)
+ + tagName.substring(i + 1, i + 2).toUpperCase(
+ Locale.ENGLISH) + tagName.substring(i + 2);
+
+ } else {
+ // Ends with "-"
+ System.out.println("A tag name should not end with '-'.");
+ }
+ }
+ return packageName + "." + tagName;
+ }
+
+ @SuppressWarnings("unchecked")
+ private Class<? extends Component> resolveComponentClass(
+ String qualifiedClassName) throws ClassNotFoundException {
+ Class<?> componentClass = null;
+ componentClass = Class.forName(qualifiedClassName);
+
+ // Check that we're dealing with a Component.
+ if (isComponent(componentClass)) {
+ return (Class<? extends Component>) componentClass;
+ } else {
+ throw new IllegalArgumentException(String.format(
+ "Resolved class %s is not a %s.", componentClass.getName(),
+ Component.class.getName()));
+ }
+ }
+
+ /**
+ * Returns {@code true} if the given {@link Class} implements the
+ * {@link Component} interface of Vaadin Framework otherwise {@code false}.
+ *
+ * @param componentClass
+ * {@link Class} to check against {@link Component} interface.
+ * @return {@code true} if the given {@link Class} is a {@link Component},
+ * {@code false} otherwise.
+ */
+ private static boolean isComponent(Class<?> componentClass) {
+ if (componentClass != null) {
+ return Component.class.isAssignableFrom(componentClass);
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * Returns the root component of a created component hierarchy.
+ *
+ * @return the root component of the hierarchy
+ */
+ public Component getRootComponent() {
+ return rootComponent;
+ }
+
+ /**
+ * Sets the root component of a created component hierarchy.
+ *
+ * @param rootComponent
+ * the root component of the hierarchy
+ */
+ public void setRootComponent(Component rootComponent) {
+ this.rootComponent = rootComponent;
+ }
+
+ /**
+ * Adds a component creation listener. The listener will be notified when
+ * components are created while parsing a design template
+ *
+ * @param listener
+ * the component creation listener to be added
+ */
+ public void addComponentCreationListener(ComponentCreationListener listener) {
+ listeners.add(listener);
+ }
+
+ /**
+ * Removes a component creation listener.
+ *
+ * @param listener
+ * the component creation listener to be removed
+ */
+ public void removeComponentCreationListener(
+ ComponentCreationListener listener) {
+ listeners.remove(listener);
+ }
+
+ /**
+ * Fires component creation event
+ *
+ * @param localId
+ * localId of the component
+ * @param component
+ * the component that was created
+ */
+ private void fireComponentCreatedEvent(String localId, Component component) {
+ ComponentCreatedEvent event = new ComponentCreatedEvent(localId,
+ component);
+ for (ComponentCreationListener listener : listeners) {
+ listener.componentCreated(event);
+ }
+ }
+
+ /**
+ * Interface to be implemented by component creation listeners
+ *
+ * @author Vaadin Ltd
+ */
+ public interface ComponentCreationListener extends Serializable {
+
+ /**
+ * Called when component has been created in the design context
+ *
+ * @param event
+ * the component creation event containing information on the
+ * created component
+ */
+ public void componentCreated(ComponentCreatedEvent event);
+ }
+
+ /**
+ * Component creation event that is fired when a component is created in the
+ * context
+ *
+ * @author Vaadin Ltd
+ */
+ public class ComponentCreatedEvent implements Serializable {
+ private String localId;
+ private Component component;
+ private DesignContext context;
+
+ /**
+ * Creates a new instance of ComponentCreatedEvent
+ *
+ * @param localId
+ * the local id of the created component
+ * @param component
+ * the created component
+ */
+ private ComponentCreatedEvent(String localId, Component component) {
+ this.localId = localId;
+ this.component = component;
+ context = DesignContext.this;
+ }
+
+ /**
+ * Returns the local id of the created component or null if not exist
+ *
+ * @return the localId
+ */
+ public String getLocalId() {
+ return localId;
+ }
+
+ /**
+ * Returns the created component
+ *
+ * @return the component
+ */
+ public Component getComponent() {
+ return component;
+ }
+ }
+
+ /**
+ * Helper method for component write implementors to determine whether their
+ * children should be written out or not
+ *
+ * @param c
+ * The component being written
+ * @param defaultC
+ * The default instance for the component
+ * @return whether the children of c should be written
+ */
+ public boolean shouldWriteChildren(Component c, Component defaultC) {
+ if (c == getRootComponent()) {
+ // The root component should always write its children - otherwise
+ // the result is empty
+ return true;
+ }
+
+ if (defaultC instanceof HasComponents
+ && ((HasComponents) defaultC).iterator().hasNext()) {
+ // Easy version which assumes that this is a custom component if the
+ // constructor adds children
+ return false;
+ }
+
+ return true;
+ }
+}
diff --git a/server/src/com/vaadin/ui/declarative/DesignException.java b/server/src/com/vaadin/ui/declarative/DesignException.java
new file mode 100644
index 0000000000..01482f84b0
--- /dev/null
+++ b/server/src/com/vaadin/ui/declarative/DesignException.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.ui.declarative;
+
+@SuppressWarnings("serial")
+/**
+ * An exception that is used when reading or writing a design fails.
+ *
+ * @since 7.4
+ * @author Vaadin Ltd
+ */
+public class DesignException extends RuntimeException {
+
+ public DesignException() {
+ super();
+ }
+
+ public DesignException(String message) {
+ super(message);
+ }
+
+ public DesignException(String message, Throwable e) {
+ super(message, e);
+ }
+
+} \ No newline at end of file
diff --git a/server/src/com/vaadin/ui/declarative/FieldBinder.java b/server/src/com/vaadin/ui/declarative/FieldBinder.java
new file mode 100644
index 0000000000..bd906682fa
--- /dev/null
+++ b/server/src/com/vaadin/ui/declarative/FieldBinder.java
@@ -0,0 +1,265 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.ui.declarative;
+
+import java.beans.IntrospectionException;
+import java.io.Serializable;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.logging.Logger;
+
+import com.vaadin.ui.Component;
+import com.vaadin.util.ReflectTools;
+
+/**
+ * Binder utility that binds member fields of a design class instance to given
+ * component instances. Only fields of type {@link Component} are bound
+ *
+ * @since 7.4
+ * @author Vaadin Ltd
+ */
+public class FieldBinder implements Serializable {
+
+ // the instance containing the bound fields
+ private Object bindTarget;
+ // mapping between field names and Fields
+ private Map<String, Field> fieldMap = new HashMap<String, Field>();
+
+ /**
+ * Creates a new instance of LayoutFieldBinder.
+ *
+ * @param design
+ * the design class instance containing the fields to bind
+ * @throws IntrospectionException
+ * if the given design class can not be introspected
+ */
+ public FieldBinder(Object design) throws IntrospectionException {
+ this(design, design.getClass());
+ }
+
+ /**
+ * Creates a new instance of LayoutFieldBinder.
+ *
+ * @param design
+ * the instance containing the fields
+ * @param classWithFields
+ * the class which defines the fields to bind
+ * @throws IntrospectionException
+ * if the given design class can not be introspected
+ */
+ public FieldBinder(Object design, Class<?> classWithFields)
+ throws IntrospectionException {
+ if (design == null) {
+ throw new IllegalArgumentException("The design must not be null");
+ }
+ bindTarget = design;
+ resolveFields(classWithFields);
+ }
+
+ /**
+ * Returns a collection of field names that are not bound.
+ *
+ * @return a collection of fields assignable to Component that are not bound
+ */
+ public Collection<String> getUnboundFields() throws FieldBindingException {
+ List<String> unboundFields = new ArrayList<String>();
+ for (Field f : fieldMap.values()) {
+ try {
+ Object value = ReflectTools.getJavaFieldValue(bindTarget, f);
+ if (value == null) {
+ unboundFields.add(f.getName());
+ }
+ } catch (IllegalArgumentException e) {
+ throw new FieldBindingException("Could not get field value", e);
+ } catch (IllegalAccessException e) {
+ throw new FieldBindingException("Could not get field value", e);
+ } catch (InvocationTargetException e) {
+ throw new FieldBindingException("Could not get field value", e);
+ }
+ }
+ if (unboundFields.size() > 0) {
+ getLogger().severe(
+ "Found unbound fields in component root :" + unboundFields);
+ }
+ return unboundFields;
+ }
+
+ /**
+ * Resolves the fields of the design class instance.
+ */
+ private void resolveFields(Class<?> classWithFields) {
+ for (Field memberField : getFields(classWithFields)) {
+ if (Component.class.isAssignableFrom(memberField.getType())) {
+ fieldMap.put(memberField.getName().toLowerCase(Locale.ENGLISH),
+ memberField);
+ }
+ }
+ }
+
+ /**
+ * Tries to bind the given {@link Component} instance to a member field of
+ * the bind target. The name of the bound field is constructed based on the
+ * id or caption of the instance, depending on which one is defined. If a
+ * field is already bound (not null), {@link FieldBindingException} is
+ * thrown.
+ *
+ * @param instance
+ * the instance to be bound to a field
+ * @return true on success, otherwise false
+ * @throws FieldBindingException
+ * if error occurs when trying to bind the instance to a field
+ */
+ public boolean bindField(Component instance) {
+ return bindField(instance, null);
+ }
+
+ /**
+ * Tries to bind the given {@link Component} instance to a member field of
+ * the bind target. The fields are matched based on localId, id and caption.
+ *
+ * @param instance
+ * the instance to be bound to a field
+ * @param localId
+ * the localId used for mapping the field to an instance field
+ * @return true on success
+ * @throws FieldBindingException
+ * if error occurs when trying to bind the instance to a field
+ */
+ public boolean bindField(Component instance, String localId) {
+ // check that the field exists, is correct type and is null
+ boolean success = bindFieldByIdentifier(localId, instance);
+ if (!success) {
+ success = bindFieldByIdentifier(instance.getId(), instance);
+ }
+ if (!success) {
+ success = bindFieldByIdentifier(instance.getCaption(), instance);
+ }
+ if (!success) {
+ String idInfo = "localId: " + localId + " id: " + instance.getId()
+ + " caption: " + instance.getCaption();
+ getLogger().finest(
+ "Could not bind component to a field "
+ + instance.getClass().getName() + " " + idInfo);
+ }
+ return success;
+ }
+
+ /**
+ * Tries to bind the given {@link Component} instance to a member field of
+ * the bind target. The field is matched based on the given identifier. If a
+ * field is already bound (not null), {@link FieldBindingException} is
+ * thrown.
+ *
+ * @param identifier
+ * the identifier for the field.
+ * @param instance
+ * the instance to be bound to a field
+ * @return true on success
+ * @throws FieldBindingException
+ * if error occurs when trying to bind the instance to a field
+ */
+ private boolean bindFieldByIdentifier(String identifier, Component instance) {
+ try {
+ // create and validate field name
+ String fieldName = asFieldName(identifier);
+ if (fieldName.length() == 0) {
+ return false;
+ }
+ // validate that the field can be found
+ Field field = fieldMap.get(fieldName.toLowerCase(Locale.ENGLISH));
+ if (field == null) {
+ getLogger().fine(
+ "No field was found by identifier " + identifier);
+ return false;
+ }
+ // validate that the field is not set
+ Object fieldValue = ReflectTools.getJavaFieldValue(bindTarget,
+ field);
+ if (fieldValue != null) {
+ getLogger().fine(
+ "The field \"" + fieldName
+ + "\" was already mapped. Ignoring.");
+ } else {
+ // set the field value
+ ReflectTools.setJavaFieldValue(bindTarget, field, instance);
+ }
+ return true;
+ } catch (IllegalAccessException e) {
+ throw new FieldBindingException("Field binding failed", e);
+ } catch (IllegalArgumentException e) {
+ throw new FieldBindingException("Field binding failed", e);
+ } catch (InvocationTargetException e) {
+ throw new FieldBindingException("Field binding failed", e);
+ }
+ }
+
+ /**
+ * Converts the given identifier to a valid field name by stripping away
+ * illegal character and setting the first letter of the name to lower case.
+ *
+ * @param identifier
+ * the identifier to be converted to field name
+ * @return the field name corresponding the identifier
+ */
+ private static String asFieldName(String identifier) {
+ if (identifier == null) {
+ return "";
+ }
+ StringBuilder result = new StringBuilder();
+ for (int i = 0; i < identifier.length(); i++) {
+ char character = identifier.charAt(i);
+ if (Character.isJavaIdentifierPart(character)) {
+ result.append(character);
+ }
+ }
+ // lowercase first letter
+ if (result.length() > 0 && Character.isLetter(result.charAt(0))) {
+ result.setCharAt(0, Character.toLowerCase(result.charAt(0)));
+ }
+ return result.toString();
+ }
+
+ /**
+ * Returns a list containing Field objects reflecting all the fields of the
+ * class or interface represented by this Class object. The fields in
+ * superclasses are excluded.
+ *
+ * @param searchClass
+ * the class to be scanned for fields
+ * @return the list of fields in this class
+ */
+ protected static List<java.lang.reflect.Field> getFields(
+ Class<?> searchClass) {
+ ArrayList<java.lang.reflect.Field> memberFields = new ArrayList<java.lang.reflect.Field>();
+
+ for (java.lang.reflect.Field memberField : searchClass
+ .getDeclaredFields()) {
+ memberFields.add(memberField);
+ }
+ return memberFields;
+ }
+
+ private static Logger getLogger() {
+ return Logger.getLogger(FieldBinder.class.getName());
+ }
+
+}
diff --git a/server/src/com/vaadin/ui/declarative/FieldBindingException.java b/server/src/com/vaadin/ui/declarative/FieldBindingException.java
new file mode 100644
index 0000000000..d8b587a14c
--- /dev/null
+++ b/server/src/com/vaadin/ui/declarative/FieldBindingException.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.ui.declarative;
+
+/**
+ * Exception that is thrown when an error occurs during field binding when
+ * reading a design template
+ *
+ * @since 7.4
+ * @author Vaadin Ltd
+ */
+public class FieldBindingException extends RuntimeException {
+
+ public FieldBindingException(String message) {
+ super(message);
+ }
+
+ public FieldBindingException(String message, Throwable cause) {
+ super(message, cause);
+ }
+}
diff --git a/server/src/com/vaadin/ui/themes/ValoTheme.java b/server/src/com/vaadin/ui/themes/ValoTheme.java
index da80375114..1285bf7f67 100644
--- a/server/src/com/vaadin/ui/themes/ValoTheme.java
+++ b/server/src/com/vaadin/ui/themes/ValoTheme.java
@@ -882,6 +882,31 @@ public class ValoTheme {
/**
* <p>
+ * When you use the Valo menu and wish to enable responsive features of the
+ * menu, you need to add this style name to the UI containing the menu.
+ * </p>
+ *
+ * <p>
+ * You only need to add this style name to the UI containing a Valo menu, if
+ * you're using the Responsive extension with the UI.
+ * </p>
+ *
+ * <h4>Example</h4>
+ *
+ * <p>
+ * To enable responsivity in the Valo menu, the following example code
+ * should be executed in your UI containing the menu.
+ * </p>
+ *
+ * <pre>
+ * Responsive.makeResponsive(this);
+ * addStyleName(ValoTheme.UI_WITH_MENU);
+ * </pre>
+ */
+ public static final String UI_WITH_MENU = "valo-menu-responsive";
+
+ /**
+ * <p>
* Set the <em><b>primary</b></em> style name of a CssLayout to this, and
* add any number of layouts with the {@link #MENU_PART} style inside it.
* </p>
diff --git a/server/src/com/vaadin/util/ReflectTools.java b/server/src/com/vaadin/util/ReflectTools.java
index fa34a670bf..2e2d3fe238 100644
--- a/server/src/com/vaadin/util/ReflectTools.java
+++ b/server/src/com/vaadin/util/ReflectTools.java
@@ -187,6 +187,9 @@ public class ReflectTools implements Serializable {
field.set(object, value);
}
+ /**
+ * @since 7.4
+ */
public static Class<?> convertPrimitiveType(Class<?> type) {
// Gets the return type from get method
if (type.isPrimitive()) {
diff --git a/server/tests/src/com/vaadin/tests/design/DesignReadInConstructor.html b/server/tests/src/com/vaadin/tests/design/DesignReadInConstructor.html
new file mode 100644
index 0000000000..86c9c2a2da
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/DesignReadInConstructor.html
@@ -0,0 +1,5 @@
+<v-vertical-layout>
+ <v-text-field caption="First name" />
+ <v-text-field caption="Last name" />
+ <v-button>OK!</v-button>
+</v-vertical-layout> \ No newline at end of file
diff --git a/server/tests/src/com/vaadin/tests/design/DesignReadInConstructor.java b/server/tests/src/com/vaadin/tests/design/DesignReadInConstructor.java
new file mode 100644
index 0000000000..ce80d98324
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/DesignReadInConstructor.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design;
+
+import org.junit.Ignore;
+
+import com.vaadin.ui.CssLayout;
+import com.vaadin.ui.declarative.Design;
+
+@Ignore
+public class DesignReadInConstructor extends CssLayout {
+
+ public DesignReadInConstructor() {
+ Design.read(
+ getClass().getResourceAsStream("DesignReadInConstructor.html"),
+ this);
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/DesignReadInConstructorTest.java b/server/tests/src/com/vaadin/tests/design/DesignReadInConstructorTest.java
new file mode 100644
index 0000000000..539595762d
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/DesignReadInConstructorTest.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Attribute;
+import org.jsoup.nodes.Document;
+import org.jsoup.nodes.Element;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import com.vaadin.ui.declarative.Design;
+
+public class DesignReadInConstructorTest {
+
+ @Test
+ public void useDesignReadInConstructor() {
+ DesignReadInConstructor dric = new DesignReadInConstructor();
+ Assert.assertEquals(3, dric.getComponentCount());
+ }
+
+ @Test
+ @Ignore("Can't currently work. There is no way to write a custom component which manually reads its design in the constructor")
+ public void readAndWriteDesignReadInConstructor() throws IOException {
+ DesignReadInConstructor dric = new DesignReadInConstructor();
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ Design.write(dric, baos);
+ Document doc = Jsoup.parse(baos.toString("UTF-8"));
+
+ Document d = Jsoup.parse(
+ getClass().getResourceAsStream("DesignReadInConstructor.html"),
+ "UTF-8", "");
+ assertJsoupTreeEquals(d.body().child(0), doc.body().child(0));
+ }
+
+ private void assertJsoupTreeEquals(Element expected, Element actual) {
+ Assert.assertEquals(expected.tagName(), actual.tagName());
+
+ Set<String> keys = new HashSet<String>();
+
+ for (Attribute attr : expected.attributes().asList()) {
+ keys.add(attr.getKey());
+ }
+ for (Attribute attr : actual.attributes().asList()) {
+ keys.add(attr.getKey());
+ }
+ for (String attributeKey : keys) {
+ Assert.assertEquals(expected.attr(attributeKey),
+ actual.attr(attributeKey));
+ }
+
+ Assert.assertEquals(expected.children().size(), actual.children()
+ .size());
+ for (int i = 0; i < expected.children().size(); i++) {
+ assertJsoupTreeEquals(expected.child(i), actual.child(i));
+ }
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/DesignTest.java b/server/tests/src/com/vaadin/tests/design/DesignTest.java
new file mode 100644
index 0000000000..a5ccef0d2c
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/DesignTest.java
@@ -0,0 +1,135 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.Iterator;
+
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Component;
+import com.vaadin.ui.HasComponents;
+import com.vaadin.ui.HorizontalLayout;
+import com.vaadin.ui.Panel;
+import com.vaadin.ui.TextField;
+import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.declarative.Design;
+import com.vaadin.ui.declarative.DesignContext;
+import com.vaadin.ui.declarative.DesignException;
+
+public class DesignTest {
+
+ @Test
+ public void readStream() throws FileNotFoundException {
+ Component root = Design
+ .read(new FileInputStream(
+ "server/tests/src/com/vaadin/tests/design/verticallayout-two-children.html"));
+ VerticalLayout rootLayout = (VerticalLayout) root;
+ Assert.assertEquals(VerticalLayout.class, root.getClass());
+
+ Assert.assertEquals(2, rootLayout.getComponentCount());
+ Assert.assertEquals(TextField.class, rootLayout.getComponent(0)
+ .getClass());
+ Assert.assertEquals(Button.class, rootLayout.getComponent(1).getClass());
+ }
+
+ @Test(expected = DesignException.class)
+ @Ignore("Feature needs to be fixed")
+ public void readWithIncorrectRoot() throws FileNotFoundException {
+ Design.read(
+ new FileInputStream(
+ "server/tests/src/com/vaadin/tests/design/verticallayout-one-child.html"),
+ new Panel());
+ }
+
+ public static class MyVerticalLayout extends VerticalLayout {
+
+ }
+
+ @Test
+ public void readWithSubClassRoot() throws FileNotFoundException {
+ Design.read(
+ new FileInputStream(
+ "server/tests/src/com/vaadin/tests/design/verticallayout-one-child.html"),
+ new MyVerticalLayout());
+ }
+
+ @Test
+ public void writeComponentToStream() throws IOException {
+ HorizontalLayout root = new HorizontalLayout(new Button("OK"),
+ new Button("Cancel"));
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ Design.write(root, baos);
+ Component newRoot = Design.read(new ByteArrayInputStream(baos
+ .toByteArray()));
+
+ assertHierarchyEquals(root, newRoot);
+ }
+
+ @Test
+ public void writeDesignContextToStream() throws IOException {
+ DesignContext dc = Design
+ .read(new FileInputStream(
+ "server/tests/src/com/vaadin/tests/design/verticallayout-two-children.html"),
+ null);
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ Design.write(dc, baos);
+ Component newRoot = Design.read(new ByteArrayInputStream(baos
+ .toByteArray()));
+
+ assertHierarchyEquals(dc.getRootComponent(), newRoot);
+ }
+
+ @Test(expected = DesignException.class)
+ public void testDuplicateIds() throws FileNotFoundException {
+ Design.read(new FileInputStream(
+ "server/tests/src/com/vaadin/tests/design/duplicate-ids.html"));
+ }
+
+ @Test(expected = DesignException.class)
+ public void testDuplicateLocalIds() throws FileNotFoundException {
+ Design.read(new FileInputStream(
+ "server/tests/src/com/vaadin/tests/design/duplicate-local-ids.html"));
+ }
+
+ private void assertHierarchyEquals(Component expected, Component actual) {
+ if (expected.getClass() != actual.getClass()) {
+ throw new AssertionError(
+ "Component classes do not match. Expected: "
+ + expected.getClass().getName() + ", was: "
+ + actual.getClass().getName());
+ }
+
+ if (expected instanceof HasComponents) {
+ HasComponents expectedHC = (HasComponents) expected;
+ HasComponents actualHC = (HasComponents) actual;
+ Iterator<Component> eI = expectedHC.iterator();
+ Iterator<Component> aI = actualHC.iterator();
+
+ while (eI.hasNext()) {
+ assertHierarchyEquals(eI.next(), aI.next());
+ }
+ }
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/InvalidLayoutTemplate.java b/server/tests/src/com/vaadin/tests/design/InvalidLayoutTemplate.java
new file mode 100644
index 0000000000..bdfa4b47cc
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/InvalidLayoutTemplate.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design;
+
+import org.junit.Ignore;
+
+import com.vaadin.ui.Button;
+import com.vaadin.ui.NativeButton;
+import com.vaadin.ui.TextField;
+import com.vaadin.ui.VerticalLayout;
+
+/**
+ *
+ * @since
+ * @author Vaadin Ltd
+ */
+@Ignore
+public class InvalidLayoutTemplate extends VerticalLayout {
+ private NativeButton firstButton;
+ private NativeButton secondButton;
+ private NativeButton yetanotherbutton; // generated based on caption
+ private Button clickme; // generated based on caption
+ private TextField shouldNotBeMapped;
+
+ public NativeButton getFirstButton() {
+ return firstButton;
+ }
+
+ public NativeButton getSecondButton() {
+ return secondButton;
+ }
+
+ public NativeButton getYetanotherbutton() {
+ return yetanotherbutton;
+ }
+
+ public Button getClickme() {
+ return clickme;
+ }
+
+ public TextField getShouldNotBeMapped() {
+ return shouldNotBeMapped;
+ }
+
+}
diff --git a/server/tests/src/com/vaadin/tests/design/LayoutTemplate.java b/server/tests/src/com/vaadin/tests/design/LayoutTemplate.java
new file mode 100644
index 0000000000..95f30fb728
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/LayoutTemplate.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design;
+
+import org.junit.Ignore;
+
+import com.vaadin.ui.Button;
+import com.vaadin.ui.NativeButton;
+import com.vaadin.ui.VerticalLayout;
+
+/**
+ * Template to be populated in the tests
+ *
+ * @since
+ * @author Vaadin Ltd
+ */
+@Ignore
+public class LayoutTemplate extends VerticalLayout {
+ private NativeButton firstButton; // assigned based on local id
+ private NativeButton secondButton; // assigned based on id
+ private NativeButton yetanotherbutton; // assigned based on caption
+ private Button clickme; // assigned based on caption
+
+ public NativeButton getFirstButton() {
+ return firstButton;
+ }
+
+ public NativeButton getSecondButton() {
+ return secondButton;
+ }
+
+ public NativeButton getYetanotherbutton() {
+ return yetanotherbutton;
+ }
+
+ public Button getClickme() {
+ return clickme;
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/ParseAllSupportedComponentsTest.java b/server/tests/src/com/vaadin/tests/design/ParseAllSupportedComponentsTest.java
new file mode 100644
index 0000000000..4f3f205631
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/ParseAllSupportedComponentsTest.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+
+import junit.framework.TestCase;
+
+import com.vaadin.ui.declarative.Design;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ * Just top level test case that contains all synchronizable components
+ *
+ * @author Vaadin Ltd
+ */
+public class ParseAllSupportedComponentsTest extends TestCase {
+
+ public void testParsing() {
+ try {
+ DesignContext ctx = Design
+ .read(new FileInputStream(
+ "server/tests/src/com/vaadin/tests/design/all-components.html"),
+ null);
+ assertNotNull("The returned design context can not be null", ctx);
+ assertNotNull("the component root can not be null",
+ ctx.getRootComponent());
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ fail("Template parsing threw exception");
+ }
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/ParseLayoutTest.java b/server/tests/src/com/vaadin/tests/design/ParseLayoutTest.java
new file mode 100644
index 0000000000..c517b0e5e2
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/ParseLayoutTest.java
@@ -0,0 +1,223 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+
+import junit.framework.TestCase;
+
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Document;
+import org.jsoup.nodes.Element;
+import org.jsoup.nodes.Node;
+import org.junit.Test;
+
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Component;
+import com.vaadin.ui.HorizontalLayout;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.NativeButton;
+import com.vaadin.ui.TextArea;
+import com.vaadin.ui.TextField;
+import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.declarative.Design;
+import com.vaadin.ui.declarative.DesignContext;
+import com.vaadin.ui.declarative.DesignException;
+
+/**
+ * A test for checking that parsing a layout preserves the IDs and the mapping
+ * from prefixes to package names (for example <meta name=”package-mapping”
+ * content=”my:com.addon.mypackage” />)
+ *
+ * @since
+ * @author Vaadin Ltd
+ */
+public class ParseLayoutTest extends TestCase {
+ // The context is used for accessing the created component hierarchy.
+ private DesignContext ctx;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ ctx = Design
+ .read(new FileInputStream(
+ "server/tests/src/com/vaadin/tests/design/testFile.html"),
+ null);
+ }
+
+ /*
+ * Checks the component hierarchy created by parsing a design. Also checks
+ * that components can be found by id and caption.
+ */
+ @Test
+ public void testGettingByIDAndCaption() throws FileNotFoundException {
+ findElements(ctx);
+ checkHierarchy(ctx);
+ }
+
+ /*
+ * Check that captions, ids and package mappings are preserved when an html
+ * tree is generated from a DesignContext containing the component root of
+ * the component hierarchy. Done by writing the design to a string and then
+ * reading it back, not using the original context information after reading
+ * the written design. The mapping from prefixes to package names is checked
+ * directly from the html tree.
+ */
+ @Test
+ public void testThatSerializationPreservesProperties() throws IOException {
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ Design.write(ctx, out);
+ ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
+ DesignContext newContext = Design.read(in, null);
+ findElements(newContext);
+ checkHierarchy(newContext);
+ // Check the mapping from prefixes to package names using the html tree
+ String[] expectedPrefixes = { "my" };
+ String[] expectedPackageNames = { "com.addon.mypackage" };
+ int index = 0;
+
+ Document doc = Jsoup.parse(out.toString("UTF-8"));
+ Element head = doc.head();
+ for (Node child : head.childNodes()) {
+ if ("meta".equals(child.nodeName())) {
+ String name = child.attributes().get("name");
+ if ("package-mapping".equals(name)) {
+ String content = child.attributes().get("content");
+ String[] parts = content.split(":");
+ assertEquals("Unexpected prefix.", expectedPrefixes[index],
+ parts[0]);
+ assertEquals("Unexpected package name.",
+ expectedPackageNames[index], parts[1]);
+ index++;
+ }
+ }
+ }
+ assertEquals("Unexpected number of prefix - package name pairs.", 1,
+ index);
+ }
+
+ /*
+ * Check that the field binding works if root instance with member fields is
+ * passed to the LayoutHandler
+ *
+ * @throws IOException
+ */
+ public void testFieldBinding() throws IOException {
+ LayoutTemplate template = new LayoutTemplate();
+ InputStream htmlFile = new FileInputStream(
+ "server/tests/src/com/vaadin/tests/design/testFile.html");
+ Design.read(htmlFile, template);
+ assertNotNull(template.getFirstButton());
+ assertNotNull(template.getSecondButton());
+ assertNotNull(template.getYetanotherbutton());
+ assertNotNull(template.getClickme());
+ assertEquals("Native click me", template.getFirstButton().getCaption());
+ }
+
+ /*
+ * Check that the field binding fails if some of the fields in the root
+ * instance were not bound
+ *
+ * @throws IOException
+ */
+ public void testUnboundFields() throws IOException {
+ InvalidLayoutTemplate template = new InvalidLayoutTemplate();
+ InputStream htmlFile = new FileInputStream(
+ "server/tests/src/com/vaadin/tests/design/testFile.html");
+ try {
+ Design.read(htmlFile, template);
+ // we are expecting an exception
+ fail();
+ } catch (DesignException e) {
+ // expected
+ }
+ }
+
+ /*
+ * Checks that the correct components occur in the correct order in the
+ * component hierarchy rooted at context.getComponentRoot().
+ */
+ private void checkHierarchy(DesignContext context) {
+ Component root = context.getRootComponent();
+ VerticalLayout vlayout = (VerticalLayout) root;
+ int numComponents = vlayout.getComponentCount();
+ assertEquals("Wrong number of child components", 3, numComponents);
+
+ // Check the contents of the horizontal layout
+ HorizontalLayout hlayout = (HorizontalLayout) vlayout.getComponent(0);
+ int numHLComponents = hlayout.getComponentCount();
+ assertEquals(5, numHLComponents);
+ Label label = (Label) hlayout.getComponent(0);
+ assertEquals("Wrong caption.", "FooBar", label.getCaption());
+ NativeButton nb = (NativeButton) hlayout.getComponent(1);
+ assertEquals("Wrong caption.", "Native click me", nb.getCaption());
+ nb = (NativeButton) hlayout.getComponent(2);
+ assertEquals("Wrong caption.", "Another button", nb.getCaption());
+ nb = (NativeButton) hlayout.getComponent(3);
+ assertEquals("Wrong caption.", "Yet another button", nb.getCaption());
+ Button b = (Button) hlayout.getComponent(4);
+ assertEquals("Wrong caption.", "Click me", b.getCaption());
+ assertEquals("Wrong width.", 150f, b.getWidth());
+
+ // Check the remaining two components of the vertical layout
+ TextField tf = (TextField) vlayout.getComponent(1);
+ assertEquals("Wrong caption.", "Text input", tf.getCaption());
+ TextArea ta = (TextArea) vlayout.getComponent(2);
+ assertEquals("Wrong caption.", "Text area", ta.getCaption());
+ assertEquals("Wrong width.", 300f, ta.getWidth());
+ assertEquals("Wrong height.", 200f, ta.getHeight());
+ }
+
+ /*
+ * Checks that the correct elements are found using a local id, a global id
+ * or a caption.
+ */
+ private void findElements(DesignContext designContext) {
+ NativeButton firstButton = (NativeButton) designContext
+ .getComponentByLocalId("firstButton");
+ NativeButton firstButton_2 = (NativeButton) designContext
+ .getComponentByCaption("Native click me");
+ NativeButton secondButton = (NativeButton) designContext
+ .getComponentById("secondButton");
+ NativeButton secondButton_2 = (NativeButton) designContext
+ .getComponentByLocalId("localID");
+ NativeButton secondButton_3 = (NativeButton) designContext
+ .getComponentByCaption("Another button");
+ NativeButton thirdButton = (NativeButton) designContext
+ .getComponentByCaption("Yet another button");
+ // Check that the first button was found using both identifiers.
+ assertEquals("The found buttons should be identical but they are not.",
+ firstButton, firstButton_2);
+ assertTrue("The found button element is incorrect.", firstButton
+ .getCaption().equals("Native click me"));
+ // Check that the second button was found using all three identifiers.
+ assertEquals("The found buttons should be identical but they are not.",
+ secondButton, secondButton_2);
+ assertEquals("The found buttons should be identical but they are not.",
+ secondButton_2, secondButton_3);
+ assertTrue("The found button is incorrect.", secondButton.getCaption()
+ .equals("Another button"));
+ // Check that the third button was found by caption.
+ assertTrue("The found button is incorrect.", thirdButton.getCaption()
+ .equals("Yet another button"));
+ }
+
+}
diff --git a/server/tests/src/com/vaadin/tests/design/TestLocale.java b/server/tests/src/com/vaadin/tests/design/TestLocale.java
new file mode 100644
index 0000000000..a4100f7d71
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/TestLocale.java
@@ -0,0 +1,176 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design;
+
+import java.io.ByteArrayInputStream;
+import java.util.Locale;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Document;
+import org.jsoup.nodes.DocumentType;
+import org.jsoup.nodes.Element;
+import org.jsoup.nodes.Node;
+
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Component;
+import com.vaadin.ui.HorizontalLayout;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.declarative.Design;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ * Tests the handling of the locale property in parsing and html generation.
+ *
+ * @since
+ * @author Vaadin Ltd
+ */
+public class TestLocale extends TestCase {
+ DesignContext ctx;
+
+ @Override
+ public void setUp() {
+ ctx = new DesignContext();
+ }
+
+ /*
+ * Checks that when the html corresponding to a component hierarchy is
+ * constructed, the result only contains locale attributes for a component
+ * if its locale differs from that of its parent.
+ */
+ public void testHtmlGeneration() {
+ // create a component hierarchy
+ VerticalLayout vLayout = new VerticalLayout();
+ vLayout.setLocale(Locale.US);
+ HorizontalLayout hLayout = new HorizontalLayout();
+ hLayout.setLocale(Locale.ITALY);
+ vLayout.addComponent(hLayout);
+ Button b1 = new Button();
+ b1.setLocale(Locale.ITALY);
+ Button b2 = new Button();
+ b2.setLocale(Locale.US);
+ hLayout.addComponent(b1);
+ hLayout.addComponent(b2);
+ HorizontalLayout hlayout2 = new HorizontalLayout();
+ hlayout2.setLocale(Locale.US);
+ vLayout.addComponent(hlayout2);
+ Label l = new Label();
+ l.setLocale(Locale.US);
+ hlayout2.addComponent(l);
+ Label l2 = new Label();
+ l2.setLocale(Locale.CANADA);
+ hlayout2.addComponent(l2);
+ ctx.setRootComponent(vLayout);
+ // create the html tree corresponding to the component hierarchy
+ Document doc = componentToDoc(ctx);
+ // check the created html
+ Element body = doc.body();
+ Element evLayout = body.child(0);
+ assertEquals("Wrong locale information.", "en_US",
+ evLayout.attr("locale"));
+ Element ehLayout = evLayout.child(0);
+ assertEquals("Wrong locale information.", "it_IT",
+ ehLayout.attr("locale"));
+ Element eb1 = ehLayout.child(0);
+ assertTrue(
+ "The element should not have a locale specification, found locale "
+ + eb1.attr("locale"), "".equals(eb1.attr("locale")));
+ Element eb2 = ehLayout.child(1);
+ assertEquals("Wrong locale information.", "en_US", eb2.attr("locale"));
+ Element ehLayout2 = evLayout.child(1);
+ assertTrue(
+ "The element should not have a locale specification, found locale "
+ + ehLayout2.attr("locale"),
+ "".equals(ehLayout2.attr("locale")));
+ Element el1 = ehLayout2.child(0);
+ assertTrue(
+ "The element should not have a locale specification, found locale "
+ + el1.attr("locale"), "".equals(el1.attr("locale")));
+ Element el2 = ehLayout2.child(1);
+ assertEquals("Wrong locale information.", "en_CA", el2.attr("locale"));
+ }
+
+ private Document componentToDoc(DesignContext dc) {
+ // Create the html tree skeleton.
+ Document doc = new Document("");
+ DocumentType docType = new DocumentType("html", "", "", "");
+ doc.appendChild(docType);
+ Element html = doc.createElement("html");
+ doc.appendChild(html);
+ html.appendChild(doc.createElement("head"));
+ Element body = doc.createElement("body");
+ html.appendChild(body);
+ dc.writePackageMappings(doc);
+
+ // Append the design under <body> in the html tree. createNode
+ // creates the entire component hierarchy rooted at the
+ // given root node.
+ Component root = dc.getRootComponent();
+ Node rootNode = dc.createElement(root);
+ body.appendChild(rootNode);
+ return doc;
+
+ }
+
+ /*
+ * Checks that the locale of a component is set when the html element
+ * corresponding to the component specifies a locale.
+ */
+ public void testParsing() {
+ // create an html document
+ Document doc = new Document("");
+ DocumentType docType = new DocumentType("html", "", "", "");
+ doc.appendChild(docType);
+ Element html = doc.createElement("html");
+ doc.appendChild(html);
+ html.appendChild(doc.createElement("head"));
+ Element body = doc.createElement("body");
+ html.appendChild(body);
+ Element evLayout = doc.createElement("v-vertical-layout");
+ evLayout.attr("locale", "en_US");
+ body.appendChild(evLayout);
+ Element ehLayout = doc.createElement("v-horizontal-layout");
+ evLayout.appendChild(ehLayout);
+ Element eb1 = doc.createElement("v-button");
+ eb1.attr("locale", "en_US");
+ ehLayout.appendChild(eb1);
+ Element eb2 = doc.createElement("v-button");
+ eb2.attr("locale", "en_GB");
+ ehLayout.appendChild(eb2);
+ Element eb3 = doc.createElement("v-button");
+ ehLayout.appendChild(eb3);
+
+ // parse the created document and check the constructed component
+ // hierarchy
+ String string = doc.html();
+ VerticalLayout vLayout = (VerticalLayout) Design
+ .read(new ByteArrayInputStream(string.getBytes()));
+ assertEquals("Wrong locale.", new Locale("en", "US"),
+ vLayout.getLocale());
+ HorizontalLayout hLayout = (HorizontalLayout) vLayout.getComponent(0);
+ assertEquals("The element should have the same locale as its parent.",
+ vLayout.getLocale(), hLayout.getLocale());
+ Button b1 = (Button) hLayout.getComponent(0);
+ assertEquals("Wrong locale.", new Locale("en", "US"), b1.getLocale());
+ Button b2 = (Button) hLayout.getComponent(1);
+ assertEquals("Wrong locale.", new Locale("en", "GB"), b2.getLocale());
+ Button b3 = (Button) hLayout.getComponent(2);
+ assertEquals(
+ "The component should have the same locale as its parent.",
+ hLayout.getLocale(), b3.getLocale());
+ }
+} \ No newline at end of file
diff --git a/server/tests/src/com/vaadin/tests/design/all-components.html b/server/tests/src/com/vaadin/tests/design/all-components.html
new file mode 100644
index 0000000000..0f16ea9363
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/all-components.html
@@ -0,0 +1,110 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta name="package-mapping" content="my:com.addon.mypackage"/>
+ </head>
+ <body>
+ <v-vertical-layout>
+ <!-- abstract component -->
+ <v-button primary-style-name="button" id="foo" style-name="red" caption="Some caption" icon="vaadin://themes/runo/icons/16/ok.png" description="My tooltip" error="Something went wrong" locale="en_US"></v-button>
+
+ <!-- absolute layout -->
+ <v-absolute-layout>
+ <v-button :top="100px" :left="0px" :z-index=21>OK</v-button>
+ <v-button :bottom="0px" :right="0px">Cancel</v-button>
+ </v-absolute-layout>
+
+ <!-- vertical layout -->
+ <v-vertical-layout spacing margin>
+ <v-button :top>OK</v-button>
+ <v-table size-full :expand=1 />
+ </v-vertical-layout>
+
+ <!-- horizontal layout -->
+ <v-horizontal-layout spacing margin>
+ <v-button :top>OK</v-button>
+ <v-table size-full :expand=1 />
+ </v-horizontal-layout>
+
+ <!-- form layout -->
+ <v-form-layout spacing margin>
+ <v-button :top>OK</v-button>
+ <v-table size-full :expand=1 />
+ </v-form-layout>
+
+ <!-- css layout -->
+ <v-css-layout>
+ <v-button>OK</v-button>
+ <v-table size-full />
+ </v-css-layout>
+
+ <!-- panel -->
+ <v-panel caption="Hello world" tabindex=2 scroll-left="10" scroll-top="10">
+ <v-table size-full />
+ </v-panel>
+
+ <!-- abstract field -->
+ <v-text-field buffered validation-visible=false invalid-committed invalid-allowed=false required required-error="This is a required field" conversion-error="Input {0} cannot be parsed" tabindex=3 readonly />
+ <!-- abstract text field, text field -->
+ <v-text-field null-representation="" null-setting-allowed maxlength=10 columns=5 input-prompt="Please enter a value" text-change-event-mode="eager" text-change-timeout=2 value="foo" />
+ <!-- password field -->
+ <v-password-field null-representation="" null-setting-allowed maxlength=10 columns=5 input-prompt="Please enter a value" text-change-event-mode="eager" text-change-timeout=2 value="foo" />
+ <!-- text area -->
+ <v-text-area rows=5 wordwrap=false >test value</v-text-area>
+ <!-- button -->
+ <v-button click-shortcut="ctrl-shift-o" disable-on-click tabindex=1 icon="http://vaadin.com/image.png" icon-alt="ok" plain-text>OK</v-button>
+ <!-- native button -->
+ <v-button click-shortcut="ctrl-shift-o" disable-on-click tabindex=1 icon="http://vaadin.com/image.png" icon-alt="ok" plain-text>OK</v-button>
+
+ <!-- tabsheet -->
+ <v-tab-sheet tabindex=5>
+ <tab visible=false closable caption="My first tab">
+ <v-vertical-layout>
+ <v-text-field/>
+ </v-vertical-layout>
+ </tab>
+ <tab enabled=false caption="Disabled second tab">
+ <v-button>In disabled tab - can’t be shown by default</v-button>
+ </tab>
+ <tab icon="theme://../runo/icons/16/ok.png" icon-alt="Ok png from Runo - very helpful" description="Click to show a text field" style-name="red" id="uniqueDomId">
+ <v-text-field input-prompt="Icon only in tab" />
+ </tab>
+ </v-tab-sheet>
+
+ <!-- accordion -->
+ <v-accordion tabindex=5>
+ <tab visible=false closable caption="My first tab">
+ <v-vertical-layout>
+ <v-text-field/>
+ </v-vertical-layout>
+ </tab>
+ <tab enabled=false caption="Disabled second tab">
+ <v-button>In disabled tab - can’t be shown by default</v-button>
+ </tab>
+ <tab icon="theme://../runo/icons/16/ok.png" icon-alt="Ok png from Runo - very helpful" description="Click to show a text field" style-name="red" id="uniqueDomId">
+ <v-text-field input-prompt="Icon only in tab" />
+ </tab>
+ </v-accordion>
+
+ <!-- abstract split panel -->
+ <v-horizontal-split-panel split-position="20px" min-split-position="0px" max-split-position="50px" locked>
+ <v-button>First slot</v-button>
+ </v-horizontal-split-panel>
+ <v-vertical-split-panel split-position="25%" reversed>
+ <v-button :second>Second slot</v-button>
+ </v-vertical-split-panel>
+ <v-horizontal-split-panel split-position="25%" reversed>
+ <v-button>First slot</v-button>
+ <v-button>Second slot</v-button>
+ </v-horizontal-split-panel>
+
+ <!-- label -->
+ <v-label>Hello world!</v-label>
+ <v-label>This is <b><u>Rich</u></b> content!</v-label>
+ <v-label plain-text>This is only <b>text</b> and will contain visible tags</v-label>
+
+ <!-- checkbox -->
+ <v-check-box checked/>
+ </v-vertical-layout>
+ </body>
+</html>
diff --git a/server/tests/src/com/vaadin/tests/design/designroot/DesignRootTest.java b/server/tests/src/com/vaadin/tests/design/designroot/DesignRootTest.java
new file mode 100644
index 0000000000..682da30344
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/designroot/DesignRootTest.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design.designroot;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class DesignRootTest {
+ @Test
+ public void designAnnotationWithoutFilename() {
+ DesignWithEmptyAnnotation d = new DesignWithEmptyAnnotation();
+ Assert.assertNotNull(d.ok);
+ Assert.assertNotNull(d.CaNCEL);
+ Assert.assertEquals("original", d.preInitializedField.getValue());
+ }
+
+ @Test
+ public void designAnnotationWithFilename() {
+ DesignWithAnnotation d = new DesignWithAnnotation();
+ Assert.assertNotNull(d.ok);
+ Assert.assertNotNull(d.cancel);
+ Assert.assertEquals("original", d.preInitializedField.getValue());
+ }
+
+ @Test
+ public void extendedDesignAnnotationWithoutFilename() {
+ DesignWithEmptyAnnotation d = new ExtendedDesignWithEmptyAnnotation();
+ Assert.assertNotNull(d.ok);
+ Assert.assertNotNull(d.CaNCEL);
+ Assert.assertEquals("original", d.preInitializedField.getValue());
+ }
+
+ @Test
+ public void extendedDesignAnnotationWithFilename() {
+ DesignWithAnnotation d = new ExtendedDesignWithAnnotation();
+ Assert.assertNotNull(d.ok);
+ Assert.assertNotNull(d.cancel);
+ Assert.assertEquals("original", d.preInitializedField.getValue());
+ }
+
+}
diff --git a/server/tests/src/com/vaadin/tests/design/designroot/DesignWithAnnotation.java b/server/tests/src/com/vaadin/tests/design/designroot/DesignWithAnnotation.java
new file mode 100644
index 0000000000..70809cb694
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/designroot/DesignWithAnnotation.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design.designroot;
+
+import org.junit.Ignore;
+
+import com.vaadin.annotations.DesignRoot;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.declarative.Design;
+
+@DesignRoot("DesignWithEmptyAnnotation.html")
+@Ignore
+public class DesignWithAnnotation extends VerticalLayout {
+
+ public Button ok;
+ public Button cancel;
+ public Label preInitializedField = new Label("original");
+
+ public DesignWithAnnotation() {
+ Design.read(this);
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/designroot/DesignWithEmptyAnnotation.html b/server/tests/src/com/vaadin/tests/design/designroot/DesignWithEmptyAnnotation.html
new file mode 100644
index 0000000000..66e9202ca7
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/designroot/DesignWithEmptyAnnotation.html
@@ -0,0 +1,5 @@
+<v-vertical-layout>
+ <v-button>OK</v-button>
+ <v-button>Cancel</v-button>
+ <v-label caption="preInitializedField">a Label that should not override pre initalized field<v-label/>
+</v-vertical-layout> \ No newline at end of file
diff --git a/server/tests/src/com/vaadin/tests/design/designroot/DesignWithEmptyAnnotation.java b/server/tests/src/com/vaadin/tests/design/designroot/DesignWithEmptyAnnotation.java
new file mode 100644
index 0000000000..f6fb928e75
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/designroot/DesignWithEmptyAnnotation.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design.designroot;
+
+import org.junit.Ignore;
+
+import com.vaadin.annotations.DesignRoot;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.declarative.Design;
+
+@DesignRoot
+@Ignore
+public class DesignWithEmptyAnnotation extends VerticalLayout {
+
+ protected Button ok;
+ protected Button CaNCEL;
+ protected Label preInitializedField = new Label("original");
+
+ public DesignWithEmptyAnnotation() {
+ Design.read(this);
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithAnnotation.java b/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithAnnotation.java
new file mode 100644
index 0000000000..14e4269e80
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithAnnotation.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design.designroot;
+
+import org.junit.Ignore;
+
+import com.vaadin.ui.TextField;
+
+@Ignore
+public class ExtendedDesignWithAnnotation extends DesignWithAnnotation {
+ private TextField customField = new TextField();
+
+ public ExtendedDesignWithAnnotation() {
+ customField.setInputPrompt("Something");
+ addComponent(customField);
+
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotation.java b/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotation.java
new file mode 100644
index 0000000000..22865b098c
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotation.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design.designroot;
+
+import org.junit.Ignore;
+
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.Button.ClickListener;
+import com.vaadin.ui.Notification;
+import com.vaadin.ui.TextField;
+
+@Ignore
+public class ExtendedDesignWithEmptyAnnotation extends
+ DesignWithEmptyAnnotation {
+
+ private TextField customField = new TextField();
+
+ public ExtendedDesignWithEmptyAnnotation() {
+ super();
+ customField.setInputPrompt("Something");
+ addComponent(customField);
+
+ ok.addClickListener(new ClickListener() {
+ @Override
+ public void buttonClick(ClickEvent event) {
+ Notification.show("OK");
+ }
+ });
+
+ CaNCEL.addClickListener(new ClickListener() {
+ @Override
+ public void buttonClick(ClickEvent event) {
+ Notification.show("cancel");
+ }
+ });
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotationUI.java b/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotationUI.java
new file mode 100644
index 0000000000..34f517d25d
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotationUI.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design.designroot;
+
+import org.junit.Ignore;
+
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.ui.UI;
+
+@Ignore
+public class ExtendedDesignWithEmptyAnnotationUI extends UI {
+
+ @Override
+ protected void init(VaadinRequest request) {
+ setContent(new ExtendedDesignWithEmptyAnnotation());
+
+ }
+
+}
diff --git a/server/tests/src/com/vaadin/tests/design/duplicate-ids.html b/server/tests/src/com/vaadin/tests/design/duplicate-ids.html
new file mode 100644
index 0000000000..ef845d46d5
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/duplicate-ids.html
@@ -0,0 +1,4 @@
+<v-vertical-layout>
+ <v-label id="foo"/>
+ <v-label id="foo"/>
+</v-vertical-layout> \ No newline at end of file
diff --git a/server/tests/src/com/vaadin/tests/design/duplicate-local-ids.html b/server/tests/src/com/vaadin/tests/design/duplicate-local-ids.html
new file mode 100644
index 0000000000..5a506ad00c
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/duplicate-local-ids.html
@@ -0,0 +1,4 @@
+<v-vertical-layout>
+ <v-label _id="foo"/>
+ <v-label _id="foo"/>
+</v-vertical-layout> \ No newline at end of file
diff --git a/server/tests/src/com/vaadin/tests/design/nested/MyChildDesign.java b/server/tests/src/com/vaadin/tests/design/nested/MyChildDesign.java
new file mode 100644
index 0000000000..e85c0aca5f
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/nested/MyChildDesign.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design.nested;
+
+import org.junit.Ignore;
+
+import com.vaadin.annotations.DesignRoot;
+import com.vaadin.ui.HorizontalLayout;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.declarative.Design;
+
+/**
+ * Child design component
+ *
+ * @author Vaadin Ltd
+ */
+@Ignore
+@DesignRoot("mychilddesign.html")
+public class MyChildDesign extends HorizontalLayout {
+ public Label childLabel;
+ public MyChildDesignCustomComponent childCustomComponent;
+
+ public MyChildDesign() {
+ Design.read(this);
+ childLabel.setDescription("added in constructor");
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/nested/MyChildDesignCustomComponent.java b/server/tests/src/com/vaadin/tests/design/nested/MyChildDesignCustomComponent.java
new file mode 100644
index 0000000000..94e34baea2
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/nested/MyChildDesignCustomComponent.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design.nested;
+
+import org.junit.Ignore;
+
+import com.vaadin.ui.Button;
+
+@Ignore
+public class MyChildDesignCustomComponent extends Button {
+
+}
diff --git a/server/tests/src/com/vaadin/tests/design/nested/MyDesignRoot.java b/server/tests/src/com/vaadin/tests/design/nested/MyDesignRoot.java
new file mode 100644
index 0000000000..5727322ce3
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/nested/MyDesignRoot.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design.nested;
+
+import org.junit.Ignore;
+
+import com.vaadin.annotations.DesignRoot;
+import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.declarative.Design;
+
+/**
+ * Root design component
+ *
+ * @author Vaadin Ltd
+ */
+@Ignore
+@DesignRoot("mydesignroot.html")
+public class MyDesignRoot extends VerticalLayout {
+ // should be assigned automatically
+ public MyExtendedChildDesign childDesign;
+
+ public MyDesignRoot() {
+ Design.read(this);
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/nested/MyExtendedChildDesign.java b/server/tests/src/com/vaadin/tests/design/nested/MyExtendedChildDesign.java
new file mode 100644
index 0000000000..2012e4ec14
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/nested/MyExtendedChildDesign.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design.nested;
+
+import org.junit.Ignore;
+
+@Ignore
+public class MyExtendedChildDesign extends MyChildDesign {
+ public MyExtendedChildDesign() {
+ super();
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/nested/TestNestedCustomLayouts.java b/server/tests/src/com/vaadin/tests/design/nested/TestNestedCustomLayouts.java
new file mode 100644
index 0000000000..c71ccca85b
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/nested/TestNestedCustomLayouts.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design.nested;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import junit.framework.TestCase;
+
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Document;
+import org.jsoup.nodes.Element;
+import org.junit.Test;
+
+import com.vaadin.tests.design.nested.customlayouts.CustomAbsoluteLayout;
+import com.vaadin.tests.design.nested.customlayouts.CustomAccordion;
+import com.vaadin.tests.design.nested.customlayouts.CustomCssLayout;
+import com.vaadin.tests.design.nested.customlayouts.CustomFormLayout;
+import com.vaadin.tests.design.nested.customlayouts.CustomGridLayout;
+import com.vaadin.tests.design.nested.customlayouts.CustomHorizontalLayout;
+import com.vaadin.tests.design.nested.customlayouts.CustomHorizontalSplitPanel;
+import com.vaadin.tests.design.nested.customlayouts.CustomPanel;
+import com.vaadin.tests.design.nested.customlayouts.CustomTabSheet;
+import com.vaadin.tests.design.nested.customlayouts.CustomVerticalLayout;
+import com.vaadin.tests.design.nested.customlayouts.CustomVerticalSplitPanel;
+import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.declarative.Design;
+
+/**
+ * Test case for nested custom layouts. The children of the custom layouts must
+ * not be rendered.
+ *
+ * @author Vaadin Ltd
+ */
+public class TestNestedCustomLayouts extends TestCase {
+
+ private static String PACKAGE_MAPPING = "com_vaadin_tests_design_nested_customlayouts:com.vaadin.tests.design.nested.customlayouts";
+
+ @Test
+ public void testNestedLayouts() throws IOException {
+ VerticalLayout rootLayout = new VerticalLayout();
+ rootLayout.addComponent(new CustomAbsoluteLayout());
+ rootLayout.addComponent(new CustomAccordion());
+ rootLayout.addComponent(new CustomCssLayout());
+ rootLayout.addComponent(new CustomFormLayout());
+ rootLayout.addComponent(new CustomGridLayout());
+ rootLayout.addComponent(new CustomHorizontalLayout());
+ rootLayout.addComponent(new CustomHorizontalSplitPanel());
+ rootLayout.addComponent(new CustomPanel());
+ rootLayout.addComponent(new CustomTabSheet());
+ rootLayout.addComponent(new CustomVerticalLayout());
+ rootLayout.addComponent(new CustomVerticalSplitPanel());
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ Design.write(rootLayout, out);
+ Document doc = Jsoup.parse(out.toString("UTF-8"));
+ assertEquals("package-mapping", doc.head().child(0).attr("name"));
+ assertEquals(PACKAGE_MAPPING, doc.head().child(0).attr("content"));
+ Element rootNode = doc.body().child(0);
+ assertTrue("Root node must have children",
+ rootNode.children().size() > 0);
+ for (Element child : rootNode.children()) {
+ // make sure that the nested custom layouts do not render children
+ assertEquals("Child nodes must not have children", 0, child
+ .children().size());
+ }
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/nested/TestReadNestedTemplates.java b/server/tests/src/com/vaadin/tests/design/nested/TestReadNestedTemplates.java
new file mode 100644
index 0000000000..c1483adc8a
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/nested/TestReadNestedTemplates.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design.nested;
+
+import junit.framework.TestCase;
+
+/**
+ * Test case for reading nested templates
+ *
+ * @since
+ * @author Vaadin Ltd
+ */
+public class TestReadNestedTemplates extends TestCase {
+
+ private MyDesignRoot root;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ root = new MyDesignRoot();
+ }
+
+ public void testChildren() {
+ assertEquals("The root layout must contain one child", 1,
+ root.getComponentCount());
+ assertTrue(root.iterator().next() instanceof MyExtendedChildDesign);
+ }
+
+ public void testGrandChildren() {
+ assertEquals("The root layout must have two grandchildren", 2,
+ root.childDesign.getComponentCount());
+ }
+
+ public void testRootComponentFields() {
+ assertNotNull("The child component must not be null", root.childDesign);
+ }
+
+ public void testChildComponentFields() {
+ assertNotNull("Grandchildren must not be null",
+ root.childDesign.childLabel);
+ assertNotNull("Grandchildren must not be null",
+ root.childDesign.childCustomComponent);
+ assertEquals("child label caption must be read", "test content",
+ root.childDesign.childLabel.getValue());
+ assertEquals("child custom component caption must be read",
+ "custom content",
+ root.childDesign.childCustomComponent.getCaption());
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/nested/TestWriteNestedTemplates.java b/server/tests/src/com/vaadin/tests/design/nested/TestWriteNestedTemplates.java
new file mode 100644
index 0000000000..7fe63baa73
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/nested/TestWriteNestedTemplates.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design.nested;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+import org.jsoup.parser.Tag;
+
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ *
+ * Test case for writing nested templates
+ *
+ * @author Vaadin Ltd
+ */
+public class TestWriteNestedTemplates extends TestCase {
+
+ private MyDesignRoot root;
+ private Element design;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ root = new MyDesignRoot();
+ design = createDesign();
+ DesignContext designContext = new DesignContext();
+ designContext.setRootComponent(root);
+ root.writeDesign(design, designContext);
+ }
+
+ public void testChildRendered() {
+ assertEquals("Root layout must have one child", 1, design.children()
+ .size());
+ assertEquals("com_vaadin_tests_design_nested-my-extended-child-design",
+ design.child(0).tagName());
+ }
+
+ public void testRootCaptionWritten() {
+ assertTrue("Root layout caption must be written",
+ design.hasAttr("caption"));
+ assertEquals("Root layout caption must be written", "root caption",
+ design.attr("caption"));
+ }
+
+ public void testChildCaptionWritten() {
+ assertTrue("Child design caption must be written", design.child(0)
+ .hasAttr("caption"));
+ assertEquals("Child design caption must be written", "child caption",
+ design.child(0).attr("caption"));
+ }
+
+ // The default caption is read from child template
+ public void testDefaultCaptionShouldNotBeWritten() {
+ design = createDesign();
+ root.childDesign.setCaption("Default caption for child design");
+ DesignContext designContext = new DesignContext();
+ designContext.setRootComponent(root);
+ root.writeDesign(design, designContext);
+ assertFalse("Default caption must not be written", design.child(0)
+ .hasAttr("caption"));
+ }
+
+ public void testChildDesignChildrenNotWrittenInRootTemplate() {
+ assertEquals(
+ "Children of the child template must not be written to root template",
+ 0, design.child(0).children().size());
+ }
+
+ private Element createDesign() {
+ return new Element(Tag.valueOf("v-vertical-layout"), "",
+ new Attributes());
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomAbsoluteLayout.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomAbsoluteLayout.java
new file mode 100644
index 0000000000..ed2b27215e
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomAbsoluteLayout.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design.nested.customlayouts;
+
+import org.junit.Ignore;
+
+import com.vaadin.ui.AbsoluteLayout;
+import com.vaadin.ui.Label;
+
+/**
+ * @author Vaadin Ltd
+ */
+@Ignore
+public class CustomAbsoluteLayout extends AbsoluteLayout {
+ public CustomAbsoluteLayout() {
+ this.addComponent(new Label());
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomAccordion.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomAccordion.java
new file mode 100644
index 0000000000..7d45917520
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomAccordion.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design.nested.customlayouts;
+
+import org.junit.Ignore;
+
+import com.vaadin.ui.Accordion;
+import com.vaadin.ui.Label;
+
+/**
+ * @author Vaadin Ltd
+ */
+@Ignore
+public class CustomAccordion extends Accordion {
+ public CustomAccordion() {
+ addComponent(new Label());
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomCssLayout.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomCssLayout.java
new file mode 100644
index 0000000000..328a025e01
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomCssLayout.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design.nested.customlayouts;
+
+import org.junit.Ignore;
+
+import com.vaadin.ui.CssLayout;
+import com.vaadin.ui.Label;
+
+/**
+ * @author Vaadin Ltd
+ */
+@Ignore
+public class CustomCssLayout extends CssLayout {
+ public CustomCssLayout() {
+ this.addComponent(new Label());
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomFormLayout.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomFormLayout.java
new file mode 100644
index 0000000000..179b195926
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomFormLayout.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design.nested.customlayouts;
+
+import org.junit.Ignore;
+
+import com.vaadin.ui.FormLayout;
+import com.vaadin.ui.Label;
+
+/**
+ * @author Vaadin Ltd
+ */
+@Ignore
+public class CustomFormLayout extends FormLayout {
+ public CustomFormLayout() {
+ this.addComponent(new Label());
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomGridLayout.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomGridLayout.java
new file mode 100644
index 0000000000..0b3b90ca1f
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomGridLayout.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design.nested.customlayouts;
+
+import org.junit.Ignore;
+
+import com.vaadin.ui.GridLayout;
+import com.vaadin.ui.Label;
+
+/**
+ * @author Vaadin Ltd
+ */
+@Ignore
+public class CustomGridLayout extends GridLayout {
+ public CustomGridLayout() {
+ this.addComponent(new Label());
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalLayout.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalLayout.java
new file mode 100644
index 0000000000..b742f7c629
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalLayout.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design.nested.customlayouts;
+
+import org.junit.Ignore;
+
+import com.vaadin.ui.HorizontalLayout;
+import com.vaadin.ui.Label;
+
+/**
+ * @author Vaadin Ltd
+ */
+@Ignore
+public class CustomHorizontalLayout extends HorizontalLayout {
+ public CustomHorizontalLayout() {
+ this.addComponent(new Label());
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalSplitPanel.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalSplitPanel.java
new file mode 100644
index 0000000000..deeb311858
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalSplitPanel.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design.nested.customlayouts;
+
+import org.junit.Ignore;
+
+import com.vaadin.ui.HorizontalSplitPanel;
+import com.vaadin.ui.Label;
+
+/**
+ * @author Vaadin Ltd
+ */
+@Ignore
+public class CustomHorizontalSplitPanel extends HorizontalSplitPanel {
+ public CustomHorizontalSplitPanel() {
+ addComponent(new Label());
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomPanel.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomPanel.java
new file mode 100644
index 0000000000..fa7827bdfd
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomPanel.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design.nested.customlayouts;
+
+import org.junit.Ignore;
+
+import com.vaadin.ui.Label;
+import com.vaadin.ui.Panel;
+
+/**
+ * @author Vaadin Ltd
+ */
+@Ignore
+public class CustomPanel extends Panel {
+ public CustomPanel() {
+ setContent(new Label());
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomTabSheet.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomTabSheet.java
new file mode 100644
index 0000000000..6298b67727
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomTabSheet.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design.nested.customlayouts;
+
+import org.junit.Ignore;
+
+import com.vaadin.ui.Label;
+import com.vaadin.ui.TabSheet;
+
+/**
+ * @author Vaadin Ltd
+ */
+@Ignore
+public class CustomTabSheet extends TabSheet {
+ public CustomTabSheet() {
+ addComponent(new Label());
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomVerticalLayout.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomVerticalLayout.java
new file mode 100644
index 0000000000..7859ae0227
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomVerticalLayout.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design.nested.customlayouts;
+
+import org.junit.Ignore;
+
+import com.vaadin.ui.Label;
+import com.vaadin.ui.VerticalLayout;
+
+/**
+ * @author Vaadin Ltd
+ */
+@Ignore
+public class CustomVerticalLayout extends VerticalLayout {
+ public CustomVerticalLayout() {
+ this.addComponent(new Label());
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomVerticalSplitPanel.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomVerticalSplitPanel.java
new file mode 100644
index 0000000000..f6eb460c1b
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomVerticalSplitPanel.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.design.nested.customlayouts;
+
+import org.junit.Ignore;
+
+import com.vaadin.ui.Label;
+import com.vaadin.ui.VerticalSplitPanel;
+
+/**
+ * @author Vaadin Ltd
+ */
+@Ignore
+public class CustomVerticalSplitPanel extends VerticalSplitPanel {
+ public CustomVerticalSplitPanel() {
+ addComponent(new Label());
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/nested/mychilddesign.html b/server/tests/src/com/vaadin/tests/design/nested/mychilddesign.html
new file mode 100644
index 0000000000..c636033d2d
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/nested/mychilddesign.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta name="package-mapping" content="x:com.vaadin.tests.design.nested"/>
+ </head>
+ <body>
+ <v-horizontal-layout caption="Default caption for child design">
+ <v-label _id="childLabel">test content</v-label>
+ <!-- Test some custom component in child template -->
+ <x-my-child-design-custom-component _id="childCustomComponent">custom content</x-my-child-design-custom-component>
+ </v-horizontal-layout>
+</body> \ No newline at end of file
diff --git a/server/tests/src/com/vaadin/tests/design/nested/mydesignroot.html b/server/tests/src/com/vaadin/tests/design/nested/mydesignroot.html
new file mode 100644
index 0000000000..55ac27c194
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/nested/mydesignroot.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta name="package-mapping" content="x:com.vaadin.tests.design.nested"/>
+ </head>
+ <body>
+ <v-vertical-layout caption="root caption">
+ <x-my-extended-child-design _id="childDesign" caption="child caption"/>
+ </v-vertical-layout>
+ </body> \ No newline at end of file
diff --git a/server/tests/src/com/vaadin/tests/design/testFile.html b/server/tests/src/com/vaadin/tests/design/testFile.html
new file mode 100644
index 0000000000..79ae1e9eaf
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/testFile.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta name="package-mapping" content="my:com.addon.mypackage"/>
+ </head>
+ <body>
+ <v-vertical-layout width="500px">
+ <v-horizontal-layout>
+ <v-label plain-text caption="FooBar"></v-label>
+ <v-native-button _id=firstButton>Native click me</v-native-button>
+ <v-native-button id = secondButton _id="localID">Another button</v-native-button>
+ <v-native-button>Yet another button</v-native-button>
+ <v-button plain-text width = "150px">Click me</v-button>
+ </v-horizontal-layout>
+ <v-text-field caption = "Text input"/>
+ <v-text-area caption = "Text area" height="200px" width="300px"/>
+ </v-vertical-layout>
+ </body>
+</html> \ No newline at end of file
diff --git a/server/tests/src/com/vaadin/tests/design/verticallayout-one-child.html b/server/tests/src/com/vaadin/tests/design/verticallayout-one-child.html
new file mode 100644
index 0000000000..4b0123b9ed
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/verticallayout-one-child.html
@@ -0,0 +1,3 @@
+<v-vertical-layout>
+ <v-button>OK</v-button>
+</v-vertical-layout>
diff --git a/server/tests/src/com/vaadin/tests/design/verticallayout-two-children.html b/server/tests/src/com/vaadin/tests/design/verticallayout-two-children.html
new file mode 100644
index 0000000000..87ae9eee8e
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/verticallayout-two-children.html
@@ -0,0 +1,4 @@
+<v-vertical-layout>
+ <v-text-field caption="Enter your name" />
+ <v-button>Say hello</v-button>
+</v-vertical-layout>
diff --git a/server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestReadDesign.java
new file mode 100644
index 0000000000..f8af0a992e
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestReadDesign.java
@@ -0,0 +1,110 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.server.component.absolutelayout;
+
+import java.util.Iterator;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+import org.jsoup.parser.Tag;
+
+import com.vaadin.server.Sizeable;
+import com.vaadin.ui.AbsoluteLayout;
+import com.vaadin.ui.AbsoluteLayout.ComponentPosition;
+import com.vaadin.ui.Component;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ * Test case for reading AbsoluteLayout from design
+ *
+ * @since
+ * @author Vaadin Ltd
+ */
+public class TestReadDesign extends TestCase {
+
+ private AbsoluteLayout root;
+
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ root = createLayout();
+ }
+
+ public void testAttributes() {
+ assertEquals("test-layout", root.getCaption());
+ Iterator<Component> children = root.iterator();
+ assertEquals("test-label", children.next().getCaption());
+ assertEquals("test-button", children.next().getCaption());
+ }
+
+ public void testTopLeftPosition() {
+ ComponentPosition position = root.getPosition(root.iterator().next());
+ assertEquals(Sizeable.Unit.PIXELS, position.getTopUnits());
+ assertEquals(100.0f, position.getTopValue());
+ assertEquals(Sizeable.Unit.PERCENTAGE, position.getLeftUnits());
+ assertEquals(50.0f, position.getLeftValue());
+ }
+
+ public void testBottomRightPosition() {
+ Iterator<Component> children = root.iterator();
+ children.next();
+ ComponentPosition position = root.getPosition(children.next());
+ assertEquals(Sizeable.Unit.PIXELS, position.getBottomUnits());
+ assertEquals(100.0f, position.getBottomValue());
+ assertEquals(Sizeable.Unit.PERCENTAGE, position.getRightUnits());
+ assertEquals(50.0f, position.getRightValue());
+ }
+
+ public void testZIndex() {
+ ComponentPosition position = root.getPosition(root.iterator().next());
+ assertEquals(2, position.getZIndex());
+ }
+
+ private AbsoluteLayout createLayout() {
+ DesignContext ctx = new DesignContext();
+ Element design = createDesign();
+ Component child = ctx.readDesign(design);
+ return (AbsoluteLayout) child;
+ }
+
+ private Element createDesign() {
+
+ Attributes rootAttributes = new Attributes();
+ rootAttributes.put("caption", "test-layout");
+ Element node = new Element(Tag.valueOf("v-absolute-layout"), "",
+ rootAttributes);
+
+ Attributes firstChildAttributes = new Attributes();
+ firstChildAttributes.put("caption", "test-label");
+ firstChildAttributes.put(":top", "100px");
+ firstChildAttributes.put(":left", "50%");
+ firstChildAttributes.put(":z-index", "2");
+ Element firstChild = new Element(Tag.valueOf("v-label"), "",
+ firstChildAttributes);
+ node.appendChild(firstChild);
+
+ Attributes secondChildAttributes = new Attributes();
+ secondChildAttributes.put(":bottom", "100px");
+ secondChildAttributes.put(":right", "50%");
+ Element secondChild = new Element(Tag.valueOf("v-button"), "",
+ secondChildAttributes);
+ secondChild.html("test-button");
+ node.appendChild(secondChild);
+ return node;
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestWriteDesign.java b/server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestWriteDesign.java
new file mode 100644
index 0000000000..5f42b1fa81
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestWriteDesign.java
@@ -0,0 +1,100 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.server.component.absolutelayout;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+import org.jsoup.parser.Tag;
+
+import com.vaadin.ui.AbsoluteLayout;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ * Test case for writing AbsoluteLayout to design
+ *
+ * @since
+ * @author Vaadin Ltd
+ */
+public class TestWriteDesign extends TestCase {
+
+ public void testSynchronizeEmptyLayout() {
+ AbsoluteLayout layout = createTestLayout();
+ layout.removeAllComponents();
+ Element design = createDesign();
+ layout.writeDesign(design, createDesignContext());
+ assertEquals(0, design.childNodes().size());
+ assertEquals("changed-caption", design.attr("caption"));
+ }
+
+ public void testSynchronizeLayoutWithChildren() {
+ AbsoluteLayout layout = createTestLayout();
+ Element design = createDesign();
+ layout.writeDesign(design, createDesignContext());
+ assertEquals(2, design.childNodes().size());
+ assertEquals("v-label", ((Element) design.childNode(0)).tagName());
+ assertEquals("v-label", ((Element) design.childNode(1)).tagName());
+ }
+
+ public void testSynchronizePosition() {
+ AbsoluteLayout layout = createTestLayout();
+ Element design = createDesign();
+ layout.writeDesign(design, createDesignContext());
+ Attributes attributes = design.childNode(0).attributes();
+ assertEquals("50px", attributes.get(":top"));
+ assertEquals("50%", attributes.get(":left"));
+ assertEquals("2", attributes.get(":z-index"));
+ attributes = design.childNode(1).attributes();
+ assertEquals("50px", attributes.get(":bottom"));
+ assertEquals("50%", attributes.get(":right"));
+ }
+
+ private AbsoluteLayout createTestLayout() {
+ AbsoluteLayout layout = new AbsoluteLayout();
+ layout.setCaption("changed-caption");
+ layout.addComponent(new Label("test-label"),
+ "top:50px;left:50%;z-index:2");
+ layout.addComponent(new Label("test-label-2"),
+ "bottom:50px;right:50%;z-index:3");
+ return layout;
+ }
+
+ private Element createDesign() {
+ // make sure that the design node has old content that should be removed
+ Attributes rootAttributes = new Attributes();
+ rootAttributes.put("caption", "test-layout");
+ Element node = new Element(Tag.valueOf("v-absolute-layout"), "",
+ rootAttributes);
+ Attributes firstChildAttributes = new Attributes();
+ firstChildAttributes.put("caption", "test-label");
+ Element firstChild = new Element(Tag.valueOf("v-label"), "",
+ firstChildAttributes);
+ node.appendChild(firstChild);
+
+ Attributes secondChildAttributes = new Attributes();
+ secondChildAttributes.put("caption", "test-button");
+ Element secondChild = new Element(Tag.valueOf("v-button"), "",
+ secondChildAttributes);
+ node.appendChild(secondChild);
+ return node;
+ }
+
+ private DesignContext createDesignContext() {
+ return new DesignContext();
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestReadDesign.java
new file mode 100644
index 0000000000..43a050ba80
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestReadDesign.java
@@ -0,0 +1,256 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.server.component.abstractcomponent;
+
+import java.lang.reflect.Field;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+import org.jsoup.parser.Tag;
+
+import com.vaadin.server.ExternalResource;
+import com.vaadin.server.FileResource;
+import com.vaadin.server.Responsive;
+import com.vaadin.server.ThemeResource;
+import com.vaadin.ui.AbstractComponent;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ * Test case for reading the attributes of the AbstractComponent from design
+ *
+ * @author Vaadin Ltd
+ */
+public class TestReadDesign extends TestCase {
+
+ private DesignContext ctx;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ ctx = new DesignContext();
+ }
+
+ public void testSynchronizeId() {
+ Element design = createDesign("id", "testId");
+ AbstractComponent component = getComponent();
+ component.readDesign(design, ctx);
+ assertEquals("testId", component.getId());
+ }
+
+ public void testSynchronizePrimaryStyleName() {
+ Element design = createDesign("primary-style-name", "test-style");
+ AbstractComponent component = getComponent();
+ component.readDesign(design, ctx);
+ assertEquals("test-style", component.getPrimaryStyleName());
+ }
+
+ public void testSynchronizeCaption() {
+ Element design = createDesign("caption", "test-caption");
+ AbstractComponent component = getComponent();
+ component.readDesign(design, ctx);
+ assertEquals("test-caption", component.getCaption());
+ }
+
+ public void testSynchronizeLocale() {
+ Element design = createDesign("locale", "fi_FI");
+ AbstractComponent component = getComponent();
+ component.readDesign(design, ctx);
+ assertEquals("fi", component.getLocale().getLanguage());
+ assertEquals("FI", component.getLocale().getCountry());
+ }
+
+ public void testSynchronizeExternalIcon() {
+ Element design = createDesign("icon", "http://example.com/example.gif");
+ AbstractComponent component = getComponent();
+ component.readDesign(design, ctx);
+ assertTrue("Incorrect resource type returned", component.getIcon()
+ .getClass().isAssignableFrom(ExternalResource.class));
+ assertEquals("http://example.com/example.gif",
+ ((ExternalResource) component.getIcon()).getURL());
+ }
+
+ public void testSynchronizeThemeIcon() {
+ Element design = createDesign("icon", "theme://example.gif");
+ AbstractComponent component = getComponent();
+ component.readDesign(design, ctx);
+ assertTrue("Incorrect resource type returned", component.getIcon()
+ .getClass().isAssignableFrom(ThemeResource.class));
+ }
+
+ public void testSynchronizeFileResource() {
+ Element design = createDesign("icon", "img/example.gif");
+ AbstractComponent component = getComponent();
+ component.readDesign(design, ctx);
+ assertTrue("Incorrect resource type returned", component.getIcon()
+ .getClass().isAssignableFrom(FileResource.class));
+ }
+
+ public void testSynchronizeImmediate() {
+ Element design = createDesign("immediate", "true");
+ AbstractComponent component = getComponent();
+ component.readDesign(design, ctx);
+ assertEquals(true, component.isImmediate());
+ assertEquals(Boolean.TRUE, getExplicitImmediate(component));
+ // Synchronize with a design having no immediate attribute -
+ // explicitImmediate should then be null.
+ design = createDesign("description", "test-description");
+ component = getComponent();
+ component.readDesign(design, ctx);
+ // Synchronize with a design having immediate = false
+ design = createDesign("immediate", "false");
+ component.readDesign(design, ctx);
+ assertEquals(false, component.isImmediate());
+ assertEquals(Boolean.FALSE, getExplicitImmediate(component));
+ // Synchronize with a design having immediate = "" - should correspond
+ // to
+ // true.
+ design = createDesign("immediate", "");
+ component.readDesign(design, ctx);
+ assertEquals(true, component.isImmediate());
+ assertEquals(Boolean.TRUE, getExplicitImmediate(component));
+ }
+
+ public void testSynchronizeDescription() {
+ Element design = createDesign("description", "test-description");
+ AbstractComponent component = getComponent();
+ component.readDesign(design, ctx);
+ assertEquals("test-description", component.getDescription());
+ }
+
+ public void testSynchronizeComponentError() {
+ Element design = createDesign("error", "<div>test-error</div>");
+ AbstractComponent component = getComponent();
+ component.readDesign(design, ctx);
+ assertEquals("<div>test-error</div>", component.getComponentError()
+ .getFormattedHtmlMessage());
+ }
+
+ public void testSynchronizeSizeFull() {
+ Element design = createDesign("size-full", "");
+ AbstractComponent component = getComponent();
+ component.readDesign(design, ctx);
+ assertEquals(100, component.getWidth(), 0.1f);
+ assertEquals(100, component.getHeight(), 0.1f);
+ }
+
+ public void testSynchronizeSizeAuto() {
+ Element design = createDesign("size-auto", "");
+ AbstractComponent component = getComponent();
+ component.readDesign(design, ctx);
+ assertEquals(-1, component.getWidth(), 0.1f);
+ assertEquals(-1, component.getHeight(), 0.1f);
+ }
+
+ public void testSynchronizeHeightFull() {
+ Element design = createDesign("height-full", "");
+ AbstractComponent component = getComponent();
+ component.readDesign(design, ctx);
+ assertEquals(100, component.getHeight(), 0.1f);
+ }
+
+ public void testSynchronizeHeightAuto() {
+ Element design = createDesign("height-auto", "");
+ AbstractComponent component = getComponent();
+ component.readDesign(design, ctx);
+ assertEquals(-1, component.getHeight(), 0.1f);
+ }
+
+ public void testSynchronizeWidthFull() {
+ Element design = createDesign("width-full", "");
+ AbstractComponent component = getComponent();
+ component.readDesign(design, ctx);
+ assertEquals(100, component.getWidth(), 0.1f);
+ }
+
+ public void testSynchronizeWidthAuto() {
+ Element design = createDesign("width-auto", "");
+ AbstractComponent component = getComponent();
+ component.readDesign(design, ctx);
+ assertEquals(-1, component.getWidth(), 0.1f);
+ }
+
+ public void testSynchronizeWidth() {
+ Element design = createDesign("width", "12px");
+ AbstractComponent component = getComponent();
+ component.readDesign(design, ctx);
+ assertEquals(12, component.getWidth(), 0.1f);
+ assertEquals(com.vaadin.server.Sizeable.Unit.PIXELS,
+ component.getWidthUnits());
+ }
+
+ public void testSynchronizeHeight() {
+ Element design = createDesign("height", "12px");
+ AbstractComponent component = getComponent();
+ component.readDesign(design, ctx);
+ assertEquals(12, component.getHeight(), 0.1f);
+ assertEquals(com.vaadin.server.Sizeable.Unit.PIXELS,
+ component.getHeightUnits());
+ }
+
+ public void testSynchronizeNotResponsive() {
+ AbstractComponent component = getComponent();
+ Responsive.makeResponsive(component);
+ Element design = createDesign("responsive", "false");
+ component.readDesign(design, ctx);
+ assertEquals("Component should not have extensions", 0, component
+ .getExtensions().size());
+ }
+
+ public void testSynchronizeResponsive() {
+ AbstractComponent component = getComponent();
+ Element design = createDesign("responsive", "");
+ component.readDesign(design, ctx);
+ assertEquals("Component should have one extension", 1, component
+ .getExtensions().size());
+ assertTrue("Extension should be responsive", component.getExtensions()
+ .iterator().next() instanceof Responsive);
+ }
+
+ public void testSynchronizeAlreadyResponsive() {
+ AbstractComponent component = getComponent();
+ Responsive.makeResponsive(component);
+ Element design = createDesign("responsive", "");
+ component.readDesign(design, ctx);
+ assertEquals("Component should have only one extension", 1, component
+ .getExtensions().size());
+ }
+
+ private AbstractComponent getComponent() {
+ return new Label();
+ }
+
+ private Element createDesign(String key, String value) {
+ Attributes attributes = new Attributes();
+ attributes.put(key, value);
+ Element node = new Element(Tag.valueOf("v-label"), "", attributes);
+ return node;
+ }
+
+ private Boolean getExplicitImmediate(AbstractComponent component) {
+ try {
+ Field immediate = AbstractComponent.class
+ .getDeclaredField("explicitImmediateValue");
+ immediate.setAccessible(true);
+ return (Boolean) immediate.get(component);
+ } catch (Exception e) {
+ throw new RuntimeException(
+ "Getting the field explicitImmediateValue failed.");
+ }
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestWriteDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestWriteDesign.java
new file mode 100644
index 0000000000..7f207a25ae
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestWriteDesign.java
@@ -0,0 +1,281 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.server.component.abstractcomponent;
+
+import java.io.File;
+import java.util.Locale;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+import org.jsoup.parser.Tag;
+
+import com.vaadin.server.AbstractErrorMessage.ContentMode;
+import com.vaadin.server.ErrorMessage.ErrorLevel;
+import com.vaadin.server.ExternalResource;
+import com.vaadin.server.FileResource;
+import com.vaadin.server.Responsive;
+import com.vaadin.server.ThemeResource;
+import com.vaadin.server.UserError;
+import com.vaadin.ui.AbstractComponent;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.HorizontalSplitPanel;
+import com.vaadin.ui.TabSheet;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ * Test case for writing the attributes of the AbstractComponent to design
+ *
+ * @author Vaadin Ltd
+ */
+public class TestWriteDesign extends TestCase {
+
+ private DesignContext ctx;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ ctx = new DesignContext();
+ }
+
+ public void testSynchronizeId() {
+ Element design = createDesign();
+ AbstractComponent component = getComponent();
+ component.setId("testId");
+ component.writeDesign(design, ctx);
+ // we only changed one of the attributes, others are at default values
+ assertEquals(1, design.attributes().size());
+ assertEquals("testId", design.attr("id"));
+ }
+
+ public void testSynchronizePrimaryStyleName() {
+ Element design = createDesign();
+ AbstractComponent component = getComponent();
+ component.setPrimaryStyleName("test-style");
+ component.writeDesign(design, ctx);
+ // we only changed one of the attributes, others are at default values
+ assertEquals(1, design.attributes().size());
+ assertEquals("test-style", design.attr("primary-style-name"));
+ }
+
+ public void testSynchronizeCaption() {
+ Element design = createDesign();
+ AbstractComponent component = getComponent();
+ component.setCaption("test-caption");
+ component.writeDesign(design, ctx);
+ // We only changed the caption, which is not
+ // an attribute.
+ assertEquals(0, design.attributes().size());
+ assertEquals("test-caption", design.html());
+ }
+
+ public void testSynchronizeLocale() {
+ Element design = createDesign();
+ AbstractComponent component = getComponent();
+ component.setLocale(new Locale("fi", "FI"));
+ component.writeDesign(design, ctx);
+ // we only changed one of the attributes, others are at default values
+ assertEquals(1, design.attributes().size());
+ assertEquals("fi_FI", design.attr("locale"));
+ }
+
+ public void testSynchronizeExternalIcon() {
+ Element design = createDesign();
+ AbstractComponent component = getComponent();
+ component
+ .setIcon(new ExternalResource("http://example.com/example.gif"));
+ component.writeDesign(design, ctx);
+ // we only changed one of the attributes, others are at default values
+ assertEquals(1, design.attributes().size());
+ assertEquals("http://example.com/example.gif", design.attr("icon"));
+ }
+
+ public void testSynchronizeThemeIcon() {
+ Element design = createDesign();
+ AbstractComponent component = getComponent();
+ component.setIcon(new ThemeResource("example.gif"));
+ component.writeDesign(design, ctx);
+ // we only changed one of the attributes, others are at default values
+ assertEquals(1, design.attributes().size());
+ assertEquals("theme://example.gif", design.attr("icon"));
+ }
+
+ public void testSynchronizeFileResource() {
+ Element design = createDesign();
+ AbstractComponent component = getComponent();
+ component.setIcon(new FileResource(new File("img/example.gif")));
+ component.writeDesign(design, ctx);
+ // we only changed one of the attributes, others are at default values
+ assertEquals(1, design.attributes().size());
+ assertEquals("img/example.gif", design.attr("icon"));
+ }
+
+ public void testSynchronizeImmediate() {
+ Element design = createDesign();
+ AbstractComponent component = getComponent();
+ // no immediate attribute should be written before setting immediate to
+ // some value
+ component.writeDesign(design, ctx);
+ assertFalse(design.hasAttr("immediate"));
+ component.setImmediate(true);
+ component.writeDesign(design, ctx);
+ // we only changed one of the attributes, others are at default values
+ assertEquals(1, design.attributes().size());
+ assertEquals("true", design.attr("immediate"));
+ }
+
+ public void testSynchronizeImmediateByDefault() {
+ Element design = createDesign();
+ TabSheet byDefaultImmediate = new TabSheet();
+ // no immediate attribute should be written before setting immediate to
+ // false
+ byDefaultImmediate.writeDesign(design, ctx);
+ assertFalse(design.hasAttr("immediate"));
+ byDefaultImmediate.setImmediate(false);
+ byDefaultImmediate.writeDesign(design, ctx);
+ // we only changed one of the attributes, others are at default values
+ assertEquals(1, design.attributes().size());
+ assertEquals("false", design.attr("immediate"));
+ }
+
+ public void testSynchronizeDescription() {
+ Element design = createDesign();
+ AbstractComponent component = getComponent();
+ component.setDescription("test-description");
+ component.writeDesign(design, ctx);
+ // we only changed one of the attributes, others are at default values
+ assertEquals(1, design.attributes().size());
+ assertEquals("test-description", design.attr("description"));
+ }
+
+ public void testSynchronizeComponentError() {
+ Element design = createDesign();
+ AbstractComponent component = getComponent();
+ component.setComponentError(new UserError("<div>test-error</div>",
+ ContentMode.HTML, ErrorLevel.ERROR));
+ component.writeDesign(design, ctx);
+ // we only changed one of the attributes, others are at default values
+ assertEquals(1, design.attributes().size());
+ assertEquals("<div>test-error</div>", design.attr("error"));
+ }
+
+ public void testSynchronizeSizeFull() {
+ Element design = createDesign();
+ AbstractComponent component = getComponent();
+ component.setSizeFull();
+ component.writeDesign(design, ctx);
+ // there should be only size full
+ assertEquals(1, design.attributes().size());
+ assertEquals("true", design.attr("size-full"));
+ }
+
+ public void testSynchronizeSizeAuto() {
+ Element design = createDesign();
+ AbstractComponent component = getPanel();
+ component.setSizeUndefined();
+ component.writeDesign(design, ctx);
+ // there should be only size auto
+ assertEquals(1, design.attributes().size());
+ assertEquals("true", design.attr("size-auto"));
+ }
+
+ public void testSynchronizeHeightFull() {
+ Element design = createDesign();
+ AbstractComponent component = getComponent();
+ component.setHeight("100%");
+ component.setWidth("20px");
+ component.writeDesign(design, ctx);
+ assertEquals("true", design.attr("height-full"));
+ }
+
+ public void testSynchronizeHeightAuto() {
+ Element design = createDesign();
+ // we need to have default height of 100% -> use split panel
+ AbstractComponent component = getPanel();
+ component.setHeight(null);
+ component.setWidth("20px");
+ component.writeDesign(design, ctx);
+ assertEquals("true", design.attr("height-auto"));
+ }
+
+ public void testSynchronizeWidthFull() {
+ Element design = createDesign();
+ AbstractComponent component = getComponent();
+ component.setHeight("20px");
+ component.setWidth("100%");
+ component.writeDesign(design, ctx);
+ assertEquals("true", design.attr("width-full"));
+ }
+
+ public void testSynchronizeWidthAuto() {
+ Element design = createDesign();
+ // need to get label, otherwise the default would be auto
+ AbstractComponent component = getPanel();
+ component.setHeight("20px");
+ component.setWidth(null);
+ component.writeDesign(design, ctx);
+ assertEquals("true", design.attr("width-auto"));
+ }
+
+ public void testSynchronizeWidth() {
+ Element design = createDesign();
+ AbstractComponent component = getComponent();
+ component.setHeight("20px");
+ component.setWidth("70%");
+ component.writeDesign(design, ctx);
+ assertEquals("70%", design.attr("width"));
+ }
+
+ public void testSynchronizeHeight() {
+ Element design = createDesign();
+ AbstractComponent component = getComponent();
+ component.setHeight("20px");
+ component.setWidth("70%");
+ component.writeDesign(design, ctx);
+ assertEquals("20px", design.attr("height"));
+ }
+
+ public void testSynchronizeResponsive() {
+ Element design = createDesign();
+ AbstractComponent component = getComponent();
+ Responsive.makeResponsive(component);
+ component.writeDesign(design, ctx);
+ assertTrue("Design attributes should have key 'responsive'", design
+ .attributes().hasKey("responsive"));
+ assertFalse("Responsive attribute should not be 'false'",
+ design.attr("responsive").equalsIgnoreCase("false"));
+ }
+
+ private AbstractComponent getComponent() {
+ Button button = new Button();
+ button.setHtmlContentAllowed(true);
+ return button;
+ }
+
+ private AbstractComponent getPanel() {
+ return new HorizontalSplitPanel();
+ }
+
+ private Element createDesign() {
+ Attributes attr = new Attributes();
+ attr.put("should_be_removed", "foo");
+ Element node = new Element(Tag.valueOf("v-button"), "", attr);
+ Element child = new Element(Tag.valueOf("to-be-removed"), "foo", attr);
+ node.appendChild(child);
+ return node;
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractfield/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstractfield/TestReadDesign.java
new file mode 100644
index 0000000000..dd0e629199
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractfield/TestReadDesign.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.server.component.abstractfield;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+import org.jsoup.parser.Tag;
+
+import com.vaadin.ui.AbstractField;
+import com.vaadin.ui.TextField;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ *
+ * Test case for reading the attributes of the AbstractField from design
+ *
+ * @author Vaadin Ltd
+ */
+public class TestReadDesign extends TestCase {
+
+ private DesignContext ctx;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ ctx = new DesignContext();
+ }
+
+ public void testSynchronizeReadOnly() {
+ Element design = createDesign("readonly", "");
+ AbstractField component = getComponent();
+ component.readDesign(design, ctx);
+ assertEquals(true, component.isReadOnly());
+ design = createDesign("readonly", "false");
+ component.readDesign(design, ctx);
+ assertEquals(false, component.isReadOnly());
+ }
+
+ public void testSynchronizeTabIndex() {
+ Element design = createDesign("tabindex", "2");
+ AbstractField component = getComponent();
+ component.readDesign(design, ctx);
+ assertEquals("Tab index must be 2", 2, component.getTabIndex());
+ }
+
+ private AbstractField getComponent() {
+ return new TextField();
+ }
+
+ private Element createDesign(String key, String value) {
+ Attributes attributes = new Attributes();
+ attributes.put(key, value);
+ Element node = new Element(Tag.valueOf("v-text-field"), "", attributes);
+ return node;
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractfield/TestWriteDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstractfield/TestWriteDesign.java
new file mode 100644
index 0000000000..969713abe6
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractfield/TestWriteDesign.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.server.component.abstractfield;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+import org.jsoup.parser.Tag;
+
+import com.vaadin.data.util.ObjectProperty;
+import com.vaadin.ui.AbstractField;
+import com.vaadin.ui.TextField;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ * Test case for writing the attributes of the AbstractField to design
+ *
+ * @author Vaadin Ltd
+ */
+public class TestWriteDesign extends TestCase {
+
+ private DesignContext ctx;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ ctx = new DesignContext();
+ }
+
+ public void testSynchronizeReadOnly() {
+ Element design = createDesign();
+ AbstractField component = getComponent();
+ component.setReadOnly(true);
+ component.writeDesign(design, ctx);
+ // we only changed one of the attributes, others are at default values
+ assertEquals(1, design.attributes().size());
+ assertTrue("Design must contain readonly", design.hasAttr("readonly"));
+ assertTrue("Readonly must be true", design.attr("readonly").equals("")
+ || design.attr("readonly").equals("true"));
+ }
+
+ public void testSynchronizeModelReadOnly() {
+ Element design = createDesign();
+ AbstractField component = getComponent();
+ ObjectProperty property = new ObjectProperty<String>("test");
+ property.setReadOnly(true);
+ component.setPropertyDataSource(property);
+ component.writeDesign(design, ctx);
+ // make sure that property readonly is not written to design
+ assertFalse("Design must not contain readonly",
+ design.hasAttr("readonly"));
+ }
+
+ private AbstractField getComponent() {
+ return new TextField();
+ }
+
+ private Element createDesign() {
+ Attributes attr = new Attributes();
+ attr.put("should_be_removed", "foo");
+ return new Element(Tag.valueOf("v-text-field"), "", attr);
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestReadDesign.java
new file mode 100644
index 0000000000..874fbd83b2
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestReadDesign.java
@@ -0,0 +1,119 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.server.component.abstractorderedlayout;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+import org.jsoup.parser.Tag;
+
+import com.vaadin.ui.Alignment;
+import com.vaadin.ui.Component;
+import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ * Test case from reading AbstractOrdered layouts from design
+ *
+ * @since
+ * @author Vaadin Ltd
+ */
+public class TestReadDesign extends TestCase {
+
+ public void testChildCount() {
+ VerticalLayout root = createLayout(0f, false);
+ assertEquals(2, root.getComponentCount());
+ }
+
+ public void testMargin() {
+ VerticalLayout root = createLayout(0f, true);
+ assertTrue(root.getMargin().getBitMask() != 0);
+ root = createLayout(0f, false);
+ assertTrue(root.getMargin().getBitMask() == 0);
+ }
+
+ public void testAttributes() {
+ VerticalLayout root = createLayout(0f, false);
+ assertEquals("test-layout", root.getCaption());
+ assertEquals("test-label", root.getComponent(0).getCaption());
+ assertEquals("test-button", root.getComponent(1).getCaption());
+ }
+
+ public void testExpandRatio() {
+ VerticalLayout root = createLayout(1f, false);
+ assertEquals(1f, root.getExpandRatio(root.getComponent(0)));
+ assertEquals(1f, root.getExpandRatio(root.getComponent(1)));
+
+ root = createLayout(0f, false);
+ assertEquals(0f, root.getExpandRatio(root.getComponent(0)));
+ assertEquals(0f, root.getExpandRatio(root.getComponent(1)));
+ }
+
+ public void testAlignment() {
+ VerticalLayout root = createLayout(0f, false, ":top", ":left");
+ assertEquals(Alignment.TOP_LEFT,
+ root.getComponentAlignment(root.getComponent(0)));
+ root = createLayout(0f, false, ":middle", ":center");
+ assertEquals(Alignment.MIDDLE_CENTER,
+ root.getComponentAlignment(root.getComponent(0)));
+ root = createLayout(0f, false, ":bottom", ":right");
+ assertEquals(Alignment.BOTTOM_RIGHT,
+ root.getComponentAlignment(root.getComponent(0)));
+
+ }
+
+ private VerticalLayout createLayout(float expandRatio, boolean margin,
+ String... alignments) {
+ DesignContext ctx = new DesignContext();
+ Element design = createDesign(expandRatio, margin, alignments);
+ Component child = ctx.readDesign(design);
+ return (VerticalLayout) child;
+ }
+
+ private Element createDesign(float expandRatio, boolean margin,
+ String... alignments) {
+
+ Attributes rootAttributes = new Attributes();
+ rootAttributes.put("caption", "test-layout");
+ if (margin) {
+ rootAttributes.put("margin", "");
+ }
+ Element node = new Element(Tag.valueOf("v-vertical-layout"), "",
+ rootAttributes);
+
+ Attributes firstChildAttributes = new Attributes();
+ firstChildAttributes.put("caption", "test-label");
+ firstChildAttributes.put(":expand", String.valueOf(expandRatio));
+ for (String alignment : alignments) {
+ firstChildAttributes.put(alignment, "");
+ }
+ Element firstChild = new Element(Tag.valueOf("v-label"), "",
+ firstChildAttributes);
+ node.appendChild(firstChild);
+
+ Attributes secondChildAttributes = new Attributes();
+ secondChildAttributes.put(":expand", String.valueOf(expandRatio));
+ for (String alignment : alignments) {
+ secondChildAttributes.put(alignment, "");
+ }
+ Element secondChild = new Element(Tag.valueOf("v-button"), "",
+ secondChildAttributes);
+ secondChild.html("test-button");
+ node.appendChild(secondChild);
+ return node;
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestWriteDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestWriteDesign.java
new file mode 100644
index 0000000000..302cf985bd
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestWriteDesign.java
@@ -0,0 +1,148 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.server.component.abstractorderedlayout;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+import org.jsoup.parser.Tag;
+
+import com.vaadin.ui.Alignment;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ * Test case for writing abstract ordered layout to design
+ *
+ * @since
+ * @author Vaadin Ltd
+ */
+public class TestWriteDesign extends TestCase {
+
+ public void testSynchronizeMargin() {
+ VerticalLayout layout = new VerticalLayout();
+ layout.setMargin(true);
+ Element design = createDesign();
+ layout.writeDesign(design, createDesignContext());
+ assertTrue("The margin must be written", design.hasAttr("margin"));
+ assertTrue("The margin must be empty or true", design.attr("margin")
+ .equals("") || design.attr("margin").equalsIgnoreCase("true"));
+ }
+
+ public void testSynchronizeEmptyLayout() {
+ VerticalLayout layout = new VerticalLayout();
+ layout.setCaption("changed-caption");
+ Element design = createDesign();
+ layout.writeDesign(design, createDesignContext());
+ assertEquals(0, design.childNodes().size());
+ assertEquals("changed-caption", design.attr("caption"));
+ }
+
+ public void testSynchronizeLayoutWithChildren() {
+ VerticalLayout layout = new VerticalLayout();
+ layout.addComponent(new Label("test-label"));
+ layout.getComponent(0).setCaption("test-caption");
+ layout.addComponent(new Label("test-label-2"));
+ Element design = createDesign();
+ layout.writeDesign(design, createDesignContext());
+ assertEquals(2, design.childNodes().size());
+ assertEquals("v-label", ((Element) design.childNode(0)).tagName());
+ assertEquals("test-caption", design.childNode(0).attr("caption"));
+ }
+
+ public void testSynchronizeUnitExpandRatio() {
+ VerticalLayout layout = new VerticalLayout();
+ layout.addComponent(new Label("test-label"));
+ layout.setExpandRatio(layout.getComponent(0), 1.0f);
+ Element design = createDesign();
+ layout.writeDesign(design, createDesignContext());
+ assertTrue(design.childNode(0).hasAttr(":expand"));
+ assertEquals("", design.childNode(0).attr(":expand"));
+ }
+
+ public void testSynchronizeArbitraryExpandRatio() {
+ VerticalLayout layout = new VerticalLayout();
+ layout.addComponent(new Label("test-label"));
+ layout.setExpandRatio(layout.getComponent(0), 2.40f);
+ Element design = createDesign();
+ layout.writeDesign(design, createDesignContext());
+ assertTrue(design.childNode(0).hasAttr(":expand"));
+ assertEquals("2.4", design.childNode(0).attr(":expand"));
+ }
+
+ public void testSynchronizeDefaultAlignment() {
+ Element design = createDesign();
+ VerticalLayout layout = createLayoutWithAlignment(design, null);
+ layout.writeDesign(design, createDesignContext());
+ assertFalse(design.childNode(0).hasAttr(":top"));
+ assertFalse(design.childNode(0).hasAttr(":left"));
+ }
+
+ public void testSynchronizeMiddleCenter() {
+ Element design = createDesign();
+ VerticalLayout layout = createLayoutWithAlignment(design,
+ Alignment.MIDDLE_CENTER);
+ layout.writeDesign(design, createDesignContext());
+ assertTrue(design.childNode(0).hasAttr(":middle"));
+ assertTrue(design.childNode(0).hasAttr(":center"));
+ }
+
+ public void testSynchronizeBottomRight() {
+ Element design = createDesign();
+ VerticalLayout layout = createLayoutWithAlignment(design,
+ Alignment.BOTTOM_RIGHT);
+ layout.writeDesign(design, createDesignContext());
+ assertTrue(design.childNode(0).hasAttr(":bottom"));
+ assertTrue(design.childNode(0).hasAttr(":right"));
+ }
+
+ private VerticalLayout createLayoutWithAlignment(Element design,
+ Alignment alignment) {
+ VerticalLayout layout = new VerticalLayout();
+ layout.addComponent(new Label("test-label"));
+ if (alignment != null) {
+ layout.setComponentAlignment(layout.getComponent(0), alignment);
+ }
+ layout.writeDesign(design, createDesignContext());
+ return layout;
+ }
+
+ private Element createDesign() {
+ // make sure that the design node has old content that should be removed
+ Attributes rootAttributes = new Attributes();
+ rootAttributes.put("caption", "test-layout");
+ Element node = new Element(Tag.valueOf("v-vertical-layout"), "",
+ rootAttributes);
+ Attributes firstChildAttributes = new Attributes();
+ firstChildAttributes.put("caption", "test-label");
+ Element firstChild = new Element(Tag.valueOf("v-label"), "",
+ firstChildAttributes);
+ node.appendChild(firstChild);
+
+ Attributes secondChildAttributes = new Attributes();
+ secondChildAttributes.put("caption", "test-button");
+ Element secondChild = new Element(Tag.valueOf("v-button"), "",
+ secondChildAttributes);
+ node.appendChild(secondChild);
+ return node;
+ }
+
+ private DesignContext createDesignContext() {
+ return new DesignContext();
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/TestReadDesign.java
new file mode 100644
index 0000000000..db30f05c5f
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/TestReadDesign.java
@@ -0,0 +1,158 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.server.component.abstractsplitpanel;
+
+import java.lang.reflect.Method;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+import org.jsoup.parser.Tag;
+
+import com.vaadin.server.Sizeable.Unit;
+import com.vaadin.shared.ui.splitpanel.AbstractSplitPanelState.SplitterState;
+import com.vaadin.ui.AbstractSplitPanel;
+import com.vaadin.ui.HorizontalSplitPanel;
+import com.vaadin.ui.Table;
+import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.VerticalSplitPanel;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ * Tests synchronizing the attributes and children of horizontal and vertical
+ * split panels from a design.
+ *
+ * @author Vaadin Ltd
+ */
+public class TestReadDesign extends TestCase {
+ DesignContext ctx;
+
+ @Override
+ protected void setUp() {
+ ctx = new DesignContext();
+ }
+
+ public void testAttributes() throws Exception {
+ // Create a design with non-default attributes values.
+ Element design = createDesign(true, false, true, true);
+ HorizontalSplitPanel sp = new HorizontalSplitPanel();
+ sp.readDesign(design, ctx);
+ // Check that the attributes are correctly parsed.
+ assertEquals(20.5f, sp.getSplitPosition());
+ assertEquals(Unit.PERCENTAGE, sp.getSplitPositionUnit());
+ assertEquals(20f, sp.getMinSplitPosition());
+ assertEquals(Unit.PERCENTAGE, sp.getMinSplitPositionUnit());
+ assertEquals(50f, sp.getMaxSplitPosition());
+ assertEquals(Unit.PIXELS, sp.getMaxSplitPositionUnit());
+ assertEquals(true, sp.isLocked());
+ checkReversed(sp, true);
+ }
+
+ public void testWithNoChildren() {
+ Element design = createDesign(true, false, false, false);
+ HorizontalSplitPanel sp = new HorizontalSplitPanel();
+ sp.readDesign(design, ctx);
+ assertEquals("Unexpected child count for the split panel.", 0,
+ sp.getComponentCount());
+ }
+
+ public void testWithFirstChild() {
+ Element design = createDesign(false, false, true, false);
+ VerticalSplitPanel sp = new VerticalSplitPanel();
+ sp.readDesign(design, ctx);
+ assertEquals("Unexpected child count for the split panel.", 1,
+ sp.getComponentCount());
+ Object obj = sp.getFirstComponent();
+ assertEquals("Wrong component in split panel.", Table.class,
+ obj.getClass());
+ }
+
+ public void testWithSecondChild() {
+ Element design = createDesign(true, false, false, true);
+ HorizontalSplitPanel sp = new HorizontalSplitPanel();
+ sp.readDesign(design, ctx);
+ assertEquals("Unexpected child count for the split panel.", 1,
+ sp.getComponentCount());
+ Object obj = sp.getSecondComponent();
+ assertEquals("Wrong component in split panel.", VerticalLayout.class,
+ obj.getClass());
+ }
+
+ public void testWithBothChildren() {
+ Element design = createDesign(false, false, true, true);
+ VerticalSplitPanel sp = new VerticalSplitPanel();
+ sp.readDesign(design, ctx);
+ assertEquals("Unexpected child count for the split panel.", 2,
+ sp.getComponentCount());
+ Object first = sp.getFirstComponent();
+ Object second = sp.getSecondComponent();
+ assertEquals("Wrong first component in split panel.", Table.class,
+ first.getClass());
+ assertEquals("Wrong second component in split panel.",
+ VerticalLayout.class, second.getClass());
+ }
+
+ /*
+ * Creates an html tree node structure representing a split panel and its
+ * contents. The parameters are used for controlling whether the split panel
+ * is horizontal or vertical, whether attributes are set for the design and
+ * whether the split panel should have the first and the second child
+ * component.
+ */
+ private Element createDesign(boolean horizontal,
+ boolean useDefaultAttributes, boolean hasFirstChild,
+ boolean hasSecondChild) {
+ Attributes attributes = new Attributes();
+ if (!useDefaultAttributes) {
+ attributes.put("split-position", "20.5%");
+ // The unitless number should correspond to 20%
+ attributes.put("min-split-position", "20");
+ attributes.put("max-split-position", "50px");
+ attributes.put("locked", "");
+ attributes.put("reversed", "");
+ }
+ String tagName = horizontal ? "v-horizontal-split-panel"
+ : "v-vertical-split-panel";
+ Element element = new Element(Tag.valueOf(tagName), "", attributes);
+ // Create the children
+ if (hasFirstChild) {
+ Element child = new Element(Tag.valueOf("v-table"), "");
+ element.appendChild(child);
+ }
+ if (hasSecondChild) {
+ Element child = new Element(Tag.valueOf("v-vertical-layout"), "");
+ if (!hasFirstChild) {
+ child.attr(":second", "");
+ }
+ element.appendChild(child);
+ }
+ return element;
+ }
+
+ /*
+ * Checks the reversed property of a split panel.
+ */
+ private void checkReversed(AbstractSplitPanel sp, boolean expected)
+ throws Exception {
+ Method getter = AbstractSplitPanel.class
+ .getDeclaredMethod("getSplitterState");
+ getter.setAccessible(true);
+ SplitterState state = (SplitterState) getter.invoke(sp);
+ assertEquals("Wrong value for split panel property reversed.",
+ expected, state.positionReversed);
+ }
+} \ No newline at end of file
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/TestWriteDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/TestWriteDesign.java
new file mode 100644
index 0000000000..649498c20b
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/TestWriteDesign.java
@@ -0,0 +1,151 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.server.component.abstractsplitpanel;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Element;
+
+import com.vaadin.server.Sizeable.Unit;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.HorizontalSplitPanel;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.VerticalSplitPanel;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ * Tests synchronizing the properties and child components of split panels to a
+ * design.
+ *
+ * @author Vaadin Ltd
+ */
+public class TestWriteDesign extends TestCase {
+ private DesignContext ctx;
+
+ @Override
+ public void setUp() {
+ ctx = new DesignContext();
+ }
+
+ public void testHorizontalWithDefaultValues() {
+ // no attributes or child elements should appear
+ HorizontalSplitPanel sp = new HorizontalSplitPanel();
+ Element e = ctx.createElement(sp);
+ assertEquals("Wrong tag name.", "v-horizontal-split-panel",
+ e.nodeName());
+ assertEquals("The split panel should not have attributes.", 0, e
+ .attributes().size());
+ assertEquals("The split panel should not have children.", 0, e
+ .children().size());
+ }
+
+ public void testVerticalWithAttributes() {
+ // All defined attributes should be output in the tree node. No child
+ // components are present in this test.
+ VerticalSplitPanel sp = new VerticalSplitPanel();
+ sp.setSplitPosition(27f, Unit.PIXELS, true);
+ sp.setMinSplitPosition(5.5f, Unit.PERCENTAGE);
+ sp.setMaxSplitPosition(95, Unit.PERCENTAGE);
+ sp.setLocked(true);
+ Element e = ctx.createElement(sp);
+ assertEquals("Wrong tag name.", "v-vertical-split-panel", e.nodeName());
+ assertEquals("Unexpected number of attributes.", 5, e.attributes()
+ .size());
+ assertEquals("Wrong split position.", "27px", e.attr("split-position"));
+ assertEquals("Wrong minimum split position.", "5.5%",
+ e.attr("min-split-position"));
+ assertEquals("Wrong maximum split position.", "95%",
+ e.attr("max-split-position"));
+ assertTrue("Unexpected value for locked: " + e.attr("locked"),
+ "true".equals(e.attr("locked")) || "".equals(e.attr("locked")));
+ assertTrue(
+ "Unexpected value for reversed: " + e.attr("reversed"),
+ "true".equals(e.attr("reversed"))
+ || "".equals(e.attr("reversed")));
+ }
+
+ public void testHorizontalWithFirstChild() {
+ // The split panel contains only the first child.
+ HorizontalSplitPanel sp = new HorizontalSplitPanel();
+ sp.setSplitPosition(25f);
+ sp.setFirstComponent(new Button("First slot"));
+ Element e = ctx.createElement(sp);
+ assertEquals("Wrong split position.", "25%", e.attr("split-position"));
+ assertEquals("Wrong number of child elements.", 1, e.children().size());
+ Element eb = e.children().get(0);
+ assertEquals("Wrong tag name of first child element.", "v-button",
+ eb.nodeName());
+ assertEquals("Wrong text in the button element.", "First slot",
+ eb.html());
+ }
+
+ public void testVerticalWithSecondChild() {
+ // The split panel contains only the second child.
+ VerticalSplitPanel sp = new VerticalSplitPanel();
+ sp.setMinSplitPosition(25f, Unit.PIXELS);
+ sp.setSecondComponent(new Label("Second slot"));
+ Element e = ctx.createElement(sp);
+ assertEquals("Wrong minimum split position.", "25px",
+ e.attr("min-split-position"));
+ assertEquals("Wrong number of child elements.", 1, e.children().size());
+ Element el = e.children().get(0);
+ assertEquals("Wrong tag name of child element.", "v-label",
+ el.nodeName());
+ assertEquals("Wrong text in the label element.", "Second slot",
+ el.html());
+ assertTrue("Missing attribute :second in the label element.",
+ el.hasAttr(":second"));
+ }
+
+ public void testVerticalWithBothChildren() {
+ // The split panel has both child components.
+ VerticalSplitPanel sp = new VerticalSplitPanel();
+ sp.setFirstComponent(new Button("First slot"));
+ sp.setSecondComponent(new Label("Second slot"));
+ Element e = ctx.createElement(sp);
+ assertEquals("Wrong number of child elements.", 2, e.children().size());
+ Element eb = e.children().get(0);
+ assertEquals("Wrong tag name of first child element.", "v-button",
+ eb.nodeName());
+ assertEquals("Wrong text in the button element.", "First slot",
+ eb.html());
+ Element el = e.children().get(1);
+ assertEquals("Wrong tag name of second child element.", "v-label",
+ el.nodeName());
+ assertEquals("Wrong text in the label element.", "Second slot",
+ el.html());
+ assertFalse(
+ "There should be no :second attribute when a split panel has both children.",
+ el.hasAttr(":second"));
+ }
+
+ public void testReSynchronize() {
+ // Test that old children and attributes are removed when an element is
+ // synchronized to a new component.
+ VerticalSplitPanel sp = new VerticalSplitPanel();
+ sp.setMinSplitPosition(5.5f, Unit.PERCENTAGE);
+ sp.setMaxSplitPosition(95, Unit.PERCENTAGE);
+ sp.setFirstComponent(new Button("First slot"));
+ sp.setSecondComponent(new Label("Second slot"));
+ Element e = ctx.createElement(sp);
+ sp = new VerticalSplitPanel();
+ sp.writeDesign(e, ctx);
+ assertTrue("There should be no attributes in the node.", e.attributes()
+ .size() == 0);
+ assertTrue("There should be no child elements.",
+ e.children().size() == 0);
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/TestReadDesign.java
new file mode 100644
index 0000000000..3b4b6f1f03
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/TestReadDesign.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.server.component.abstracttextfield;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+import org.jsoup.parser.Tag;
+
+import com.vaadin.ui.AbstractTextField;
+import com.vaadin.ui.AbstractTextField.TextChangeEventMode;
+import com.vaadin.ui.TextField;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ * Test case for reading the attributes of the AbstractTextField from design
+ */
+public class TestReadDesign extends TestCase {
+
+ private DesignContext ctx;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ ctx = new DesignContext();
+ }
+
+ public void testAttributes() {
+ Element design = createDesign();
+ AbstractTextField component = getComponent();
+ component.readDesign(design, ctx);
+ assertEquals("this-is-null", component.getNullRepresentation());
+ assertEquals(true, component.isNullSettingAllowed());
+ assertEquals(5, component.getMaxLength());
+ assertEquals(3, component.getColumns());
+ assertEquals("input", component.getInputPrompt());
+ assertEquals(TextChangeEventMode.EAGER,
+ component.getTextChangeEventMode());
+ assertEquals(100, component.getTextChangeTimeout());
+ }
+
+ private AbstractTextField getComponent() {
+ return new TextField();
+ }
+
+ private Element createDesign() {
+ Attributes attributes = new Attributes();
+ attributes.put("null-representation", "this-is-null");
+ attributes.put("null-setting-allowed", "true");
+ attributes.put("maxlength", "5");
+ attributes.put("columns", "3");
+ attributes.put("input-prompt", "input");
+ attributes.put("text-change-event-mode", "eager");
+ attributes.put("text-change-timeout", "100");
+ Element node = new Element(Tag.valueOf("v-text-field"), "", attributes);
+ return node;
+ }
+
+}
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/TestWriteDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/TestWriteDesign.java
new file mode 100644
index 0000000000..be5c384d3b
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/TestWriteDesign.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.server.component.abstracttextfield;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+import org.jsoup.parser.Tag;
+
+import com.vaadin.ui.AbstractTextField;
+import com.vaadin.ui.AbstractTextField.TextChangeEventMode;
+import com.vaadin.ui.TextField;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ * Test case for writing the attributes of the AbstractTextField to design
+ *
+ * @author Vaadin Ltd
+ */
+public class TestWriteDesign extends TestCase {
+
+ private DesignContext ctx;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ ctx = new DesignContext();
+ }
+
+ public void testSynchronizetestAttributes() {
+ Element design = createDesign();
+ AbstractTextField component = getComponent();
+ component.setNullRepresentation("this-is-null");
+ component.setNullSettingAllowed(true);
+ component.setMaxLength(5);
+ component.setColumns(3);
+ component.setInputPrompt("input");
+ component.setTextChangeEventMode(TextChangeEventMode.EAGER);
+ component.setTextChangeTimeout(100);
+ component.writeDesign(design, ctx);
+ assertEquals("this-is-null", design.attr("null-representation"));
+ assertEquals("true", design.attr("null-setting-allowed"));
+ assertEquals("5", design.attr("maxlength"));
+ assertEquals("3", design.attr("columns"));
+ assertEquals("input", design.attr("input-prompt"));
+ assertEquals("EAGER", design.attr("text-change-event-mode"));
+ assertEquals("100", design.attr("text-change-timeout"));
+ }
+
+ private AbstractTextField getComponent() {
+ return new TextField();
+ }
+
+ private Element createDesign() {
+ Attributes attr = new Attributes();
+ return new Element(Tag.valueOf("v-text-field"), "", attr);
+ }
+
+}
diff --git a/server/tests/src/com/vaadin/tests/server/component/button/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/button/TestReadDesign.java
new file mode 100644
index 0000000000..e194232742
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/server/component/button/TestReadDesign.java
@@ -0,0 +1,129 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.server.component.button;
+
+import java.lang.reflect.Field;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+import org.jsoup.parser.Tag;
+import org.junit.Test;
+
+import com.vaadin.event.ShortcutAction.KeyCode;
+import com.vaadin.event.ShortcutAction.ModifierKey;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickShortcut;
+import com.vaadin.ui.NativeButton;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ *
+ * Test cases for reading the contents of a Button and a NativeButton from a
+ * design.
+ *
+ */
+public class TestReadDesign extends TestCase {
+
+ private DesignContext ctx;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ ctx = new DesignContext();
+ }
+
+ @Test
+ public void testWithContent() {
+ createAndTestButtons("Click", null);
+ }
+
+ @Test
+ public void testWithHtmlCaption() {
+ createAndTestButtons("<b>Click me</b>", null);
+ }
+
+ @Test
+ public void testWithContentAndCaption() {
+ createAndTestButtons("Click me", "caption");
+ }
+
+ @Test
+ public void testWithCaption() {
+ createAndTestButtons(null, "Click me");
+ }
+
+ @Test
+ public void testAttributes() throws IllegalArgumentException,
+ SecurityException, IllegalAccessException, NoSuchFieldException {
+ Attributes attributes = new Attributes();
+ attributes.put("tabindex", "3");
+ attributes.put("plain-text", "");
+ attributes.put("icon-alt", "OK");
+ attributes.put("click-shortcut", "ctrl-shift-o");
+ Button button = (Button) ctx
+ .readDesign(createButtonWithAttributes(attributes));
+ assertEquals(3, button.getTabIndex());
+ assertEquals(false, button.isHtmlContentAllowed());
+ assertEquals("OK", button.getIconAlternateText());
+ Field field = Button.class.getDeclaredField("clickShortcut");
+ field.setAccessible(true);
+ ClickShortcut value = (ClickShortcut) field.get(button);
+ assertEquals(KeyCode.O, value.getKeyCode());
+ assertEquals(ModifierKey.CTRL, value.getModifiers()[0]);
+ assertEquals(ModifierKey.SHIFT, value.getModifiers()[1]);
+ }
+
+ /*
+ * Test both Button and NativeButton. Caption should always be ignored. If
+ * content is null, the created button should have empty content.
+ */
+ private void createAndTestButtons(String content, String caption) {
+ Element e1 = createElement("v-button", content, caption);
+ Button b1 = (Button) ctx.readDesign(e1);
+ Element e2 = createElement("v-native-button", content, caption);
+ NativeButton b2 = (NativeButton) ctx.readDesign(e2);
+ if (content != null) {
+ assertEquals("The button has the wrong text content.", content,
+ b1.getCaption());
+ assertEquals("The button has the wrong text content.", content,
+ b2.getCaption());
+ } else {
+ assertTrue("The button has the wrong content.",
+ b1.getCaption() == null || "".equals(b1.getCaption()));
+ assertTrue("The button has the wrong content.",
+ b2.getCaption() == null || "".equals(b2.getCaption()));
+ }
+ }
+
+ private Element createButtonWithAttributes(Attributes attributes) {
+ return new Element(Tag.valueOf("v-button"), "", attributes);
+ }
+
+ private Element createElement(String elementName, String content,
+ String caption) {
+ Attributes attributes = new Attributes();
+ if (caption != null) {
+ attributes.put("caption", caption);
+ }
+ Element node = new Element(Tag.valueOf(elementName), "", attributes);
+ if (content != null) {
+ node.html(content);
+ }
+ return node;
+ }
+} \ No newline at end of file
diff --git a/server/tests/src/com/vaadin/tests/server/component/button/TestWriteDesign.java b/server/tests/src/com/vaadin/tests/server/component/button/TestWriteDesign.java
new file mode 100644
index 0000000000..dff80769f4
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/server/component/button/TestWriteDesign.java
@@ -0,0 +1,103 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.server.component.button;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+import org.jsoup.parser.Tag;
+import org.junit.Test;
+
+import com.vaadin.event.ShortcutAction.KeyCode;
+import com.vaadin.event.ShortcutAction.ModifierKey;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.NativeButton;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ * Tests generating html tree nodes corresponding to the contents of a Button
+ * and a NativeButton.
+ */
+public class TestWriteDesign extends TestCase {
+
+ private DesignContext ctx;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ ctx = new DesignContext();
+ }
+
+ @Test
+ public void testWithTextContent() {
+ createAndTestButtons("Click me");
+ }
+
+ @Test
+ public void testWithHtmlContent() {
+ createAndTestButtons("<b>Click</b>");
+ }
+
+ @Test
+ public void testAttributes() {
+ Button button = new Button();
+ button.setTabIndex(3);
+ button.setIconAlternateText("OK");
+ button.setClickShortcut(KeyCode.O, ModifierKey.CTRL, ModifierKey.SHIFT);
+ Element e = new Element(Tag.valueOf("v-button"), "", new Attributes());
+ button.writeDesign(e, ctx);
+ assertEquals("3", e.attr("tabindex"));
+ assertTrue("Button is plain text by default", e.hasAttr("plain-text"));
+ assertEquals("OK", e.attr("icon-alt"));
+ assertEquals("ctrl-shift-o", e.attr("click-shortcut"));
+ }
+
+ @Test
+ public void testUpdateContentMode() {
+ Button button = new Button("OK");
+ Element e = new Element(Tag.valueOf("v-button"), "", new Attributes());
+ button.writeDesign(e, ctx);
+ assertTrue("Button is plain text by default", e.hasAttr("plain-text"));
+
+ button.setHtmlContentAllowed(true);
+ button.writeDesign(e, ctx);
+ assertTrue("Button is updated to HTML", !e.hasAttr("plain-text"));
+
+ }
+
+ private void createAndTestButtons(String content) {
+ Button b1 = new Button(content);
+ // we need to set this on, since the plain-text attribute will appear
+ // otherwise
+ b1.setHtmlContentAllowed(true);
+ Element e1 = ctx.createElement(b1);
+ assertEquals("Wrong tag name for button.", "v-button", e1.tagName());
+ assertEquals("Unexpected content in the v-button element.", content,
+ e1.html());
+ assertTrue("The v-button element should not have attributes.", e1
+ .attributes().size() == 0);
+ NativeButton b2 = new NativeButton(content);
+ b2.setHtmlContentAllowed(true);
+ Element e2 = ctx.createElement(b2);
+ assertEquals("Wrong tag name for button.", "v-native-button",
+ e2.tagName());
+ assertEquals("Unexpected content in the v-button element.", content,
+ e2.html());
+ assertTrue("The v-button element should not have attributes.", e2
+ .attributes().size() == 0);
+ }
+} \ No newline at end of file
diff --git a/server/tests/src/com/vaadin/tests/server/component/checkbox/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/checkbox/TestReadDesign.java
new file mode 100644
index 0000000000..c58b3b6bdd
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/server/component/checkbox/TestReadDesign.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.server.component.checkbox;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+import org.jsoup.parser.Tag;
+import org.junit.Test;
+
+import com.vaadin.ui.CheckBox;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ *
+ * Test cases for reading the contents of a Checkbox from a design.
+ *
+ */
+public class TestReadDesign extends TestCase {
+
+ private DesignContext ctx;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ ctx = new DesignContext();
+ }
+
+ @Test
+ public void testChecked() {
+ Element e = createElement(true);
+ CheckBox box = (CheckBox) ctx.readDesign(e);
+ assertEquals("The checkbox must be checked", Boolean.TRUE,
+ box.getValue());
+ }
+
+ @Test
+ public void testUnchecked() {
+ Element e = createElement(false);
+ CheckBox box = (CheckBox) ctx.readDesign(e);
+ assertEquals("The checkbox must be unchecked", Boolean.FALSE,
+ box.getValue());
+ }
+
+ private Element createElement(boolean checked) {
+ Attributes attributes = new Attributes();
+ if (checked) {
+ attributes.put("checked", "");
+ }
+ Element node = new Element(Tag.valueOf("v-check-box"), "", attributes);
+ return node;
+ }
+} \ No newline at end of file
diff --git a/server/tests/src/com/vaadin/tests/server/component/checkbox/TestWriteDesign.java b/server/tests/src/com/vaadin/tests/server/component/checkbox/TestWriteDesign.java
new file mode 100644
index 0000000000..d187371db6
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/server/component/checkbox/TestWriteDesign.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.server.component.checkbox;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Element;
+import org.junit.Test;
+
+import com.vaadin.ui.CheckBox;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ * Tests generating html tree nodes corresponding to the contents of a Checkbox
+ */
+public class TestWriteDesign extends TestCase {
+
+ private DesignContext ctx;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ ctx = new DesignContext();
+ }
+
+ @Test
+ public void testChecked() {
+ CheckBox box = new CheckBox();
+ box.setValue(true);
+ Element e = ctx.createElement(box);
+ assertTrue("element must have checked attribute", e.hasAttr("checked"));
+ assertTrue("the checked attribute must be true", e.attr("checked")
+ .equals("true") || e.attr("checked").equals(""));
+ }
+
+ @Test
+ public void testUnchecked() {
+ CheckBox box = new CheckBox();
+ box.setValue(false);
+ Element e = ctx.createElement(box);
+ assertFalse("the element must not have checked attribute",
+ e.hasAttr("checked"));
+ }
+} \ No newline at end of file
diff --git a/server/tests/src/com/vaadin/tests/server/component/csslayout/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/csslayout/TestReadDesign.java
new file mode 100644
index 0000000000..bac3dc70eb
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/server/component/csslayout/TestReadDesign.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.server.component.csslayout;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+import org.jsoup.parser.Tag;
+
+import com.vaadin.ui.Component;
+import com.vaadin.ui.CssLayout;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ * Test case for reading CssLayout from design
+ *
+ * @author Vaadin Ltd
+ */
+public class TestReadDesign extends TestCase {
+
+ public void testChildCount() {
+ CssLayout root = createLayout();
+ assertEquals(2, root.getComponentCount());
+ }
+
+ public void testAttributes() {
+ CssLayout root = createLayout();
+ assertEquals("test-layout", root.getCaption());
+ assertEquals("test-label", root.getComponent(0).getCaption());
+ assertEquals("test-button", root.getComponent(1).getCaption());
+ }
+
+ private CssLayout createLayout() {
+ DesignContext ctx = new DesignContext();
+ Element design = createDesign();
+ Component child = ctx.readDesign(design);
+ return (CssLayout) child;
+ }
+
+ private Element createDesign() {
+
+ Attributes rootAttributes = new Attributes();
+ rootAttributes.put("caption", "test-layout");
+ Element node = new Element(Tag.valueOf("v-css-layout"), "",
+ rootAttributes);
+
+ Attributes firstChildAttributes = new Attributes();
+ firstChildAttributes.put("caption", "test-label");
+ Element firstChild = new Element(Tag.valueOf("v-label"), "",
+ firstChildAttributes);
+ node.appendChild(firstChild);
+
+ Attributes secondChildAttributes = new Attributes();
+ Element secondChild = new Element(Tag.valueOf("v-button"), "",
+ secondChildAttributes);
+ secondChild.html("test-button");
+ node.appendChild(secondChild);
+ return node;
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/server/component/csslayout/TestWriteDesign.java b/server/tests/src/com/vaadin/tests/server/component/csslayout/TestWriteDesign.java
new file mode 100644
index 0000000000..d660eb77ec
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/server/component/csslayout/TestWriteDesign.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.server.component.csslayout;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+import org.jsoup.parser.Tag;
+
+import com.vaadin.ui.CssLayout;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ * Test case for writing CssLayout to design
+ *
+ * @author Vaadin Ltd
+ */
+public class TestWriteDesign extends TestCase {
+
+ public void testSynchronizeEmptyLayout() {
+ CssLayout layout = new CssLayout();
+ layout.setCaption("changed-caption");
+ Element design = createDesign();
+ layout.writeDesign(design, createDesignContext());
+ assertEquals(0, design.childNodes().size());
+ assertEquals("changed-caption", design.attr("caption"));
+ }
+
+ public void testSynchronizeLayoutWithChildren() {
+ CssLayout layout = new CssLayout();
+ layout.addComponent(new Label("test-label"));
+ layout.getComponent(0).setCaption("test-caption");
+ layout.addComponent(new Label("test-label-2"));
+ Element design = createDesign();
+ layout.writeDesign(design, createDesignContext());
+ assertEquals(2, design.childNodes().size());
+ assertEquals("v-label", ((Element) design.childNode(0)).tagName());
+ assertEquals("test-caption", design.childNode(0).attr("caption"));
+ }
+
+ private Element createDesign() {
+ // make sure that the design node has old content that should be removed
+ Attributes rootAttributes = new Attributes();
+ rootAttributes.put("caption", "test-layout");
+ Element node = new Element(Tag.valueOf("v-vertical-layout"), "",
+ rootAttributes);
+ Attributes firstChildAttributes = new Attributes();
+ firstChildAttributes.put("caption", "test-label");
+ Element firstChild = new Element(Tag.valueOf("v-label"), "",
+ firstChildAttributes);
+ node.appendChild(firstChild);
+
+ Element secondChild = new Element(Tag.valueOf("v-button"), "",
+ new Attributes());
+ secondChild.html("test-button");
+ node.appendChild(secondChild);
+ return node;
+ }
+
+ private DesignContext createDesignContext() {
+ return new DesignContext();
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/server/component/label/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/label/TestReadDesign.java
new file mode 100644
index 0000000000..3e577b5578
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/server/component/label/TestReadDesign.java
@@ -0,0 +1,102 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.server.component.label;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+import org.jsoup.parser.Tag;
+import org.junit.Test;
+
+import com.vaadin.ui.Label;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ *
+ * Test case for reading the contents of a Label from a design.
+ *
+ */
+public class TestReadDesign extends TestCase {
+
+ private DesignContext ctx;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ ctx = new DesignContext();
+ }
+
+ @Test
+ public void testWithContent() {
+ createAndTestLabel("A label", null);
+ }
+
+ @Test
+ public void testWithHtmlContent() {
+ createAndTestLabel("<b>A label</b>", null);
+ }
+
+ @Test
+ public void testWithContentAndCaption() {
+ createAndTestLabel("A label", "This is a label");
+ }
+
+ @Test
+ public void testWithCaption() {
+ createAndTestLabel(null, "This is a label");
+ }
+
+ @Test
+ public void testWithoutContentAndCaption() {
+ createAndTestLabel(null, null);
+ }
+
+ /*
+ * Test creating a Label. A Label can have both caption and content.
+ */
+ private void createAndTestLabel(String content, String caption) {
+ Element e = createElement("v-label", content, caption);
+ Label l = (Label) ctx.readDesign(e);
+ if (content != null) {
+ assertEquals("The label has wrong text content.", content,
+ l.getValue());
+ } else {
+ assertTrue("The label has wrong text content.",
+ l.getValue() == null || "".equals(l.getValue()));
+ }
+ if (caption != null) {
+ assertEquals("The label has wrong caption.", caption,
+ l.getCaption());
+ } else {
+ assertTrue("The label has wrong caption.", l.getCaption() == null
+ || "".equals(l.getCaption()));
+ }
+ }
+
+ private Element createElement(String elementName, String content,
+ String caption) {
+ Attributes attributes = new Attributes();
+ if (caption != null) {
+ attributes.put("caption", caption);
+ }
+ Element node = new Element(Tag.valueOf(elementName), "", attributes);
+ if (content != null) {
+ node.html(content);
+ }
+ return node;
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/server/component/label/TestWriteDesign.java b/server/tests/src/com/vaadin/tests/server/component/label/TestWriteDesign.java
new file mode 100644
index 0000000000..3368a7d22e
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/server/component/label/TestWriteDesign.java
@@ -0,0 +1,126 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.server.component.label;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+import org.jsoup.parser.Tag;
+import org.junit.Test;
+
+import com.vaadin.shared.ui.label.ContentMode;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ * Tests generating an html tree node corresponding to a Label.
+ */
+public class TestWriteDesign extends TestCase {
+
+ private DesignContext ctx;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ ctx = new DesignContext();
+ }
+
+ @Test
+ public void testWithContent() {
+ createAndTestLabel("A label", null);
+ }
+
+ @Test
+ public void testWithHtmlContent() {
+ createAndTestLabel("<b>A label</b>", null);
+ }
+
+ @Test
+ public void testWithCaption() {
+ createAndTestLabel(null, "Label caption");
+ }
+
+ @Test
+ public void testWithContentAndCaption() {
+ createAndTestLabel("A label", "Label caption");
+ }
+
+ @Test
+ public void testContentModeText() {
+ Label l = new Label("plain text label");
+ Element e = new Element(Tag.valueOf("v-label"), "", new Attributes());
+ l.writeDesign(e, ctx);
+ assertTrue("Label should be marked as plain text",
+ e.hasAttr("plain-text"));
+ }
+
+ @Test
+ public void testContentModeHtml() {
+ Label l = new Label("html label");
+ l.setContentMode(ContentMode.HTML);
+
+ Element e = new Element(Tag.valueOf("v-label"), "", new Attributes());
+ l.writeDesign(e, ctx);
+ assertFalse("Label should not be marked as plain text",
+ e.hasAttr("plain-text"));
+ }
+
+ @Test
+ public void testChangeContentMode() {
+ Label l = new Label("html label");
+ l.setContentMode(ContentMode.HTML);
+
+ Element e = new Element(Tag.valueOf("v-label"), "", new Attributes());
+ l.writeDesign(e, ctx);
+
+ assertFalse("Label should not be marked as plain text",
+ e.hasAttr("plain-text"));
+ l.setContentMode(ContentMode.TEXT);
+ l.writeDesign(e, ctx);
+
+ assertTrue("Label should be marked as plain text",
+ e.hasAttr("plain-text"));
+ }
+
+ @Test
+ public void testWithoutContentAndCaption() {
+ createAndTestLabel(null, null);
+ }
+
+ private void createAndTestLabel(String content, String caption) {
+ Label l = new Label(content);
+ if (caption != null) {
+ l.setCaption(caption);
+ }
+ Element e = ctx.createElement(l);
+ assertEquals("Wrong tag name for label.", "v-label", e.tagName());
+ if (content != null) {
+ assertEquals("Unexpected content in the v-label element.", content,
+ e.html());
+ } else {
+ assertTrue("Unexpected content in the v-label element.",
+ e.html() == null || "".equals(e.html()));
+ }
+ if (caption != null) {
+ assertEquals("Wrong caption in the v-label element.", caption,
+ e.attr("caption"));
+ } else {
+ assertTrue("Unexpected caption in the v-label element.",
+ e.attr("caption") == null || "".equals(e.attr("caption")));
+ }
+ }
+} \ No newline at end of file
diff --git a/server/tests/src/com/vaadin/tests/server/component/panel/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/panel/TestReadDesign.java
new file mode 100644
index 0000000000..3eb52309a8
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/server/component/panel/TestReadDesign.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.server.component.panel;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Element;
+import org.jsoup.parser.Tag;
+
+import com.vaadin.ui.Panel;
+import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.declarative.DesignContext;
+import com.vaadin.ui.declarative.DesignException;
+
+/**
+ * Test case for reading the attributes of a Panel from design.
+ *
+ * @author Vaadin Ltd
+ */
+public class TestReadDesign extends TestCase {
+ DesignContext ctx;
+
+ @Override
+ public void setUp() {
+ ctx = new DesignContext();
+ }
+
+ public void testAttributes() {
+ Element design = createDesign();
+ Panel panel = new Panel();
+ panel.readDesign(design, ctx);
+ assertEquals("A panel", panel.getCaption());
+ assertEquals(2, panel.getTabIndex());
+ assertEquals(10, panel.getScrollLeft());
+ assertEquals(20, panel.getScrollTop());
+ assertEquals(200f, panel.getWidth());
+ assertEquals(150f, panel.getHeight());
+ }
+
+ public void testChild() {
+ Element design = createDesign();
+ Panel panel = new Panel();
+ panel.readDesign(design, ctx);
+ VerticalLayout vLayout = (VerticalLayout) panel.getContent();
+ assertEquals(300f, vLayout.getWidth());
+ assertEquals(400f, vLayout.getHeight());
+ }
+
+ public void testWithMoreThanOneChild() {
+ Element design = createDesign();
+ // Add a new child to the panel element. An exception should be
+ // thrown when parsing the design.
+ Element newChild = new Element(Tag.valueOf("v-horizontal-layout"), "");
+ design.appendChild(newChild);
+ Panel panel = new Panel();
+ try {
+ panel.readDesign(design, ctx);
+ fail("Parsing a design containing a Panel with more than one child component should have failed.");
+ } catch (DesignException e) {
+ // Nothing needs to be done, this is the expected case.
+ }
+ }
+
+ /*
+ * Creates an html document that can be parsed into a valid component
+ * hierarchy.
+ */
+ private Element createDesign() {
+ // Create a node defining a Panel
+ Element panelElement = new Element(Tag.valueOf("v-panel"), "");
+ panelElement.attr("caption", "A panel");
+ panelElement.attr("tabindex", "2");
+ panelElement.attr("scroll-left", "10");
+ panelElement.attr("scroll-top", "20");
+ panelElement.attr("width", "200px");
+ panelElement.attr("height", "150px");
+ // Add some content to the panel
+ Element layoutElement = new Element(Tag.valueOf("v-vertical-layout"),
+ "");
+ layoutElement.attr("width", "300px");
+ layoutElement.attr("height", "400px");
+ panelElement.appendChild(layoutElement);
+ return panelElement;
+ }
+} \ No newline at end of file
diff --git a/server/tests/src/com/vaadin/tests/server/component/panel/TestWriteDesign.java b/server/tests/src/com/vaadin/tests/server/component/panel/TestWriteDesign.java
new file mode 100644
index 0000000000..f81193d511
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/server/component/panel/TestWriteDesign.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.server.component.panel;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Element;
+import org.jsoup.parser.Tag;
+
+import com.vaadin.ui.Panel;
+import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ * Test case for writing the attributes and the child element of a Panel to a
+ * design.
+ *
+ * @author Vaadin Ltd
+ */
+public class TestWriteDesign extends TestCase {
+ Element panelElement;
+
+ @Override
+ public void setUp() {
+ // create a component hierarchy
+ Panel panel = new Panel("A panel");
+ panel.setId("panelId");
+ panel.setHeight("250px");
+ panel.setScrollTop(50);
+ panel.setTabIndex(4);
+ VerticalLayout vLayout = new VerticalLayout();
+ vLayout.setWidth("500px");
+ panel.setContent(vLayout);
+ // synchronize to design
+ DesignContext ctx = new DesignContext();
+ panelElement = new Element(Tag.valueOf("div"), "");
+ panel.writeDesign(panelElement, ctx);
+ }
+
+ public void testAttributes() {
+ // should have caption, id, height, scroll top and tab index
+ assertEquals(5, panelElement.attributes().size());
+ // check the values of the attributes
+ assertEquals("A panel", panelElement.attr("caption"));
+ assertEquals("panelId", panelElement.attr("id"));
+ assertEquals("250px", panelElement.attr("height"));
+ assertEquals("50", panelElement.attr("scroll-top"));
+ assertEquals("4", panelElement.attr("tabindex"));
+ }
+
+ public void testChild() {
+ // the panel element should have exactly one child, a v-vertical-layout
+ assertEquals(1, panelElement.childNodes().size());
+ Element vLayoutElement = panelElement.child(0);
+ assertEquals("v-vertical-layout", vLayoutElement.nodeName());
+ assertEquals("500px", vLayoutElement.attr("width"));
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/server/component/tabsheet/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/tabsheet/TestReadDesign.java
new file mode 100644
index 0000000000..f7c4f16cdc
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/server/component/tabsheet/TestReadDesign.java
@@ -0,0 +1,132 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.server.component.tabsheet;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+import org.jsoup.parser.Tag;
+
+import com.vaadin.server.ExternalResource;
+import com.vaadin.ui.TabSheet;
+import com.vaadin.ui.TabSheet.Tab;
+import com.vaadin.ui.TextField;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ * Test case from reading TabSheet from design
+ *
+ * @since
+ * @author Vaadin Ltd
+ */
+public class TestReadDesign extends TestCase {
+
+ private TabSheet sheet;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ sheet = createTabSheet();
+ }
+
+ public void testChildCount() {
+ assertEquals(1, sheet.getComponentCount());
+ }
+
+ public void testTabIndex() {
+ assertEquals(5, sheet.getTabIndex());
+ }
+
+ public void testTabAttributes() {
+ Tab tab = sheet.getTab(0);
+ assertEquals("test-caption", tab.getCaption());
+ assertEquals(false, tab.isVisible());
+ assertEquals(false, tab.isClosable());
+ assertEquals(false, tab.isEnabled());
+ assertEquals("http://www.vaadin.com/test.png",
+ ((ExternalResource) tab.getIcon()).getURL());
+ assertEquals("OK", tab.getIconAlternateText());
+ assertEquals("test-desc", tab.getDescription());
+ assertEquals("test-style", tab.getStyleName());
+ assertEquals("test-id", tab.getId());
+ }
+
+ public void testSelectedComponent() {
+ TabSheet tabSheet = new TabSheet();
+ tabSheet.readDesign(createFirstTabSelectedDesign(), new DesignContext());
+ assertEquals(tabSheet.getTab(0).getComponent(),
+ tabSheet.getSelectedTab());
+ }
+
+ public void testTabContent() {
+ assertTrue("The child for the tabsheet should be textfield", sheet
+ .getTab(0).getComponent() instanceof TextField);
+ }
+
+ private TabSheet createTabSheet() {
+ TabSheet tabSheet = new TabSheet();
+ DesignContext ctx = new DesignContext();
+ Element design = createDesign();
+ tabSheet.readDesign(design, ctx);
+ return tabSheet;
+ }
+
+ private Element createDesign() {
+ // create root design
+ Attributes rootAttributes = new Attributes();
+ rootAttributes.put("tabindex", "5");
+ Element node = new Element(Tag.valueOf("v-tab-sheet"), "",
+ rootAttributes);
+ // create tab design
+ Attributes tabAttributes = new Attributes();
+ tabAttributes.put("caption", "test-caption");
+ tabAttributes.put("visible", "false");
+ tabAttributes.put("closable", "false");
+ tabAttributes.put("enabled", "false");
+ tabAttributes.put("icon", "http://www.vaadin.com/test.png");
+ tabAttributes.put("icon-alt", "OK");
+ tabAttributes.put("description", "test-desc");
+ tabAttributes.put("style-name", "test-style");
+ tabAttributes.put("id", "test-id");
+ Element tab = new Element(Tag.valueOf("tab"), "", tabAttributes);
+ // add child component to tab
+ tab.appendChild(new Element(Tag.valueOf("v-text-field"), "",
+ new Attributes()));
+ // add tab to root design
+ node.appendChild(tab);
+ return node;
+ }
+
+ private Element createFirstTabSelectedDesign() {
+ // create root design
+ Attributes rootAttributes = new Attributes();
+ Element node = new Element(Tag.valueOf("v-tab-sheet"), "",
+ rootAttributes);
+ // create tab design
+ Attributes tabAttributes = new Attributes();
+ tabAttributes.put("selected", "");
+ tabAttributes.put("caption", "test-caption");
+ Element tab = new Element(Tag.valueOf("tab"), "", tabAttributes);
+ // add child component to tab
+ tab.appendChild(new Element(Tag.valueOf("v-text-field"), "",
+ new Attributes()));
+ // add tab to root design
+ node.appendChild(tab);
+ return node;
+
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/server/component/tabsheet/TestWriteDesign.java b/server/tests/src/com/vaadin/tests/server/component/tabsheet/TestWriteDesign.java
new file mode 100644
index 0000000000..a46b33e2d6
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/server/component/tabsheet/TestWriteDesign.java
@@ -0,0 +1,109 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.server.component.tabsheet;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+import org.jsoup.parser.Tag;
+
+import com.vaadin.server.ExternalResource;
+import com.vaadin.ui.TabSheet;
+import com.vaadin.ui.TabSheet.Tab;
+import com.vaadin.ui.TextField;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ * Test case for writing TabSheet to design
+ *
+ * @since
+ * @author Vaadin Ltd
+ */
+public class TestWriteDesign extends TestCase {
+
+ private TabSheet sheet;
+ private Element design;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ sheet = createTabSheet();
+ design = createDesign();
+ sheet.writeDesign(design, createDesignContext());
+ }
+
+ public void testOnlyOneTab() {
+ assertEquals("There should be only one child", 1, design.children()
+ .size());
+ }
+
+ public void testAttributes() {
+ Element tabDesign = design.child(0);
+ assertEquals("5", design.attr("tabindex"));
+ assertEquals("test-caption", tabDesign.attr("caption"));
+ assertEquals("false", tabDesign.attr("visible"));
+ assertTrue(tabDesign.hasAttr("closable"));
+ assertTrue(tabDesign.attr("closable").equals("true")
+ || tabDesign.attr("closable").equals(""));
+ assertEquals("false", tabDesign.attr("enabled"));
+ assertEquals("http://www.vaadin.com/test.png", tabDesign.attr("icon"));
+ assertEquals("OK", tabDesign.attr("icon-alt"));
+ assertEquals("test-desc", tabDesign.attr("description"));
+ assertEquals("test-style", tabDesign.attr("style-name"));
+ assertEquals("test-id", tabDesign.attr("id"));
+ }
+
+ public void testContent() {
+ Element tabDesign = design.child(0);
+ Element content = tabDesign.child(0);
+ assertEquals("Tab must have only one child", 1, tabDesign.children()
+ .size());
+ assertEquals("v-text-field", content.tagName());
+ }
+
+ private Element createDesign() {
+ // make sure that the design node has old content that should be removed
+ Element node = new Element(Tag.valueOf("v-tab-sheet"), "",
+ new Attributes());
+ node.appendChild(new Element(Tag.valueOf("tab"), "", new Attributes()));
+ node.appendChild(new Element(Tag.valueOf("tab"), "", new Attributes()));
+ node.appendChild(new Element(Tag.valueOf("tab"), "", new Attributes()));
+ return node;
+ }
+
+ private DesignContext createDesignContext() {
+ return new DesignContext();
+ }
+
+ private TabSheet createTabSheet() {
+ TabSheet sheet = new TabSheet();
+ sheet.setTabIndex(5);
+ sheet.addTab(new TextField());
+ Tab tab = sheet.getTab(0);
+ tab.setCaption("test-caption");
+ tab.setVisible(false);
+ tab.setClosable(true);
+ tab.setEnabled(false);
+ tab.setIcon(new ExternalResource("http://www.vaadin.com/test.png"));
+ tab.setIconAlternateText("OK");
+ tab.setDescription("test-desc");
+ tab.setStyleName("test-style");
+ tab.setId("test-id");
+ return sheet;
+ }
+
+}
diff --git a/server/tests/src/com/vaadin/tests/server/component/textarea/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/textarea/TestReadDesign.java
new file mode 100644
index 0000000000..a31367008a
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/server/component/textarea/TestReadDesign.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.server.component.textarea;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+import org.jsoup.parser.Tag;
+
+import com.vaadin.ui.AbstractTextField;
+import com.vaadin.ui.TextArea;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ * Test case for reading the value of the TextField from design
+ *
+ * @author Vaadin Ltd
+ */
+public class TestReadDesign extends TestCase {
+ private DesignContext ctx;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ ctx = new DesignContext();
+ }
+
+ public void testValue() {
+ Element design = createDesign();
+ AbstractTextField component = getComponent();
+ component.readDesign(design, ctx);
+ assertEquals("test value", component.getValue());
+ }
+
+ private AbstractTextField getComponent() {
+ return new TextArea();
+ }
+
+ private Element createDesign() {
+ Attributes attributes = new Attributes();
+ Element node = new Element(Tag.valueOf("v-text-area"), "", attributes);
+ node.html("test value");
+ return node;
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/server/component/textarea/TestWriteDesign.java b/server/tests/src/com/vaadin/tests/server/component/textarea/TestWriteDesign.java
new file mode 100644
index 0000000000..01b0095fe9
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/server/component/textarea/TestWriteDesign.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.server.component.textarea;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+import org.jsoup.parser.Tag;
+
+import com.vaadin.ui.AbstractTextField;
+import com.vaadin.ui.TextArea;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ * Test case for writing the value of the TextField to design
+ *
+ * @author Vaadin Ltd
+ */
+public class TestWriteDesign extends TestCase {
+ private DesignContext ctx;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ ctx = new DesignContext();
+ }
+
+ public void testSynchronizeValue() {
+ Element design = createDesign();
+ AbstractTextField component = getComponent();
+ component.setValue("test value");
+ component.writeDesign(design, ctx);
+ assertEquals("test value", design.html());
+ assertFalse(design.hasAttr("value"));
+ }
+
+ private AbstractTextField getComponent() {
+ return new TextArea();
+ }
+
+ private Element createDesign() {
+ Attributes attr = new Attributes();
+ return new Element(Tag.valueOf("v-text-area"), "", attr);
+ }
+
+}
diff --git a/server/tests/src/com/vaadin/tests/server/component/textfield/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/textfield/TestReadDesign.java
new file mode 100644
index 0000000000..62cb1a53bc
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/server/component/textfield/TestReadDesign.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.server.component.textfield;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+import org.jsoup.parser.Tag;
+
+import com.vaadin.ui.AbstractTextField;
+import com.vaadin.ui.TextField;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ * Test case for reading the value of the TextField from design
+ *
+ * @author Vaadin Ltd
+ */
+public class TestReadDesign extends TestCase {
+ private DesignContext ctx;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ ctx = new DesignContext();
+ }
+
+ public void testValue() {
+ Element design = createDesign();
+ AbstractTextField component = getComponent();
+ component.readDesign(design, ctx);
+ assertEquals("test value", component.getValue());
+ }
+
+ private AbstractTextField getComponent() {
+ return new TextField();
+ }
+
+ private Element createDesign() {
+ Attributes attributes = new Attributes();
+ attributes.put("value", "test value");
+ Element node = new Element(Tag.valueOf("v-text-field"), "", attributes);
+ return node;
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/server/component/textfield/TestWriteDesign.java b/server/tests/src/com/vaadin/tests/server/component/textfield/TestWriteDesign.java
new file mode 100644
index 0000000000..479c94f6a8
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/server/component/textfield/TestWriteDesign.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.server.component.textfield;
+
+import junit.framework.TestCase;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+import org.jsoup.parser.Tag;
+
+import com.vaadin.ui.AbstractTextField;
+import com.vaadin.ui.TextField;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ * Test case for writing the value of the TextField to design
+ *
+ * @author Vaadin Ltd
+ */
+public class TestWriteDesign extends TestCase {
+ private DesignContext ctx;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ ctx = new DesignContext();
+ }
+
+ public void testSynchronizeValue() {
+ Element design = createDesign();
+ AbstractTextField component = getComponent();
+ component.setValue("test value");
+ component.writeDesign(design, ctx);
+ assertEquals("test value", design.attr("value"));
+ }
+
+ private AbstractTextField getComponent() {
+ return new TextField();
+ }
+
+ private Element createDesign() {
+ Attributes attr = new Attributes();
+ return new Element(Tag.valueOf("v-text-field"), "", attr);
+ }
+
+}
diff --git a/server/tests/src/com/vaadin/ui/CheckBoxTest.java b/server/tests/src/com/vaadin/ui/CheckBoxTest.java
new file mode 100644
index 0000000000..7d699998de
--- /dev/null
+++ b/server/tests/src/com/vaadin/ui/CheckBoxTest.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.ui;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import com.vaadin.data.util.ObjectProperty;
+
+public class CheckBoxTest {
+ @Test
+ public void initiallyEmpty() {
+ CheckBox tf = new CheckBox();
+ Assert.assertTrue(tf.isEmpty());
+ }
+
+ @Test
+ public void emptyAfterClearUsingPDS() {
+ CheckBox tf = new CheckBox();
+ tf.setPropertyDataSource(new ObjectProperty<Boolean>(Boolean.TRUE));
+ Assert.assertFalse(tf.isEmpty());
+ tf.clear();
+ Assert.assertTrue(tf.isEmpty());
+ }
+
+ @Test
+ public void emptyAfterClear() {
+ CheckBox tf = new CheckBox();
+ tf.setValue(true);
+ Assert.assertFalse(tf.isEmpty());
+ tf.clear();
+ Assert.assertTrue(tf.isEmpty());
+ }
+
+}
diff --git a/shared/src/com/vaadin/shared/AbstractComponentState.java b/shared/src/com/vaadin/shared/AbstractComponentState.java
index f144f9e48b..1c32a67c70 100644
--- a/shared/src/com/vaadin/shared/AbstractComponentState.java
+++ b/shared/src/com/vaadin/shared/AbstractComponentState.java
@@ -47,4 +47,5 @@ public class AbstractComponentState extends SharedState {
// TODO this could be an object with more information, but currently the UI
// only uses the message
public String errorMessage = null;
+ public boolean captionAsHtml = false;
}
diff --git a/shared/src/com/vaadin/shared/ui/button/ButtonState.java b/shared/src/com/vaadin/shared/ui/button/ButtonState.java
index e5b94d95c4..01ef9a038b 100644
--- a/shared/src/com/vaadin/shared/ui/button/ButtonState.java
+++ b/shared/src/com/vaadin/shared/ui/button/ButtonState.java
@@ -36,10 +36,6 @@ public class ButtonState extends TabIndexState {
public boolean disableOnClick = false;
@NoLayout
public int clickShortcutKeyCode = 0;
- /**
- * If caption should be rendered in HTML
- */
- public boolean htmlContentAllowed = false;
@NoLayout
public String iconAltText = "";
}
diff --git a/shared/src/com/vaadin/shared/ui/colorpicker/ColorPickerState.java b/shared/src/com/vaadin/shared/ui/colorpicker/ColorPickerState.java
index 978b9a8417..3fdce20ce7 100644
--- a/shared/src/com/vaadin/shared/ui/colorpicker/ColorPickerState.java
+++ b/shared/src/com/vaadin/shared/ui/colorpicker/ColorPickerState.java
@@ -36,5 +36,4 @@ public class ColorPickerState extends AbstractComponentState {
public boolean showDefaultCaption;
- public boolean htmlContentAllowed;
}
diff --git a/uitest/integration_tests.xml b/uitest/integration_tests.xml
index c0d73580bb..4469b58c24 100644
--- a/uitest/integration_tests.xml
+++ b/uitest/integration_tests.xml
@@ -146,12 +146,6 @@
<param name="target-server" value="tomcat8" />
</antcall>
</target>
- <target name="integration-test-tomcat5">
- <antcall target="run-generic-integration-test">
- <param name="startDelay" value="10" />
- <param name="target-server" value="tomcat5" />
- </antcall>
- </target>
<target name="integration-test-tomcat6">
<antcall target="run-generic-integration-test">
@@ -160,18 +154,6 @@
</antcall>
</target>
- <target name="integration-test-jetty5">
- <antcall target="run-generic-integration-test">
- <param name="target-server" value="jetty5" />
- </antcall>
- </target>
-
- <target name="integration-test-jetty6">
- <antcall target="run-generic-integration-test">
- <param name="target-server" value="jetty6" />
- </antcall>
- </target>
-
<target name="integration-test-jetty7">
<antcall target="run-generic-integration-test">
<param name="target-server" value="jetty7" />
@@ -233,13 +215,6 @@
</antcall>
</target>
- <target name="integration-test-glassfish2">
- <antcall target="run-generic-integration-test">
- <param name="startDelay" value="10" />
- <param name="target-server" value="glassfish2" />
- </antcall>
- </target>
-
<target name="integration-test-glassfish3">
<antcall target="run-generic-integration-test">
<param name="startDelay" value="10" />
@@ -434,7 +409,6 @@
<antcall target="integration-test-weblogic10" />
<antcall target="integration-test-weblogic12" />
<antcall target="integration-test-gatein3" />
- <antcall target="integration-test-glassfish2" />
<antcall target="integration-test-glassfish3" />
<antcall target="integration-test-glassfish4" />
<antcall target="integration-test-jboss4" />
@@ -443,12 +417,9 @@
<antcall target="integration-test-jboss7" />
<antcall target="integration-test-jboss-eap6" />
<antcall target="integration-test-wildfly8" />
- <antcall target="integration-test-jetty5" />
- <antcall target="integration-test-jetty6" />
<antcall target="integration-test-jetty7" />
<antcall target="integration-test-jetty8" />
<antcall target="integration-test-jetty9" />
- <antcall target="integration-test-tomcat5" />
<antcall target="integration-test-tomcat6" />
<antcall target="integration-test-tomcat7" />
<antcall target="integration-test-tomcat8" />
diff --git a/uitest/src/com/vaadin/tests/components/checkbox/CheckBoxNullValue.html b/uitest/src/com/vaadin/tests/components/checkbox/CheckBoxNullValue.html
deleted file mode 100644
index 9717ccec78..0000000000
--- a/uitest/src/com/vaadin/tests/components/checkbox/CheckBoxNullValue.html
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head profile="http://selenium-ide.openqa.org/profiles/test-case">
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<link rel="selenium.base" href="" />
-<title>CheckBoxNullValue</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
-<thead>
-<tr><td rowspan="1" colspan="3">CheckBoxNullValue</td></tr>
-</thead><tbody>
-<tr>
- <td>open</td>
- <td>/run/com.vaadin.tests.components.checkbox.CheckBoxNullValue?restartApplication</td>
- <td></td>
-</tr>
-<tr>
- <td>screenCapture</td>
- <td></td>
- <td>initial</td>
-</tr>
-<tr>
- <td>click</td>
- <td>vaadin=runcomvaadintestscomponentscheckboxCheckBoxNullValue::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VButton[0]/domChild[0]/domChild[0]</td>
- <td></td>
-</tr>
-<tr>
- <td>screenCapture</td>
- <td></td>
- <td>bothnull</td>
-</tr>
-<tr>
- <td>mouseClick</td>
- <td>vaadin=runcomvaadintestscomponentscheckboxCheckBoxNullValue::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VCheckBox[0]/domChild[0]</td>
- <td>6,5</td>
-</tr>
-<tr>
- <td>mouseClick</td>
- <td>vaadin=runcomvaadintestscomponentscheckboxCheckBoxNullValue::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VCheckBox[0]/domChild[0]</td>
- <td>7,4</td>
-</tr>
-<tr>
- <td>click</td>
- <td>vaadin=runcomvaadintestscomponentscheckboxCheckBoxNullValue::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VButton[0]/domChild[0]/domChild[0]</td>
- <td></td>
-</tr>
-<tr>
- <td>screenCapture</td>
- <td></td>
- <td>bothtrue</td>
-</tr>
-<tr>
- <td>mouseClick</td>
- <td>vaadin=runcomvaadintestscomponentscheckboxCheckBoxNullValue::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VCheckBox[0]/domChild[0]</td>
- <td>6,6</td>
-</tr>
-<tr>
- <td>mouseClick</td>
- <td>vaadin=runcomvaadintestscomponentscheckboxCheckBoxNullValue::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VCheckBox[0]/domChild[0]</td>
- <td>9,9</td>
-</tr>
-<tr>
- <td>click</td>
- <td>vaadin=runcomvaadintestscomponentscheckboxCheckBoxNullValue::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VButton[0]/domChild[0]/domChild[0]</td>
- <td></td>
-</tr>
-<tr>
- <td>screenCapture</td>
- <td></td>
- <td>bothfalse</td>
-</tr>
-
-</tbody></table>
-</body>
-</html>
diff --git a/uitest/src/com/vaadin/tests/components/checkbox/CheckBoxNullValueTest.java b/uitest/src/com/vaadin/tests/components/checkbox/CheckBoxNullValueTest.java
new file mode 100644
index 0000000000..63e5c3f080
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/checkbox/CheckBoxNullValueTest.java
@@ -0,0 +1,64 @@
+package com.vaadin.tests.components.checkbox;
+
+import java.util.List;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openqa.selenium.WebElement;
+
+import com.vaadin.testbench.By;
+import com.vaadin.testbench.elements.ButtonElement;
+import com.vaadin.testbench.elements.CheckBoxElement;
+import com.vaadin.tests.tb3.MultiBrowserTest;
+
+public class CheckBoxNullValueTest extends MultiBrowserTest {
+ @Test
+ public void testValidation() throws Exception {
+ openTestURL();
+ CheckBoxElement checkbox = $(CheckBoxElement.class).first();
+ CheckBoxElement requiredCheckbox = $(CheckBoxElement.class).caption(
+ "A required checkbox").first();
+
+ assertValid(checkbox, true);
+ assertValid(requiredCheckbox, true);
+ ButtonElement validate = $(ButtonElement.class).caption("Validate")
+ .first();
+ validate.click();
+
+ assertValid(checkbox, true);
+ assertValid(requiredCheckbox, false);
+
+ click(checkbox);
+ click(requiredCheckbox);
+ validate.click();
+
+ assertValid(checkbox, true);
+ assertValid(requiredCheckbox, true);
+
+ click(checkbox);
+ click(requiredCheckbox);
+ validate.click();
+ assertValid(checkbox, true);
+ assertValid(requiredCheckbox, false);
+
+ }
+
+ private void click(CheckBoxElement checkbox) {
+ checkbox.findElement(By.xpath("input")).click();
+
+ }
+
+ private void assertValid(CheckBoxElement checkbox, boolean valid) {
+ boolean hasIndicator = false;
+ List<WebElement> e = checkbox.findElements(By
+ .className("v-errorindicator"));
+ if (e.size() != 0) {
+ hasIndicator = e.get(0).isDisplayed();
+ }
+
+ Assert.assertEquals("Checkbox state should be "
+ + (valid ? "valid" : "invalid"), valid, !hasIndicator);
+
+ }
+
+}
diff --git a/uitest/src/com/vaadin/tests/components/textfield/AlternatingTextFields.java b/uitest/src/com/vaadin/tests/components/textfield/AlternatingTextFields.java
deleted file mode 100644
index 3eda11d999..0000000000
--- a/uitest/src/com/vaadin/tests/components/textfield/AlternatingTextFields.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright 2000-2014 Vaadin Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.tests.components.textfield;
-
-import com.vaadin.event.FieldEvents.TextChangeEvent;
-import com.vaadin.event.FieldEvents.TextChangeListener;
-import com.vaadin.server.VaadinRequest;
-import com.vaadin.tests.components.AbstractTestUI;
-import com.vaadin.ui.TextField;
-import com.vaadin.ui.VerticalLayout;
-
-/**
- * When two TextFields repeatedly disable each other, ensure that also their
- * input prompts are removed
- *
- * @since
- * @author Vaadin Ltd
- */
-public class AlternatingTextFields extends AbstractTestUI {
-
- public static final String FIRST_TEXTFIELD_INPUT_PROMPT = "Enter first data here";
- public static final String SECOND_TEXTFIELD_INPUT_PROMPT = "Enter second data here";
-
- @Override
- protected void setup(final VaadinRequest request) {
-
- VerticalLayout layout = new VerticalLayout();
- layout.setMargin(true);
- layout.setSpacing(true);
-
- final TextField firstTextField = createTextField("First",
- FIRST_TEXTFIELD_INPUT_PROMPT);
-
- final TextField secondTextField = createTextField("Second",
- SECOND_TEXTFIELD_INPUT_PROMPT);
-
- addTextChangeListener(firstTextField, secondTextField);
- addTextChangeListener(secondTextField, firstTextField);
-
- layout.addComponent(firstTextField);
- layout.addComponent(secondTextField);
-
- addComponent(layout);
- }
-
- private static TextField createTextField(String number, String inputPrompt) {
-
- String caption = " TextField with TextChangeListener";
-
- TextField textField = new TextField(number + caption);
- textField.setImmediate(true);
- textField.setInputPrompt(inputPrompt);
-
- return textField;
- }
-
- private void addTextChangeListener(TextField currentTextField,
- final TextField otherTextField) {
-
- final String otherDefaultPrompt = otherTextField.getInputPrompt();
- currentTextField.addTextChangeListener(new TextChangeListener() {
-
- @Override
- public void textChange(TextChangeEvent event) {
-
- String currentText = event.getText();
-
- if (currentText.isEmpty() || currentText == null) {
- // change other to default
-
- otherTextField.setInputPrompt(otherDefaultPrompt);
- otherTextField.setEnabled(true);
- } else {
- // change other to empty
-
- otherTextField.setInputPrompt(null);
- otherTextField.setEnabled(false);
- }
-
- }
- });
- }
-
- @Override
- protected String getTestDescription() {
- return "When two TextFields repeatedly disable each other, ensure that also their input prompts are removed";
- }
-
- @Override
- protected Integer getTicketNumber() {
- return 15144;
- }
-}
diff --git a/uitest/src/com/vaadin/tests/components/textfield/AlternatingTextFieldsTest.java b/uitest/src/com/vaadin/tests/components/textfield/AlternatingTextFieldsTest.java
deleted file mode 100644
index a7ee3fede2..0000000000
--- a/uitest/src/com/vaadin/tests/components/textfield/AlternatingTextFieldsTest.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Copyright 2000-2014 Vaadin Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.tests.components.textfield;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.List;
-
-import org.junit.Test;
-import org.openqa.selenium.Keys;
-import org.openqa.selenium.WebDriver;
-import org.openqa.selenium.support.ui.ExpectedCondition;
-
-import com.vaadin.testbench.elements.TextFieldElement;
-import com.vaadin.tests.tb3.MultiBrowserTest;
-
-public class AlternatingTextFieldsTest extends MultiBrowserTest {
-
- private String RANDOM_INPUT = "Some input here";
-
- private List<TextFieldElement> textfields;
-
- @Test
- public void testInputPrompt() {
- openTestURL();
-
- /*
- * Starting positions
- */
-
- createTextFields();
-
- // test that both input prompts exist in the beginning
- ensureTextFieldHasInputPrompt(0);
- ensureTextFieldHasInputPrompt(1);
-
- /*
- * Write on and empty the first TextField
- */
-
- // select first input prompt
- ensureSelectionClearsPrompt(0);
-
- // write on the first TextField
- ensureWritingDisablesOther(0);
-
- // empty the text on the first TextField
- ensureEmptyingAddsPromptAndEnablesOther(0);
-
- /*
- * Write on and empty the second TextField
- */
-
- // now select the second input prompt
- ensureSelectionClearsPrompt(1);
-
- // write on the second TextField
- ensureWritingDisablesOther(1);
-
- // empty the text on the second TextField
- ensureEmptyingAddsPromptAndEnablesOther(1);
-
- }
-
- private void ensureEmptyingAddsPromptAndEnablesOther(int index) {
- // remove the text from the TextField
- emptyTextField(index);
-
- // ensure that the TextField really is empty
- ensureTextFieldEmpty(index);
-
- // ensure that the other TextField has again been enabled and has an
- // input prompt
- if (index == 0) {
- ensureTextFieldIsEnabledAndHasInputPrompt(1);
- } else {
- ensureTextFieldIsEnabledAndHasInputPrompt(0);
- }
- }
-
- private void ensureWritingDisablesOther(int index) {
- // write some text to the TextField
- writeOnTextField(index);
-
- // ensure that the other TextField is disabled and has no input prompt
- if (index == 0) {
- ensureTextFieldDisabledAndEmpty(1);
- } else {
- ensureTextFieldDisabledAndEmpty(0);
- }
- }
-
- private void ensureSelectionClearsPrompt(int index) {
- // select the TextField
- textfields.get(index).click();
-
- // check that the the prompt was removed
- ensureTextFieldEmpty(index);
- }
-
- /**
- * Check that the TextField has no input prompt
- *
- * @since
- * @param index
- * The TextField to be inspected
- */
- private void ensureTextFieldEmpty(int index) {
-
- assertEquals("TextField " + index + " was not empty,", "", textfields
- .get(index).getValue());
- }
-
- /**
- * Check that the TextField has been enabled and has correct input prompt
- *
- * @since
- * @param index
- * the TextField to be inspected
- */
- private void ensureTextFieldIsEnabledAndHasInputPrompt(final int index) {
-
- waitUntil(new ExpectedCondition<Boolean>() {
-
- @Override
- public Boolean apply(WebDriver input) {
- return textfields.get(index).isEnabled();
- }
-
- @Override
- public String toString() {
- // Timed out after 10 seconds waiting for ...
- return "TextField " + index + " to be enabled";
- }
- });
-
- ensureTextFieldHasInputPrompt(index);
- }
-
- /**
- * Check that the TextField has the correct input prompt
- *
- * @since
- * @param index
- * The TextField to be inspected
- */
- private void ensureTextFieldHasInputPrompt(final int index) {
-
- if (index == 0) {
- assertEquals("Incorrect or missing prompt,",
- AlternatingTextFields.FIRST_TEXTFIELD_INPUT_PROMPT,
- textfields.get(index).getValue());
- } else {
- assertEquals("Incorrect or missing prompt,",
- AlternatingTextFields.SECOND_TEXTFIELD_INPUT_PROMPT,
- textfields.get(index).getValue());
- }
- }
-
- /**
- * Check that the TextField has been disabled and has no input prompt
- *
- * @since
- * @param index
- * The TextField to be inspected
- */
- private void ensureTextFieldDisabledAndEmpty(final int index) {
-
- waitUntil(new ExpectedCondition<Boolean>() {
-
- @Override
- public Boolean apply(WebDriver input) {
- return !textfields.get(index).isEnabled();
- }
-
- @Override
- public String toString() {
- // Timed out after 10 seconds waiting for ...
- return "TextField " + index + " to be disabled";
- }
- });
-
- ensureTextFieldEmpty(index);
- }
-
- private void createTextFields() {
- textfields = $(TextFieldElement.class).all();
- }
-
- private void writeOnTextField(int index) {
- textfields.get(index).sendKeys(RANDOM_INPUT);
- }
-
- private void emptyTextField(int index) {
- for (int i = 0; i < 15; i++) {
- textfields.get(index).sendKeys(Keys.BACK_SPACE);
- }
- }
-}
diff --git a/uitest/src/com/vaadin/tests/components/ui/DynamicViewport.java b/uitest/src/com/vaadin/tests/components/ui/DynamicViewport.java
new file mode 100644
index 0000000000..ca9ebcd451
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/ui/DynamicViewport.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.components.ui;
+
+import com.vaadin.annotations.ViewportGeneratorClass;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.server.ViewportGenerator;
+import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.tests.components.ui.DynamicViewport.MyViewportGenerator;
+import com.vaadin.ui.Label;
+
+@ViewportGeneratorClass(MyViewportGenerator.class)
+public class DynamicViewport extends AbstractTestUI {
+ public static class MyViewportGenerator implements ViewportGenerator {
+ @Override
+ public String getViewport(VaadinRequest request) {
+ String userAgent = request.getHeader("User-Agent");
+ System.out.println(userAgent);
+ if (userAgent == null || userAgent.contains("Chrome")) {
+ return null;
+ }
+ return userAgent;
+ }
+ }
+
+ @Override
+ protected void setup(VaadinRequest request) {
+ addComponent(new Label("I should have a dynamic viewport tag"));
+ }
+}
diff --git a/uitest/src/com/vaadin/tests/components/ui/DynamicViewportEmptyTest.java b/uitest/src/com/vaadin/tests/components/ui/DynamicViewportEmptyTest.java
new file mode 100644
index 0000000000..40ec937c1c
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/ui/DynamicViewportEmptyTest.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.components.ui;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.remote.DesiredCapabilities;
+
+import com.vaadin.tests.tb3.MultiBrowserTest;
+
+public class DynamicViewportEmptyTest extends MultiBrowserTest {
+
+ @Override
+ protected Class<?> getUIClass() {
+ return DynamicViewport.class;
+ }
+
+ @Override
+ public List<DesiredCapabilities> getBrowsersToTest() {
+ return Arrays.asList(Browser.CHROME.getDesiredCapabilities());
+ }
+
+ @Test
+ public void testGeneratedEmptyViewport() {
+ openTestURL();
+
+ List<WebElement> viewportElements = findElements(By
+ .cssSelector("meta[name=viewport]"));
+
+ Assert.assertTrue("There should be no viewport tags",
+ viewportElements.isEmpty());
+ }
+
+}
diff --git a/uitest/src/com/vaadin/tests/components/ui/DynamicViewportTest.java b/uitest/src/com/vaadin/tests/components/ui/DynamicViewportTest.java
new file mode 100644
index 0000000000..f1d9efdbd1
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/ui/DynamicViewportTest.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.components.ui;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebElement;
+
+import com.vaadin.tests.tb3.SingleBrowserTest;
+
+public class DynamicViewportTest extends SingleBrowserTest {
+
+ @Test
+ public void testGeneratedViewport() {
+ openTestURL();
+
+ WebElement viewportElement = findElement(By
+ .cssSelector("meta[name=viewport]"));
+
+ Assert.assertTrue(viewportElement.getAttribute("content").contains(
+ "PhantomJS"));
+ }
+}
diff --git a/uitest/src/com/vaadin/tests/components/ui/InvalidViewport.java b/uitest/src/com/vaadin/tests/components/ui/InvalidViewport.java
new file mode 100644
index 0000000000..9557a2d2b0
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/ui/InvalidViewport.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.components.ui;
+
+import com.vaadin.annotations.Viewport;
+import com.vaadin.annotations.ViewportGeneratorClass;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.tests.components.ui.DynamicViewport.MyViewportGenerator;
+import com.vaadin.ui.Label;
+
+@ViewportGeneratorClass(MyViewportGenerator.class)
+@Viewport("myViewport")
+public class InvalidViewport extends AbstractTestUI {
+
+ @Override
+ protected void setup(VaadinRequest request) {
+ addComponent(new Label(
+ "I shouldn't load because of conflicting viewport definitions"));
+
+ }
+
+}
diff --git a/uitest/src/com/vaadin/tests/components/ui/InvalidViewportTest.java b/uitest/src/com/vaadin/tests/components/ui/InvalidViewportTest.java
new file mode 100644
index 0000000000..9d0aac49f7
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/ui/InvalidViewportTest.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.components.ui;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebElement;
+
+import com.vaadin.tests.tb3.SingleBrowserTest;
+
+public class InvalidViewportTest extends SingleBrowserTest {
+
+ @Test
+ public void testInvalidViewport() {
+ openTestURL();
+
+ WebElement heading = findElement(By.tagName("h2"));
+
+ Assert.assertEquals("HTTP ERROR 500", heading.getText());
+ }
+
+}
diff --git a/uitest/src/com/vaadin/tests/components/ui/StaticViewport.java b/uitest/src/com/vaadin/tests/components/ui/StaticViewport.java
new file mode 100644
index 0000000000..813206dbe8
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/ui/StaticViewport.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.components.ui;
+
+import com.vaadin.annotations.Viewport;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.ui.Label;
+
+@Viewport("myViewport")
+public class StaticViewport extends AbstractTestUI {
+
+ @Override
+ protected void setup(VaadinRequest request) {
+ addComponent(new Label("I should have a static viewport tag"));
+ }
+
+}
diff --git a/uitest/src/com/vaadin/tests/components/ui/StaticViewportTest.java b/uitest/src/com/vaadin/tests/components/ui/StaticViewportTest.java
new file mode 100644
index 0000000000..61b3c944c9
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/ui/StaticViewportTest.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.components.ui;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebElement;
+
+import com.vaadin.tests.tb3.SingleBrowserTest;
+
+public class StaticViewportTest extends SingleBrowserTest {
+
+ @Test
+ public void testStaticViewport() {
+ openTestURL();
+
+ WebElement viewportElement = findElement(By
+ .cssSelector("meta[name=viewport]"));
+
+ Assert.assertEquals("myViewport",
+ viewportElement.getAttribute("content"));
+ }
+}
diff --git a/uitest/src/com/vaadin/tests/components/ui/UnnecessaryPaddingInResponsiveUI.java b/uitest/src/com/vaadin/tests/components/ui/UnnecessaryPaddingInResponsiveUI.java
new file mode 100644
index 0000000000..e80686f6f3
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/ui/UnnecessaryPaddingInResponsiveUI.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.components.ui;
+
+import com.vaadin.annotations.Theme;
+import com.vaadin.server.Responsive;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.CssLayout;
+import com.vaadin.ui.HorizontalLayout;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.UI;
+import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.themes.ValoTheme;
+
+/**
+ *
+ * @since
+ * @author Vaadin Ltd
+ */
+@Theme("valo")
+public class UnnecessaryPaddingInResponsiveUI extends UI {
+
+ @Override
+ protected void init(VaadinRequest request) {
+ Responsive.makeResponsive(this);
+
+ HorizontalLayout root = new HorizontalLayout();
+ root.setSpacing(true);
+
+ MenuLayout menu = new MenuLayout();
+
+ root.addComponent(menu);
+
+ setContent(root);
+
+ setWidth(799, Unit.PIXELS);
+ setId("UI");
+
+ // Uncomment this to enable responsive features in Valo Menu and
+ // introduce a padding-top to the UI. When this is commented the
+ // padding-top should be 0 and the related test should pass.
+
+ // addStyleName(ValoTheme.UI_WITH_MENU);
+ }
+
+ class MenuLayout extends VerticalLayout {
+ public MenuLayout() {
+ setSizeFull();
+ setPrimaryStyleName(ValoTheme.MENU_ROOT);
+
+ CssLayout titleLo = new CssLayout();
+ titleLo.addStyleName(ValoTheme.MENU_TITLE);
+ titleLo.addComponent(new Label("menu-title"));
+
+ addComponent(titleLo);
+
+ for (int i = 1; i <= 5; i++) {
+ Button button = new Button("Menu Item " + i);
+ button.setPrimaryStyleName(ValoTheme.MENU_ITEM);
+ addComponent(button);
+ }
+ }
+
+ }
+} \ No newline at end of file
diff --git a/uitest/src/com/vaadin/tests/components/ui/UnnecessaryPaddingInResponsiveUITest.java b/uitest/src/com/vaadin/tests/components/ui/UnnecessaryPaddingInResponsiveUITest.java
new file mode 100644
index 0000000000..661db179e7
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/ui/UnnecessaryPaddingInResponsiveUITest.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.components.ui;
+
+import static org.hamcrest.Matchers.equalTo;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Test;
+import org.openqa.selenium.WebElement;
+
+import com.vaadin.tests.tb3.SingleBrowserTest;
+
+/**
+ *
+ * @since
+ * @author Vaadin Ltd
+ */
+public class UnnecessaryPaddingInResponsiveUITest extends SingleBrowserTest {
+
+ @Test
+ public void testUIShouldHaveNoPaddingTop() {
+ openTestURL();
+
+ WebElement ui = vaadinElementById("UI");
+
+ String paddingTop = ui.getCssValue("padding-top");
+
+ Integer paddingHeight = Integer.parseInt(paddingTop.substring(0,
+ paddingTop.length() - 2));
+
+ assertThat(paddingHeight, equalTo(0));
+
+ }
+}
diff --git a/uitest/src/com/vaadin/tests/declarative/DeclarativeEditor.java b/uitest/src/com/vaadin/tests/declarative/DeclarativeEditor.java
new file mode 100644
index 0000000000..17942ee201
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/declarative/DeclarativeEditor.java
@@ -0,0 +1,133 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.declarative;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.tools.ant.filters.StringInputStream;
+
+import com.vaadin.annotations.Theme;
+import com.vaadin.data.Property.ReadOnlyException;
+import com.vaadin.data.Property.ValueChangeEvent;
+import com.vaadin.data.Property.ValueChangeListener;
+import com.vaadin.data.Property.ValueChangeNotifier;
+import com.vaadin.event.FieldEvents.TextChangeEvent;
+import com.vaadin.event.FieldEvents.TextChangeListener;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.ui.Component;
+import com.vaadin.ui.HasComponents;
+import com.vaadin.ui.HorizontalSplitPanel;
+import com.vaadin.ui.Panel;
+import com.vaadin.ui.TextArea;
+import com.vaadin.ui.UI;
+import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.declarative.Design;
+import com.vaadin.ui.declarative.DesignContext;
+
+@Theme("valo")
+public class DeclarativeEditor extends UI {
+
+ private VerticalLayout treeHolder;
+ private TextArea editor;
+ private DesignContext dc;
+ private boolean disableEvents = false;
+ private HorizontalSplitPanel main;
+
+ @Override
+ protected void init(VaadinRequest request) {
+ main = new HorizontalSplitPanel();
+ editor = new TextArea();
+ editor.setSizeFull();
+ try {
+ editor.setValue(IOUtils.toString(getClass().getResourceAsStream(
+ "DeclarativeEditorInitial.html")));
+ } catch (ReadOnlyException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ editor.addTextChangeListener(new TextChangeListener() {
+
+ @Override
+ public void textChange(TextChangeEvent event) {
+ editor.setComponentError(null);
+ updateTree(event.getText());
+ }
+ });
+
+ Panel editorPanel = new Panel(editor);
+ editorPanel.setSizeFull();
+ treeHolder = new VerticalLayout();
+ treeHolder.setSizeFull();
+
+ main.addComponents(editorPanel, treeHolder);
+ main.setSizeFull();
+
+ setContent(main);
+ updateTree(editor.getValue());
+ }
+
+ protected void updateTree(String string) {
+ if (disableEvents) {
+ return;
+ }
+
+ dc = Design.read(new StringInputStream(string), null);
+ treeHolder.removeAllComponents();
+ treeHolder.addComponent(dc.getRootComponent());
+
+ addValueChangeListeners(dc.getRootComponent());
+ }
+
+ protected void updateCode() {
+ if (disableEvents) {
+ return;
+ }
+
+ ByteArrayOutputStream o = new ByteArrayOutputStream();
+ try {
+ Design.write(treeHolder.getComponent(0), o);
+ disableEvents = true;
+ editor.setValue(o.toString("UTF-8"));
+ disableEvents = false;
+ } catch (IOException e1) {
+ e1.printStackTrace();
+ }
+
+ }
+
+ private void addValueChangeListeners(Component component) {
+ if (component instanceof ValueChangeNotifier) {
+ ((ValueChangeNotifier) component)
+ .addValueChangeListener(new ValueChangeListener() {
+ @Override
+ public void valueChange(ValueChangeEvent event) {
+ updateCode();
+ }
+ });
+ }
+
+ if (component instanceof HasComponents) {
+ for (Component c : ((HasComponents) component)) {
+ addValueChangeListeners(c);
+ }
+ }
+
+ }
+
+}
diff --git a/uitest/src/com/vaadin/tests/declarative/DeclarativeEditorInitial.html b/uitest/src/com/vaadin/tests/declarative/DeclarativeEditorInitial.html
new file mode 100644
index 0000000000..17f7d6aa59
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/declarative/DeclarativeEditorInitial.html
@@ -0,0 +1,23 @@
+<v-vertical-layout size-full margin spacing>
+ <v-horizontal-layout spacing margin width-full>
+ <v-label size-auto>POTUS Database</v-label>
+ <v-button :expand>Add new</v-button>
+ </v-horizontal-layout>
+ <v-table _id="potusList" :expand selectable size-full />
+ <v-vertical-layout _id="form" spacing margin>
+ <v-horizontal-layout spacing>
+ <v-text-field caption="First Name" width="300px" />
+ <v-text-field caption="Last Name" width="300px" />
+ </v-horizontal-layout>
+ <v-horizontal-layout spacing>
+ <v-combo-box caption="Party" width="300px" />
+ <v-popup-date-field caption="Took Office" />
+ <v-popup-date-field caption="Left Office" />
+ </v-horizontal-layout>
+ <v-horizontal-layout spacing width-full>
+ <v-button style-name="primary">Save</v-button>
+ <v-button>Revert</v-button>
+ <v-button :expand :right>Delete</v-button>
+ </v-horizontal-layout>
+ </v-vertical-layout>
+</v-vertical-layout> \ No newline at end of file
diff --git a/uitest/src/com/vaadin/tests/declarative/Potus.java b/uitest/src/com/vaadin/tests/declarative/Potus.java
new file mode 100644
index 0000000000..23448a9b7f
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/declarative/Potus.java
@@ -0,0 +1,107 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.declarative;
+
+import java.util.Date;
+
+/**
+ *
+ * @since
+ * @author Vaadin Ltd
+ */
+public class Potus {
+ private String firstName;
+ private String lastName;
+ private String party;
+ private Date tookOffice;
+ private Date leftOffice;
+
+ /**
+ * @return the firstName
+ */
+ public String getFirstName() {
+ return firstName;
+ }
+
+ /**
+ * @param firstName
+ * the firstName to set
+ */
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ /**
+ * @return the lastName
+ */
+ public String getLastName() {
+ return lastName;
+ }
+
+ /**
+ * @param lastName
+ * the lastName to set
+ */
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+ /**
+ * @return the party
+ */
+ public String getParty() {
+ return party;
+ }
+
+ /**
+ * @param party
+ * the party to set
+ */
+ public void setParty(String party) {
+ this.party = party;
+ }
+
+ /**
+ * @return the tookOffice
+ */
+ public Date getTookOffice() {
+ return tookOffice;
+ }
+
+ /**
+ * @param tookOffice
+ * the tookOffice to set
+ */
+ public void setTookOffice(Date tookOffice) {
+ this.tookOffice = tookOffice;
+ }
+
+ /**
+ * @return the leftOffice
+ */
+ public Date getLeftOffice() {
+ return leftOffice;
+ }
+
+ /**
+ * @param leftOffice
+ * the leftOffice to set
+ */
+ public void setLeftOffice(Date leftOffice) {
+ this.leftOffice = leftOffice;
+ }
+
+}
diff --git a/uitest/src/com/vaadin/tests/declarative/PotusCrud.html b/uitest/src/com/vaadin/tests/declarative/PotusCrud.html
new file mode 100644
index 0000000000..05acee9679
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/declarative/PotusCrud.html
@@ -0,0 +1,14 @@
+<head>
+ <meta name="package-mapping" content="x:com.vaadin.tests.declarative"/>
+</head>
+<body>
+ <v-vertical-layout size-full margin="true" spacing>
+ <v-horizontal-layout spacing margin width-full>
+ <v-label size-auto>POTUS Database</v-label>
+ <v-button :expand _id="addNew">Add new</v-button>
+ </v-horizontal-layout>
+ <v-table _id="potusList" :expand selectable size-full/>
+ <x-potus-form _id="potusForm" />
+ </v-vertical-layout>
+</body>
+
diff --git a/uitest/src/com/vaadin/tests/declarative/PotusCrud.java b/uitest/src/com/vaadin/tests/declarative/PotusCrud.java
new file mode 100644
index 0000000000..70ad956045
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/declarative/PotusCrud.java
@@ -0,0 +1,124 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.declarative;
+
+import com.vaadin.annotations.DesignRoot;
+import com.vaadin.data.Property.ValueChangeEvent;
+import com.vaadin.data.Property.ValueChangeListener;
+import com.vaadin.data.fieldgroup.FieldGroup;
+import com.vaadin.data.fieldgroup.FieldGroup.CommitException;
+import com.vaadin.data.util.BeanItemContainer;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.Table;
+import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.declarative.Design;
+
+@DesignRoot
+public class PotusCrud extends VerticalLayout {
+
+ public Table potusList;
+ public PotusForm potusForm;
+ public Button addNew;
+
+ private FieldGroup fg;
+
+ private BeanItemContainer<Potus> potusContainer = new BeanItemContainer<Potus>(
+ Potus.class);
+
+ public PotusCrud() {
+ Design.read(this);
+ init();
+ }
+
+ private void init() {
+ initTable();
+ initForm();
+ addNew.addClickListener(new Button.ClickListener() {
+ @Override
+ public void buttonClick(ClickEvent event) {
+ doAdd();
+ }
+ });
+ }
+
+ private void initTable() {
+ potusList.setContainerDataSource(potusContainer);
+ potusList.addValueChangeListener(new ValueChangeListener() {
+ @Override
+ public void valueChange(ValueChangeEvent event) {
+ doEdit();
+ }
+ });
+ }
+
+ private void initForm() {
+ potusForm.save.addClickListener(new Button.ClickListener() {
+ @Override
+ public void buttonClick(ClickEvent event) {
+ doSave();
+ }
+
+ });
+ potusForm.delete.addClickListener(new Button.ClickListener() {
+
+ @Override
+ public void buttonClick(ClickEvent event) {
+ doDelete();
+ }
+ });
+ potusForm.revert.addClickListener(new Button.ClickListener() {
+
+ @Override
+ public void buttonClick(ClickEvent event) {
+ doRevert();
+ }
+ });
+ fg = new FieldGroup();
+ }
+
+ protected void doRevert() {
+ fg.discard();
+ }
+
+ protected void doDelete() {
+ potusContainer.removeItem(potusList.getValue());
+ fg.setItemDataSource(null);
+ }
+
+ protected void doSave() {
+ try {
+ fg.commit();
+ } catch (CommitException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ protected void doAdd() {
+ potusContainer.addBean(new Potus());
+ }
+
+ protected void doEdit() {
+ if (potusList.getValue() != null) {
+ fg.setItemDataSource(potusList.getItem(potusList.getValue()));
+ fg.bindMemberFields(potusForm);
+ } else {
+ fg.setItemDataSource(null);
+ }
+ }
+
+}
diff --git a/uitest/src/com/vaadin/tests/declarative/PotusCrudUI.java b/uitest/src/com/vaadin/tests/declarative/PotusCrudUI.java
new file mode 100644
index 0000000000..f1d94f7f16
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/declarative/PotusCrudUI.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.declarative;
+
+import com.vaadin.annotations.Theme;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.ui.UI;
+
+/**
+ *
+ * @since
+ * @author Vaadin Ltd
+ */
+@Theme("valo")
+public class PotusCrudUI extends UI {
+
+ @Override
+ protected void init(VaadinRequest request) {
+ setContent(new PotusCrud());
+ }
+}
diff --git a/uitest/src/com/vaadin/tests/declarative/PotusForm.html b/uitest/src/com/vaadin/tests/declarative/PotusForm.html
new file mode 100644
index 0000000000..0542e1ee52
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/declarative/PotusForm.html
@@ -0,0 +1,16 @@
+<v-vertical-layout _id="form" spacing margin>
+ <v-horizontal-layout spacing>
+ <v-text-field _id="firstName" caption="First Name" null-representation="" width="300px" />
+ <v-text-field _id="lastName" caption="Last Name" null-representation="" width="300px" />
+ </v-horizontal-layout>
+ <v-horizontal-layout spacing>
+ <v-combo-box _id="party" caption="Party" width="300px" />
+ <v-popup-date-field _id="tookOffice" caption="Took Office" />
+ <v-popup-date-field _id="leftOffice" caption="Left Office" />
+ </v-horizontal-layout>
+ <v-horizontal-layout spacing width-full>
+ <v-button _id="save" style-name="primary">Save</v-button>
+ <v-button _id="revert">Revert</v-button>
+ <v-button _id="delete" style-name="danger" :expand :right>Delete</v-button>
+ </v-horizontal-layout>
+</v-vertical-layout> \ No newline at end of file
diff --git a/uitest/src/com/vaadin/tests/declarative/PotusForm.java b/uitest/src/com/vaadin/tests/declarative/PotusForm.java
new file mode 100644
index 0000000000..506a25f663
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/declarative/PotusForm.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.declarative;
+
+import com.vaadin.annotations.DesignRoot;
+import com.vaadin.data.fieldgroup.PropertyId;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.ComboBox;
+import com.vaadin.ui.PopupDateField;
+import com.vaadin.ui.TextField;
+import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.declarative.Design;
+
+@DesignRoot
+public class PotusForm extends VerticalLayout {
+
+ @PropertyId("firstName")
+ public TextField firstName;
+ @PropertyId("lastName")
+ public TextField lastName;
+ @PropertyId("party")
+ public ComboBox party;
+ @PropertyId("tookOffice")
+ public PopupDateField tookOffice;
+ @PropertyId("leftOffice")
+ public PopupDateField leftOffice;
+
+ public Button save;
+ public Button revert;
+ public Button delete;
+
+ public PotusForm() {
+ Design.read(this);
+ party.addItems("Democratic Party");
+ party.addItems("Republican Party");
+ party.addItems("Independent");
+ }
+}
diff --git a/uitest/src/com/vaadin/tests/layouts/CaptionsInLayouts.java b/uitest/src/com/vaadin/tests/layouts/CaptionsInLayouts.java
index 03c3c43ccd..74cfe12ad7 100644
--- a/uitest/src/com/vaadin/tests/layouts/CaptionsInLayouts.java
+++ b/uitest/src/com/vaadin/tests/layouts/CaptionsInLayouts.java
@@ -8,7 +8,8 @@ import com.vaadin.data.Property.ValueChangeEvent;
import com.vaadin.data.Property.ValueChangeListener;
import com.vaadin.server.ThemeResource;
import com.vaadin.server.UserError;
-import com.vaadin.tests.components.TestBase;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.AbstractField;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
@@ -25,7 +26,7 @@ import com.vaadin.ui.NativeSelect;
import com.vaadin.ui.TextField;
import com.vaadin.ui.VerticalLayout;
-public class CaptionsInLayouts extends TestBase {
+public class CaptionsInLayouts extends AbstractTestUI {
private static final Object CAPTION = "CAPTION";
private static final Object CLASS = "C";
@@ -42,7 +43,7 @@ public class CaptionsInLayouts extends TestBase {
private HorizontalLayout layoutParent = new HorizontalLayout();
@Override
- protected void setup() {
+ protected void setup(VaadinRequest request) {
// setTheme("tests-tickets");
addComponent(createLayoutSelect());
addComponent(toggleRequired());
@@ -270,7 +271,7 @@ public class CaptionsInLayouts extends TestBase {
}
@Override
- protected String getDescription() {
+ protected String getTestDescription() {
return "Tests what happens when the caption changes in various layouts. Behavior should be consistent.";
}
diff --git a/uitest/src/com/vaadin/tests/layouts/HtmlInCaption.java b/uitest/src/com/vaadin/tests/layouts/HtmlInCaption.java
new file mode 100644
index 0000000000..830b96b3d7
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/layouts/HtmlInCaption.java
@@ -0,0 +1,159 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.layouts;
+
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.ui.AbsoluteLayout;
+import com.vaadin.ui.AbstractComponent;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.CheckBox;
+import com.vaadin.ui.ColorPicker;
+import com.vaadin.ui.ColorPickerArea;
+import com.vaadin.ui.Component;
+import com.vaadin.ui.CssLayout;
+import com.vaadin.ui.Form;
+import com.vaadin.ui.GridLayout;
+import com.vaadin.ui.HorizontalLayout;
+import com.vaadin.ui.Link;
+import com.vaadin.ui.NativeButton;
+import com.vaadin.ui.Panel;
+import com.vaadin.ui.TextField;
+import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.Window;
+
+/**
+ *
+ * @since
+ * @author Vaadin Ltd
+ */
+public class HtmlInCaption extends AbstractTestUI {
+
+ @Override
+ protected void setup(VaadinRequest request) {
+ HorizontalLayout main = new HorizontalLayout();
+ addComponent(main);
+ VerticalLayout components = new VerticalLayout();
+ components.setId("components");
+ VerticalLayout layouts = new VerticalLayout();
+ layouts.setId("layouts");
+ main.addComponent(layouts);
+ main.addComponent(components);
+
+ createComponents(components);
+ createLayouts(layouts);
+
+ Window w = new Window();
+ w.setCaption(getTextCaption("Window"));
+ w.setPositionX(600);
+ addWindow(w);
+
+ w = new Window();
+ w.setCaptionAsHtml(true);
+ w.setCaption(getHtmlCaption("Window"));
+ w.setPositionX(600);
+ w.setPositionY(100);
+ addWindow(w);
+ }
+
+ private void createLayouts(VerticalLayout layouts) {
+ VerticalLayout vl = new VerticalLayout(tf(false), tf(true));
+ vl.setCaption("VerticalLayout");
+ layouts.addComponent(vl);
+
+ HorizontalLayout hl = new HorizontalLayout(tf(false), tf(true));
+ hl.setCaption("HorizontalLayout");
+ layouts.addComponent(hl);
+
+ GridLayout gl = new GridLayout(2, 1);
+ gl.setCaption("GridLayout");
+ gl.addComponents(tf(false), tf(true));
+ layouts.addComponent(gl);
+
+ CssLayout cl = new CssLayout();
+ cl.setCaption("CssLayout");
+ cl.addComponents(tf(false), tf(true));
+ layouts.addComponent(cl);
+
+ AbsoluteLayout al = new AbsoluteLayout();
+ al.setCaption("AbsoluteLayout");
+ al.setWidth("300px");
+ al.setHeight("200px");
+ al.addComponent(tf(false), "top:30px");
+ al.addComponent(tf(true), "top: 100px");
+ layouts.addComponent(al);
+ }
+
+ private void createComponents(VerticalLayout components) {
+ createComponent(components, Button.class);
+ createComponent(components, NativeButton.class);
+ createComponent(components, CheckBox.class);
+ createComponent(components, Link.class);
+
+ createComponent(components, Panel.class);
+ createComponent(components, ColorPicker.class);
+ createComponent(components, ColorPickerArea.class);
+ createComponent(components, Form.class);
+
+ }
+
+ private void createComponent(VerticalLayout components,
+ Class<? extends AbstractComponent> class1) {
+ AbstractComponent ac;
+ try {
+ ac = class1.newInstance();
+ ac.setCaption(getTextCaption(class1.getSimpleName()));
+ components.addComponent(ac);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ try {
+ ac = class1.newInstance();
+ ac.setCaption(getHtmlCaption(class1.getSimpleName()));
+ ac.setCaptionAsHtml(true);
+ components.addComponent(ac);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ private Component tf(boolean htmlCaption) {
+ TextField tf = new TextField();
+ if (htmlCaption) {
+ tf.setCaptionAsHtml(htmlCaption);
+ tf.setCaption(getHtmlCaption(""));
+ } else {
+ tf.setCaption(getTextCaption(""));
+ }
+ return tf;
+ }
+
+ private String getTextCaption(String string) {
+ return "<b>Plain text " + string + "</b>";
+ }
+
+ private String getHtmlCaption(String string) {
+ return "<b><font color='red'>HTML " + string + "</font></b>";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 9426;
+ }
+
+}
diff --git a/uitest/src/com/vaadin/tests/push/TrackMessageSizeUI.java b/uitest/src/com/vaadin/tests/push/TrackMessageSizeUI.java
index e7a74775bf..182a2e67e4 100644
--- a/uitest/src/com/vaadin/tests/push/TrackMessageSizeUI.java
+++ b/uitest/src/com/vaadin/tests/push/TrackMessageSizeUI.java
@@ -30,6 +30,7 @@ import com.vaadin.server.VaadinService;
import com.vaadin.server.VaadinServletService;
import com.vaadin.tests.components.AbstractTestUIWithLog;
import com.vaadin.ui.JavaScriptFunction;
+
import elemental.json.JsonArray;
// Load vaadinPush.js so that jQueryVaadin is defined
@@ -39,7 +40,7 @@ public class TrackMessageSizeUI extends AbstractTestUIWithLog {
private String testMethod = "function testSequence(expected, data) {\n"
+ " var request = {trackMessageLength: true, messageDelimiter: '|'};\n"
+ " _request = {trackMessageLength: true, messageDelimiter: '|'};\n"
- + " _handleProtocol = function(a,b) {return true;};"
+ + " _handleProtocol = function(a,message) {return message;};"
+ " var response = {partialMessage: ''};\n"
+ " var messages = [];\n"
+ " for(var i = 0; i < data.length; i++) {\n"
diff --git a/uitest/src/com/vaadin/tests/VerifyBrowserVersion.html b/uitest/tb2/com/vaadin/tests/VerifyBrowserVersion.html
index 8313eceeab..8313eceeab 100644
--- a/uitest/src/com/vaadin/tests/VerifyBrowserVersion.html
+++ b/uitest/tb2/com/vaadin/tests/VerifyBrowserVersion.html
diff --git a/uitest/src/com/vaadin/tests/application/DeploymentConfigurationTest.html b/uitest/tb2/com/vaadin/tests/application/DeploymentConfigurationTest.html
index 2bdb7c79a5..2bdb7c79a5 100644
--- a/uitest/src/com/vaadin/tests/application/DeploymentConfigurationTest.html
+++ b/uitest/tb2/com/vaadin/tests/application/DeploymentConfigurationTest.html
diff --git a/uitest/src/com/vaadin/tests/application/DetachOldUIOnReload.html b/uitest/tb2/com/vaadin/tests/application/DetachOldUIOnReload.html
index 33fc46f060..33fc46f060 100644
--- a/uitest/src/com/vaadin/tests/application/DetachOldUIOnReload.html
+++ b/uitest/tb2/com/vaadin/tests/application/DetachOldUIOnReload.html
diff --git a/uitest/src/com/vaadin/tests/application/ErrorInUnloadEvent.html b/uitest/tb2/com/vaadin/tests/application/ErrorInUnloadEvent.html
index ee200d7f5c..ee200d7f5c 100644
--- a/uitest/src/com/vaadin/tests/application/ErrorInUnloadEvent.html
+++ b/uitest/tb2/com/vaadin/tests/application/ErrorInUnloadEvent.html
diff --git a/uitest/src/com/vaadin/tests/application/RefreshFragmentChange.html b/uitest/tb2/com/vaadin/tests/application/RefreshFragmentChange.html
index 147e67f19d..147e67f19d 100644
--- a/uitest/src/com/vaadin/tests/application/RefreshFragmentChange.html
+++ b/uitest/tb2/com/vaadin/tests/application/RefreshFragmentChange.html
diff --git a/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.html b/uitest/tb2/com/vaadin/tests/application/RefreshStatePreserve.html
index ea8c0c93b6..ea8c0c93b6 100644
--- a/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.html
+++ b/uitest/tb2/com/vaadin/tests/application/RefreshStatePreserve.html
diff --git a/uitest/src/com/vaadin/tests/application/RefreshStatePreserveTitle.html b/uitest/tb2/com/vaadin/tests/application/RefreshStatePreserveTitle.html
index f366054f45..f366054f45 100644
--- a/uitest/src/com/vaadin/tests/application/RefreshStatePreserveTitle.html
+++ b/uitest/tb2/com/vaadin/tests/application/RefreshStatePreserveTitle.html
diff --git a/uitest/src/com/vaadin/tests/application/TerminalErrorNotification.html b/uitest/tb2/com/vaadin/tests/application/TerminalErrorNotification.html
index e7d437eeca..e7d437eeca 100644
--- a/uitest/src/com/vaadin/tests/application/TerminalErrorNotification.html
+++ b/uitest/tb2/com/vaadin/tests/application/TerminalErrorNotification.html
diff --git a/uitest/src/com/vaadin/tests/application/ThreadLocalInstances.html b/uitest/tb2/com/vaadin/tests/application/ThreadLocalInstances.html
index 0d3a746152..0d3a746152 100644
--- a/uitest/src/com/vaadin/tests/application/ThreadLocalInstances.html
+++ b/uitest/tb2/com/vaadin/tests/application/ThreadLocalInstances.html
diff --git a/uitest/src/com/vaadin/tests/application/VaadinSessionAttribute.html b/uitest/tb2/com/vaadin/tests/application/VaadinSessionAttribute.html
index 150ab3ff3d..150ab3ff3d 100644
--- a/uitest/src/com/vaadin/tests/application/VaadinSessionAttribute.html
+++ b/uitest/tb2/com/vaadin/tests/application/VaadinSessionAttribute.html
diff --git a/uitest/src/com/vaadin/tests/application/WebBrowserSizeTest.html b/uitest/tb2/com/vaadin/tests/application/WebBrowserSizeTest.html
index 3c59c7a953..3c59c7a953 100644
--- a/uitest/src/com/vaadin/tests/application/WebBrowserSizeTest.html
+++ b/uitest/tb2/com/vaadin/tests/application/WebBrowserSizeTest.html
diff --git a/uitest/src/com/vaadin/tests/application/WebBrowserTest.html b/uitest/tb2/com/vaadin/tests/application/WebBrowserTest.html
index f04dd564bf..f04dd564bf 100644
--- a/uitest/src/com/vaadin/tests/application/WebBrowserTest.html
+++ b/uitest/tb2/com/vaadin/tests/application/WebBrowserTest.html
diff --git a/uitest/src/com/vaadin/tests/applicationcontext/ChangeSessionId.html b/uitest/tb2/com/vaadin/tests/applicationcontext/ChangeSessionId.html
index 6bf4041a93..6bf4041a93 100644
--- a/uitest/src/com/vaadin/tests/applicationcontext/ChangeSessionId.html
+++ b/uitest/tb2/com/vaadin/tests/applicationcontext/ChangeSessionId.html
diff --git a/uitest/src/com/vaadin/tests/applicationcontext/CloseSession.html b/uitest/tb2/com/vaadin/tests/applicationcontext/CloseSession.html
index eb6e7681e6..eb6e7681e6 100644
--- a/uitest/src/com/vaadin/tests/applicationcontext/CloseSession.html
+++ b/uitest/tb2/com/vaadin/tests/applicationcontext/CloseSession.html
diff --git a/uitest/src/com/vaadin/tests/applicationcontext/RpcForClosedUI.html b/uitest/tb2/com/vaadin/tests/applicationcontext/RpcForClosedUI.html
index 642e31b22c..642e31b22c 100644
--- a/uitest/src/com/vaadin/tests/applicationcontext/RpcForClosedUI.html
+++ b/uitest/tb2/com/vaadin/tests/applicationcontext/RpcForClosedUI.html
diff --git a/uitest/src/com/vaadin/tests/applicationservlet/MultipleServletConfiguration.html b/uitest/tb2/com/vaadin/tests/applicationservlet/MultipleServletConfiguration.html
index 3b4452cc8d..3b4452cc8d 100644
--- a/uitest/src/com/vaadin/tests/applicationservlet/MultipleServletConfiguration.html
+++ b/uitest/tb2/com/vaadin/tests/applicationservlet/MultipleServletConfiguration.html
diff --git a/uitest/src/com/vaadin/tests/applicationservlet/SystemMessagesTest.html b/uitest/tb2/com/vaadin/tests/applicationservlet/SystemMessagesTest.html
index a764255b5b..a764255b5b 100644
--- a/uitest/src/com/vaadin/tests/applicationservlet/SystemMessagesTest.html
+++ b/uitest/tb2/com/vaadin/tests/applicationservlet/SystemMessagesTest.html
diff --git a/uitest/src/com/vaadin/tests/browserfeatures/FullHeightScrollbar.html b/uitest/tb2/com/vaadin/tests/browserfeatures/FullHeightScrollbar.html
index 37fee35746..37fee35746 100644
--- a/uitest/src/com/vaadin/tests/browserfeatures/FullHeightScrollbar.html
+++ b/uitest/tb2/com/vaadin/tests/browserfeatures/FullHeightScrollbar.html
diff --git a/uitest/src/com/vaadin/tests/browserfeatures/WebkitScrollbarTest.html b/uitest/tb2/com/vaadin/tests/browserfeatures/WebkitScrollbarTest.html
index a5296b8b4d..a5296b8b4d 100644
--- a/uitest/src/com/vaadin/tests/browserfeatures/WebkitScrollbarTest.html
+++ b/uitest/tb2/com/vaadin/tests/browserfeatures/WebkitScrollbarTest.html
diff --git a/uitest/src/com/vaadin/tests/componentlocator/TestDetachedNotPresent.html b/uitest/tb2/com/vaadin/tests/componentlocator/TestDetachedNotPresent.html
index 18129a72e2..18129a72e2 100644
--- a/uitest/src/com/vaadin/tests/componentlocator/TestDetachedNotPresent.html
+++ b/uitest/tb2/com/vaadin/tests/componentlocator/TestDetachedNotPresent.html
diff --git a/uitest/src/com/vaadin/tests/components/AddRemoveSetStyleNamesTest.html b/uitest/tb2/com/vaadin/tests/components/AddRemoveSetStyleNamesTest.html
index 512140cc6d..512140cc6d 100644
--- a/uitest/src/com/vaadin/tests/components/AddRemoveSetStyleNamesTest.html
+++ b/uitest/tb2/com/vaadin/tests/components/AddRemoveSetStyleNamesTest.html
diff --git a/uitest/src/com/vaadin/tests/components/AddressFormExample.html b/uitest/tb2/com/vaadin/tests/components/AddressFormExample.html
index 5f1893a33c..5f1893a33c 100644
--- a/uitest/src/com/vaadin/tests/components/AddressFormExample.html
+++ b/uitest/tb2/com/vaadin/tests/components/AddressFormExample.html
diff --git a/uitest/src/com/vaadin/tests/components/DisableEnableCascade.html b/uitest/tb2/com/vaadin/tests/components/DisableEnableCascade.html
index 029da64754..029da64754 100644
--- a/uitest/src/com/vaadin/tests/components/DisableEnableCascade.html
+++ b/uitest/tb2/com/vaadin/tests/components/DisableEnableCascade.html
diff --git a/uitest/src/com/vaadin/tests/components/DisableEnableCascadeStyles.html b/uitest/tb2/com/vaadin/tests/components/DisableEnableCascadeStyles.html
index ac3a4f0cb0..ac3a4f0cb0 100644
--- a/uitest/src/com/vaadin/tests/components/DisableEnableCascadeStyles.html
+++ b/uitest/tb2/com/vaadin/tests/components/DisableEnableCascadeStyles.html
diff --git a/uitest/src/com/vaadin/tests/components/ErrorMessages.html b/uitest/tb2/com/vaadin/tests/components/ErrorMessages.html
index 2b7032ea79..2b7032ea79 100644
--- a/uitest/src/com/vaadin/tests/components/ErrorMessages.html
+++ b/uitest/tb2/com/vaadin/tests/components/ErrorMessages.html
diff --git a/uitest/src/com/vaadin/tests/components/FileDownloaderTest.html b/uitest/tb2/com/vaadin/tests/components/FileDownloaderTest.html
index bfe87091cc..bfe87091cc 100644
--- a/uitest/src/com/vaadin/tests/components/FileDownloaderTest.html
+++ b/uitest/tb2/com/vaadin/tests/components/FileDownloaderTest.html
diff --git a/uitest/src/com/vaadin/tests/components/HierarchyChangeForRemovedComponentContainers.html b/uitest/tb2/com/vaadin/tests/components/HierarchyChangeForRemovedComponentContainers.html
index 49b02d3f01..49b02d3f01 100644
--- a/uitest/src/com/vaadin/tests/components/HierarchyChangeForRemovedComponentContainers.html
+++ b/uitest/tb2/com/vaadin/tests/components/HierarchyChangeForRemovedComponentContainers.html
diff --git a/uitest/src/com/vaadin/tests/components/LayoutAttachListenerInfo.html b/uitest/tb2/com/vaadin/tests/components/LayoutAttachListenerInfo.html
index 10dd21d240..10dd21d240 100644
--- a/uitest/src/com/vaadin/tests/components/LayoutAttachListenerInfo.html
+++ b/uitest/tb2/com/vaadin/tests/components/LayoutAttachListenerInfo.html
diff --git a/uitest/src/com/vaadin/tests/components/OutOfSyncTest.html b/uitest/tb2/com/vaadin/tests/components/OutOfSyncTest.html
index 4828069e2a..4828069e2a 100644
--- a/uitest/src/com/vaadin/tests/components/OutOfSyncTest.html
+++ b/uitest/tb2/com/vaadin/tests/components/OutOfSyncTest.html
diff --git a/uitest/src/com/vaadin/tests/components/TooltipsOnScrollingWindow.html b/uitest/tb2/com/vaadin/tests/components/TooltipsOnScrollingWindow.html
index b251cdf03b..b251cdf03b 100644
--- a/uitest/src/com/vaadin/tests/components/TooltipsOnScrollingWindow.html
+++ b/uitest/tb2/com/vaadin/tests/components/TooltipsOnScrollingWindow.html
diff --git a/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutClipping.html b/uitest/tb2/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutClipping.html
index ff5c890abf..ff5c890abf 100644
--- a/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutClipping.html
+++ b/uitest/tb2/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutClipping.html
diff --git a/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutCorrectPositioningOfHiddenField.html b/uitest/tb2/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutCorrectPositioningOfHiddenField.html
index f00d6b15f9..f00d6b15f9 100644
--- a/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutCorrectPositioningOfHiddenField.html
+++ b/uitest/tb2/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutCorrectPositioningOfHiddenField.html
diff --git a/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutPrimaryStylename.html b/uitest/tb2/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutPrimaryStylename.html
index fccbb29b8b..fccbb29b8b 100644
--- a/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutPrimaryStylename.html
+++ b/uitest/tb2/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutPrimaryStylename.html
diff --git a/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutResizing.html b/uitest/tb2/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutResizing.html
index 01206b317c..01206b317c 100644
--- a/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutResizing.html
+++ b/uitest/tb2/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutResizing.html
diff --git a/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutWrapperStyles.html b/uitest/tb2/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutWrapperStyles.html
index 1b92e3cdc5..1b92e3cdc5 100644
--- a/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutWrapperStyles.html
+++ b/uitest/tb2/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutWrapperStyles.html
diff --git a/uitest/src/com/vaadin/tests/components/absolutelayout/MoveComponentFromAbsoluteLayoutToInnerLayout.html b/uitest/tb2/com/vaadin/tests/components/absolutelayout/MoveComponentFromAbsoluteLayoutToInnerLayout.html
index bb74775912..bb74775912 100644
--- a/uitest/src/com/vaadin/tests/components/absolutelayout/MoveComponentFromAbsoluteLayoutToInnerLayout.html
+++ b/uitest/tb2/com/vaadin/tests/components/absolutelayout/MoveComponentFromAbsoluteLayoutToInnerLayout.html
diff --git a/uitest/src/com/vaadin/tests/components/abstractcomponent/EnableState.html b/uitest/tb2/com/vaadin/tests/components/abstractcomponent/EnableState.html
index dacd5c5009..dacd5c5009 100644
--- a/uitest/src/com/vaadin/tests/components/abstractcomponent/EnableState.html
+++ b/uitest/tb2/com/vaadin/tests/components/abstractcomponent/EnableState.html
diff --git a/uitest/src/com/vaadin/tests/components/abstractcomponent/RemSizeUnitTest.html b/uitest/tb2/com/vaadin/tests/components/abstractcomponent/RemSizeUnitTest.html
index 0bdde03ec7..0bdde03ec7 100644
--- a/uitest/src/com/vaadin/tests/components/abstractcomponent/RemSizeUnitTest.html
+++ b/uitest/tb2/com/vaadin/tests/components/abstractcomponent/RemSizeUnitTest.html
diff --git a/uitest/src/com/vaadin/tests/components/abstractcomponent/TooltipTests.html b/uitest/tb2/com/vaadin/tests/components/abstractcomponent/TooltipTests.html
index 3cea965690..3cea965690 100644
--- a/uitest/src/com/vaadin/tests/components/abstractcomponent/TooltipTests.html
+++ b/uitest/tb2/com/vaadin/tests/components/abstractcomponent/TooltipTests.html
diff --git a/uitest/src/com/vaadin/tests/components/abstractcomponent/UseStateFromHierarchy.html b/uitest/tb2/com/vaadin/tests/components/abstractcomponent/UseStateFromHierarchy.html
index 225b901413..225b901413 100644
--- a/uitest/src/com/vaadin/tests/components/abstractcomponent/UseStateFromHierarchy.html
+++ b/uitest/tb2/com/vaadin/tests/components/abstractcomponent/UseStateFromHierarchy.html
diff --git a/uitest/src/com/vaadin/tests/components/abstractembedded/EmbeddedWithNullSource.html b/uitest/tb2/com/vaadin/tests/components/abstractembedded/EmbeddedWithNullSource.html
index 37186bd901..37186bd901 100644
--- a/uitest/src/com/vaadin/tests/components/abstractembedded/EmbeddedWithNullSource.html
+++ b/uitest/tb2/com/vaadin/tests/components/abstractembedded/EmbeddedWithNullSource.html
diff --git a/uitest/src/com/vaadin/tests/components/abstractfield/AbstractFieldCommitWithInvalidValues.html b/uitest/tb2/com/vaadin/tests/components/abstractfield/AbstractFieldCommitWithInvalidValues.html
index 6a47032545..6a47032545 100644
--- a/uitest/src/com/vaadin/tests/components/abstractfield/AbstractFieldCommitWithInvalidValues.html
+++ b/uitest/tb2/com/vaadin/tests/components/abstractfield/AbstractFieldCommitWithInvalidValues.html
diff --git a/uitest/src/com/vaadin/tests/components/abstractfield/AbstractFieldDataSourceReadOnly.html b/uitest/tb2/com/vaadin/tests/components/abstractfield/AbstractFieldDataSourceReadOnly.html
index f99bdea946..f99bdea946 100644
--- a/uitest/src/com/vaadin/tests/components/abstractfield/AbstractFieldDataSourceReadOnly.html
+++ b/uitest/tb2/com/vaadin/tests/components/abstractfield/AbstractFieldDataSourceReadOnly.html
diff --git a/uitest/src/com/vaadin/tests/components/abstractfield/RequiredIndicatorForFieldsWithoutCaption.html b/uitest/tb2/com/vaadin/tests/components/abstractfield/RequiredIndicatorForFieldsWithoutCaption.html
index bc013f42ef..bc013f42ef 100644
--- a/uitest/src/com/vaadin/tests/components/abstractfield/RequiredIndicatorForFieldsWithoutCaption.html
+++ b/uitest/tb2/com/vaadin/tests/components/abstractfield/RequiredIndicatorForFieldsWithoutCaption.html
diff --git a/uitest/src/com/vaadin/tests/components/accordion/AccordionInactiveTabSize.html b/uitest/tb2/com/vaadin/tests/components/accordion/AccordionInactiveTabSize.html
index 9023c97cda..9023c97cda 100644
--- a/uitest/src/com/vaadin/tests/components/accordion/AccordionInactiveTabSize.html
+++ b/uitest/tb2/com/vaadin/tests/components/accordion/AccordionInactiveTabSize.html
diff --git a/uitest/src/com/vaadin/tests/components/accordion/AccordionPrimaryStylenames.html b/uitest/tb2/com/vaadin/tests/components/accordion/AccordionPrimaryStylenames.html
index 6f888f7467..6f888f7467 100644
--- a/uitest/src/com/vaadin/tests/components/accordion/AccordionPrimaryStylenames.html
+++ b/uitest/tb2/com/vaadin/tests/components/accordion/AccordionPrimaryStylenames.html
diff --git a/uitest/src/com/vaadin/tests/components/accordion/AccordionTabStylenames.html b/uitest/tb2/com/vaadin/tests/components/accordion/AccordionTabStylenames.html
index 4870777717..4870777717 100644
--- a/uitest/src/com/vaadin/tests/components/accordion/AccordionTabStylenames.html
+++ b/uitest/tb2/com/vaadin/tests/components/accordion/AccordionTabStylenames.html
diff --git a/uitest/src/com/vaadin/tests/components/accordion/AccordionTheme.html b/uitest/tb2/com/vaadin/tests/components/accordion/AccordionTheme.html
index 4d04d30d88..4d04d30d88 100644
--- a/uitest/src/com/vaadin/tests/components/accordion/AccordionTheme.html
+++ b/uitest/tb2/com/vaadin/tests/components/accordion/AccordionTheme.html
diff --git a/uitest/src/com/vaadin/tests/components/accordion/RemoveTabs.html b/uitest/tb2/com/vaadin/tests/components/accordion/RemoveTabs.html
index ec24ade8ce..ec24ade8ce 100644
--- a/uitest/src/com/vaadin/tests/components/accordion/RemoveTabs.html
+++ b/uitest/tb2/com/vaadin/tests/components/accordion/RemoveTabs.html
diff --git a/uitest/src/com/vaadin/tests/components/beanitemcontainer/BeanItemContainerNullValues.html b/uitest/tb2/com/vaadin/tests/components/beanitemcontainer/BeanItemContainerNullValues.html
index e40be7dc15..e40be7dc15 100644
--- a/uitest/src/com/vaadin/tests/components/beanitemcontainer/BeanItemContainerNullValues.html
+++ b/uitest/tb2/com/vaadin/tests/components/beanitemcontainer/BeanItemContainerNullValues.html
diff --git a/uitest/src/com/vaadin/tests/components/beanitemcontainer/TestBeanItemContainerUsage.html b/uitest/tb2/com/vaadin/tests/components/beanitemcontainer/TestBeanItemContainerUsage.html
index a37e8ea662..a37e8ea662 100644
--- a/uitest/src/com/vaadin/tests/components/beanitemcontainer/TestBeanItemContainerUsage.html
+++ b/uitest/tb2/com/vaadin/tests/components/beanitemcontainer/TestBeanItemContainerUsage.html
diff --git a/uitest/src/com/vaadin/tests/components/browserframe/BrowserFrameIsVisible.html b/uitest/tb2/com/vaadin/tests/components/browserframe/BrowserFrameIsVisible.html
index 93b855838c..93b855838c 100644
--- a/uitest/src/com/vaadin/tests/components/browserframe/BrowserFrameIsVisible.html
+++ b/uitest/tb2/com/vaadin/tests/components/browserframe/BrowserFrameIsVisible.html
diff --git a/uitest/src/com/vaadin/tests/components/button/ButtonDisableEnableOnClick.html b/uitest/tb2/com/vaadin/tests/components/button/ButtonDisableEnableOnClick.html
index a3cdb64aec..a3cdb64aec 100644
--- a/uitest/src/com/vaadin/tests/components/button/ButtonDisableEnableOnClick.html
+++ b/uitest/tb2/com/vaadin/tests/components/button/ButtonDisableEnableOnClick.html
diff --git a/uitest/src/com/vaadin/tests/components/button/ButtonDisableOnClick.html b/uitest/tb2/com/vaadin/tests/components/button/ButtonDisableOnClick.html
index d39f72ef1f..d39f72ef1f 100644
--- a/uitest/src/com/vaadin/tests/components/button/ButtonDisableOnClick.html
+++ b/uitest/tb2/com/vaadin/tests/components/button/ButtonDisableOnClick.html
diff --git a/uitest/src/com/vaadin/tests/components/button/ButtonEnterWithWindowShortcut.html b/uitest/tb2/com/vaadin/tests/components/button/ButtonEnterWithWindowShortcut.html
index 5ec33f09fa..5ec33f09fa 100644
--- a/uitest/src/com/vaadin/tests/components/button/ButtonEnterWithWindowShortcut.html
+++ b/uitest/tb2/com/vaadin/tests/components/button/ButtonEnterWithWindowShortcut.html
diff --git a/uitest/src/com/vaadin/tests/components/button/ButtonHtml.html b/uitest/tb2/com/vaadin/tests/components/button/ButtonHtml.html
index 2d58d0e2e1..2d58d0e2e1 100644
--- a/uitest/src/com/vaadin/tests/components/button/ButtonHtml.html
+++ b/uitest/tb2/com/vaadin/tests/components/button/ButtonHtml.html
diff --git a/uitest/src/com/vaadin/tests/components/button/ButtonToggleIcons.html b/uitest/tb2/com/vaadin/tests/components/button/ButtonToggleIcons.html
index 642abd8120..642abd8120 100644
--- a/uitest/src/com/vaadin/tests/components/button/ButtonToggleIcons.html
+++ b/uitest/tb2/com/vaadin/tests/components/button/ButtonToggleIcons.html
diff --git a/uitest/src/com/vaadin/tests/components/button/ButtonUpdateAltText.html b/uitest/tb2/com/vaadin/tests/components/button/ButtonUpdateAltText.html
index 3608851f9c..3608851f9c 100644
--- a/uitest/src/com/vaadin/tests/components/button/ButtonUpdateAltText.html
+++ b/uitest/tb2/com/vaadin/tests/components/button/ButtonUpdateAltText.html
diff --git a/uitest/src/com/vaadin/tests/components/button/ButtonWithShortcutNotRendered.html b/uitest/tb2/com/vaadin/tests/components/button/ButtonWithShortcutNotRendered.html
index a4e36b6f44..a4e36b6f44 100644
--- a/uitest/src/com/vaadin/tests/components/button/ButtonWithShortcutNotRendered.html
+++ b/uitest/tb2/com/vaadin/tests/components/button/ButtonWithShortcutNotRendered.html
diff --git a/uitest/src/com/vaadin/tests/components/button/Buttons-chameleon.html b/uitest/tb2/com/vaadin/tests/components/button/Buttons-chameleon.html
index 4830c79bcf..4830c79bcf 100644
--- a/uitest/src/com/vaadin/tests/components/button/Buttons-chameleon.html
+++ b/uitest/tb2/com/vaadin/tests/components/button/Buttons-chameleon.html
diff --git a/uitest/src/com/vaadin/tests/components/button/Buttons-reindeer.html b/uitest/tb2/com/vaadin/tests/components/button/Buttons-reindeer.html
index 43e554bec5..43e554bec5 100644
--- a/uitest/src/com/vaadin/tests/components/button/Buttons-reindeer.html
+++ b/uitest/tb2/com/vaadin/tests/components/button/Buttons-reindeer.html
diff --git a/uitest/src/com/vaadin/tests/components/button/Buttons-runo.html b/uitest/tb2/com/vaadin/tests/components/button/Buttons-runo.html
index 27779f170b..27779f170b 100644
--- a/uitest/src/com/vaadin/tests/components/button/Buttons-runo.html
+++ b/uitest/tb2/com/vaadin/tests/components/button/Buttons-runo.html
diff --git a/uitest/src/com/vaadin/tests/components/button/ButtonsAndIcons-chameleon.html b/uitest/tb2/com/vaadin/tests/components/button/ButtonsAndIcons-chameleon.html
index 5425ebb716..5425ebb716 100644
--- a/uitest/src/com/vaadin/tests/components/button/ButtonsAndIcons-chameleon.html
+++ b/uitest/tb2/com/vaadin/tests/components/button/ButtonsAndIcons-chameleon.html
diff --git a/uitest/src/com/vaadin/tests/components/button/ButtonsAndIcons-reindeer.html b/uitest/tb2/com/vaadin/tests/components/button/ButtonsAndIcons-reindeer.html
index 6bee11d561..6bee11d561 100644
--- a/uitest/src/com/vaadin/tests/components/button/ButtonsAndIcons-reindeer.html
+++ b/uitest/tb2/com/vaadin/tests/components/button/ButtonsAndIcons-reindeer.html
diff --git a/uitest/src/com/vaadin/tests/components/button/ButtonsAndIcons-runo.html b/uitest/tb2/com/vaadin/tests/components/button/ButtonsAndIcons-runo.html
index 8084a58536..8084a58536 100644
--- a/uitest/src/com/vaadin/tests/components/button/ButtonsAndIcons-runo.html
+++ b/uitest/tb2/com/vaadin/tests/components/button/ButtonsAndIcons-runo.html
diff --git a/uitest/src/com/vaadin/tests/components/button/ButtonsInHorizontalLayout.html b/uitest/tb2/com/vaadin/tests/components/button/ButtonsInHorizontalLayout.html
index cb3b5e66ee..cb3b5e66ee 100644
--- a/uitest/src/com/vaadin/tests/components/button/ButtonsInHorizontalLayout.html
+++ b/uitest/tb2/com/vaadin/tests/components/button/ButtonsInHorizontalLayout.html
diff --git a/uitest/src/com/vaadin/tests/components/button/ButtonsWaiAria.html b/uitest/tb2/com/vaadin/tests/components/button/ButtonsWaiAria.html
index 8d10438c1d..8d10438c1d 100644
--- a/uitest/src/com/vaadin/tests/components/button/ButtonsWaiAria.html
+++ b/uitest/tb2/com/vaadin/tests/components/button/ButtonsWaiAria.html
diff --git a/uitest/src/com/vaadin/tests/components/button/DisabledButtons.html b/uitest/tb2/com/vaadin/tests/components/button/DisabledButtons.html
index 65584fd4d0..65584fd4d0 100644
--- a/uitest/src/com/vaadin/tests/components/button/DisabledButtons.html
+++ b/uitest/tb2/com/vaadin/tests/components/button/DisabledButtons.html
diff --git a/uitest/src/com/vaadin/tests/components/calendar/CalendarActions.html b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarActions.html
index bec3f2aded..bec3f2aded 100644
--- a/uitest/src/com/vaadin/tests/components/calendar/CalendarActions.html
+++ b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarActions.html
diff --git a/uitest/src/com/vaadin/tests/components/calendar/CalendarBasicNavigation.html b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarBasicNavigation.html
index cccb88bfb2..cccb88bfb2 100644
--- a/uitest/src/com/vaadin/tests/components/calendar/CalendarBasicNavigation.html
+++ b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarBasicNavigation.html
diff --git a/uitest/src/com/vaadin/tests/components/calendar/CalendarDragAndDrop.html b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarDragAndDrop.html
index b0a702adc0..b0a702adc0 100644
--- a/uitest/src/com/vaadin/tests/components/calendar/CalendarDragAndDrop.html
+++ b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarDragAndDrop.html
diff --git a/uitest/src/com/vaadin/tests/components/calendar/CalendarEventSizingNoOverlap.html b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarEventSizingNoOverlap.html
index dcf6c1ec53..dcf6c1ec53 100644
--- a/uitest/src/com/vaadin/tests/components/calendar/CalendarEventSizingNoOverlap.html
+++ b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarEventSizingNoOverlap.html
diff --git a/uitest/src/com/vaadin/tests/components/calendar/CalendarMidnightEventsTest.html b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarMidnightEventsTest.html
index 8991e1983d..8991e1983d 100644
--- a/uitest/src/com/vaadin/tests/components/calendar/CalendarMidnightEventsTest.html
+++ b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarMidnightEventsTest.html
diff --git a/uitest/src/com/vaadin/tests/components/calendar/CalendarMonthlyViewNewEvent.html b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarMonthlyViewNewEvent.html
index 760beef6c0..760beef6c0 100644
--- a/uitest/src/com/vaadin/tests/components/calendar/CalendarMonthlyViewNewEvent.html
+++ b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarMonthlyViewNewEvent.html
diff --git a/uitest/src/com/vaadin/tests/components/calendar/CalendarMonthlyViewNewEvents.html b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarMonthlyViewNewEvents.html
index 68690f81b4..68690f81b4 100644
--- a/uitest/src/com/vaadin/tests/components/calendar/CalendarMonthlyViewNewEvents.html
+++ b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarMonthlyViewNewEvents.html
diff --git a/uitest/src/com/vaadin/tests/components/calendar/CalendarSizeTest1000x600px.html b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarSizeTest1000x600px.html
index bd4c671361..bd4c671361 100644
--- a/uitest/src/com/vaadin/tests/components/calendar/CalendarSizeTest1000x600px.html
+++ b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarSizeTest1000x600px.html
diff --git a/uitest/src/com/vaadin/tests/components/calendar/CalendarSizeTest100percentXundefined.html b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarSizeTest100percentXundefined.html
index 64b5444d34..64b5444d34 100644
--- a/uitest/src/com/vaadin/tests/components/calendar/CalendarSizeTest100percentXundefined.html
+++ b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarSizeTest100percentXundefined.html
diff --git a/uitest/src/com/vaadin/tests/components/calendar/CalendarSizeTest100x100percent.html b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarSizeTest100x100percent.html
index 0905034b13..0905034b13 100644
--- a/uitest/src/com/vaadin/tests/components/calendar/CalendarSizeTest100x100percent.html
+++ b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarSizeTest100x100percent.html
diff --git a/uitest/src/com/vaadin/tests/components/calendar/CalendarSizeTest300pxXundefined.html b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarSizeTest300pxXundefined.html
index 99327a01df..99327a01df 100644
--- a/uitest/src/com/vaadin/tests/components/calendar/CalendarSizeTest300pxXundefined.html
+++ b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarSizeTest300pxXundefined.html
diff --git a/uitest/src/com/vaadin/tests/components/calendar/CalendarSizeTestUndefinedX100percent.html b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarSizeTestUndefinedX100percent.html
index 2e4c811ff1..2e4c811ff1 100644
--- a/uitest/src/com/vaadin/tests/components/calendar/CalendarSizeTestUndefinedX100percent.html
+++ b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarSizeTestUndefinedX100percent.html
diff --git a/uitest/src/com/vaadin/tests/components/calendar/CalendarSizeTestUndefinedX300px.html b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarSizeTestUndefinedX300px.html
index cca66c7145..cca66c7145 100644
--- a/uitest/src/com/vaadin/tests/components/calendar/CalendarSizeTestUndefinedX300px.html
+++ b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarSizeTestUndefinedX300px.html
diff --git a/uitest/src/com/vaadin/tests/components/calendar/CalendarSizeTestUndefinedXUndefined.html b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarSizeTestUndefinedXUndefined.html
index e4a8da691b..e4a8da691b 100644
--- a/uitest/src/com/vaadin/tests/components/calendar/CalendarSizeTestUndefinedXUndefined.html
+++ b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarSizeTestUndefinedXUndefined.html
diff --git a/uitest/src/com/vaadin/tests/components/calendar/CalendarVisibleHours24H.html b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarVisibleHours24H.html
index 6b7bb26b76..6b7bb26b76 100644
--- a/uitest/src/com/vaadin/tests/components/calendar/CalendarVisibleHours24H.html
+++ b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarVisibleHours24H.html
diff --git a/uitest/src/com/vaadin/tests/components/calendar/CalendarWeeklyViewNewEvents.html b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarWeeklyViewNewEvents.html
index 6add1deba5..6add1deba5 100644
--- a/uitest/src/com/vaadin/tests/components/calendar/CalendarWeeklyViewNewEvents.html
+++ b/uitest/tb2/com/vaadin/tests/components/calendar/CalendarWeeklyViewNewEvents.html
diff --git a/uitest/src/com/vaadin/tests/components/calendar/TestHideTimeAndSeparator.html b/uitest/tb2/com/vaadin/tests/components/calendar/TestHideTimeAndSeparator.html
index 38a6be24ce..38a6be24ce 100644
--- a/uitest/src/com/vaadin/tests/components/calendar/TestHideTimeAndSeparator.html
+++ b/uitest/tb2/com/vaadin/tests/components/calendar/TestHideTimeAndSeparator.html
diff --git a/uitest/src/com/vaadin/tests/components/caption/EmptyCaptions.html b/uitest/tb2/com/vaadin/tests/components/caption/EmptyCaptions.html
index f1ede9a04b..f1ede9a04b 100644
--- a/uitest/src/com/vaadin/tests/components/caption/EmptyCaptions.html
+++ b/uitest/tb2/com/vaadin/tests/components/caption/EmptyCaptions.html
diff --git a/uitest/src/com/vaadin/tests/components/caption/LargeCaptionIcon.html b/uitest/tb2/com/vaadin/tests/components/caption/LargeCaptionIcon.html
index 7c94821e7f..7c94821e7f 100644
--- a/uitest/src/com/vaadin/tests/components/caption/LargeCaptionIcon.html
+++ b/uitest/tb2/com/vaadin/tests/components/caption/LargeCaptionIcon.html
diff --git a/uitest/src/com/vaadin/tests/components/checkbox/CheckBoxDisabledReadOnlyValueChange.html b/uitest/tb2/com/vaadin/tests/components/checkbox/CheckBoxDisabledReadOnlyValueChange.html
index ddcdc68691..ddcdc68691 100644
--- a/uitest/src/com/vaadin/tests/components/checkbox/CheckBoxDisabledReadOnlyValueChange.html
+++ b/uitest/tb2/com/vaadin/tests/components/checkbox/CheckBoxDisabledReadOnlyValueChange.html
diff --git a/uitest/src/com/vaadin/tests/components/checkbox/CheckBoxRevertValueChange.html b/uitest/tb2/com/vaadin/tests/components/checkbox/CheckBoxRevertValueChange.html
index ea5849f99f..ea5849f99f 100644
--- a/uitest/src/com/vaadin/tests/components/checkbox/CheckBoxRevertValueChange.html
+++ b/uitest/tb2/com/vaadin/tests/components/checkbox/CheckBoxRevertValueChange.html
diff --git a/uitest/src/com/vaadin/tests/components/checkbox/CheckBoxes.html b/uitest/tb2/com/vaadin/tests/components/checkbox/CheckBoxes.html
index 601be4e1cb..601be4e1cb 100644
--- a/uitest/src/com/vaadin/tests/components/checkbox/CheckBoxes.html
+++ b/uitest/tb2/com/vaadin/tests/components/checkbox/CheckBoxes.html
diff --git a/uitest/src/com/vaadin/tests/components/checkbox/CheckboxCaptionWrapping.html b/uitest/tb2/com/vaadin/tests/components/checkbox/CheckboxCaptionWrapping.html
index 26ecc95721..26ecc95721 100644
--- a/uitest/src/com/vaadin/tests/components/checkbox/CheckboxCaptionWrapping.html
+++ b/uitest/tb2/com/vaadin/tests/components/checkbox/CheckboxCaptionWrapping.html
diff --git a/uitest/src/com/vaadin/tests/components/colorpicker/ColorPickerHsvTest.html b/uitest/tb2/com/vaadin/tests/components/colorpicker/ColorPickerHsvTest.html
index 1c53673b41..1c53673b41 100644
--- a/uitest/src/com/vaadin/tests/components/colorpicker/ColorPickerHsvTest.html
+++ b/uitest/tb2/com/vaadin/tests/components/colorpicker/ColorPickerHsvTest.html
diff --git a/uitest/src/com/vaadin/tests/components/colorpicker/ColorPickerTest.html b/uitest/tb2/com/vaadin/tests/components/colorpicker/ColorPickerTest.html
index 48a4219c87..48a4219c87 100644
--- a/uitest/src/com/vaadin/tests/components/colorpicker/ColorPickerTest.html
+++ b/uitest/tb2/com/vaadin/tests/components/colorpicker/ColorPickerTest.html
diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxBorder.html b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxBorder.html
index 7e7bb7722d..7e7bb7722d 100644
--- a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxBorder.html
+++ b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxBorder.html
diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxCombinedWithEnterShortcut.html b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxCombinedWithEnterShortcut.html
index 1689c7c1fc..1689c7c1fc 100644
--- a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxCombinedWithEnterShortcut.html
+++ b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxCombinedWithEnterShortcut.html
diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxDataSourceChange.html b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxDataSourceChange.html
index cab8bbc996..cab8bbc996 100644
--- a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxDataSourceChange.html
+++ b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxDataSourceChange.html
diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxInvalidNullSelection.html b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxInvalidNullSelection.html
index 1459a30985..1459a30985 100644
--- a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxInvalidNullSelection.html
+++ b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxInvalidNullSelection.html
diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxItemIcon.html b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxItemIcon.html
index 6e6e87bc7e..6e6e87bc7e 100644
--- a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxItemIcon.html
+++ b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxItemIcon.html
diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxLargeIcons.html b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxLargeIcons.html
index fd2aceb7f2..fd2aceb7f2 100644
--- a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxLargeIcons.html
+++ b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxLargeIcons.html
diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxNavigation.html b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxNavigation.html
index 03de00a6f1..03de00a6f1 100644
--- a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxNavigation.html
+++ b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxNavigation.html
diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxNoTextInput.html b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxNoTextInput.html
index 2066da47c1..2066da47c1 100644
--- a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxNoTextInput.html
+++ b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxNoTextInput.html
diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxNullItem.html b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxNullItem.html
index 3dc31f4a98..3dc31f4a98 100644
--- a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxNullItem.html
+++ b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxNullItem.html
diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxPageLength.html b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxPageLength.html
index 3f0782742f..3f0782742f 100644
--- a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxPageLength.html
+++ b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxPageLength.html
diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxParentDisable.html b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxParentDisable.html
index ab8c4f81d0..ab8c4f81d0 100644
--- a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxParentDisable.html
+++ b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxParentDisable.html
diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxReapperingOldValue.html b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxReapperingOldValue.html
index 50b95bfdc2..50b95bfdc2 100644
--- a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxReapperingOldValue.html
+++ b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxReapperingOldValue.html
diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxRemoveAllItems.html b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxRemoveAllItems.html
index eec15d0b40..eec15d0b40 100644
--- a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxRemoveAllItems.html
+++ b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxRemoveAllItems.html
diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxSQLContainerFilteredValueChange.html b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxSQLContainerFilteredValueChange.html
index f3f44a5d90..f3f44a5d90 100644
--- a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxSQLContainerFilteredValueChange.html
+++ b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxSQLContainerFilteredValueChange.html
diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxSuggestionOnDetach.html b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxSuggestionOnDetach.html
index ba251e5cc0..ba251e5cc0 100644
--- a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxSuggestionOnDetach.html
+++ b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxSuggestionOnDetach.html
diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxUndefinedWidthAndIcon.html b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxUndefinedWidthAndIcon.html
index 8366f2dc8c..8366f2dc8c 100644
--- a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxUndefinedWidthAndIcon.html
+++ b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxUndefinedWidthAndIcon.html
diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboFocusBlurEvents.html b/uitest/tb2/com/vaadin/tests/components/combobox/ComboFocusBlurEvents.html
index 4d91ce7838..4d91ce7838 100644
--- a/uitest/src/com/vaadin/tests/components/combobox/ComboFocusBlurEvents.html
+++ b/uitest/tb2/com/vaadin/tests/components/combobox/ComboFocusBlurEvents.html
diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboboxInPopupViewWithItems.html b/uitest/tb2/com/vaadin/tests/components/combobox/ComboboxInPopupViewWithItems.html
index 1b7b42a4e3..1b7b42a4e3 100644
--- a/uitest/src/com/vaadin/tests/components/combobox/ComboboxInPopupViewWithItems.html
+++ b/uitest/tb2/com/vaadin/tests/components/combobox/ComboboxInPopupViewWithItems.html
diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboboxPrimaryStyleName.html b/uitest/tb2/com/vaadin/tests/components/combobox/ComboboxPrimaryStyleName.html
index 649dda72f8..649dda72f8 100644
--- a/uitest/src/com/vaadin/tests/components/combobox/ComboboxPrimaryStyleName.html
+++ b/uitest/tb2/com/vaadin/tests/components/combobox/ComboboxPrimaryStyleName.html
diff --git a/uitest/src/com/vaadin/tests/components/combobox/Comboboxes.html b/uitest/tb2/com/vaadin/tests/components/combobox/Comboboxes.html
index 4aa84a9453..4aa84a9453 100644
--- a/uitest/src/com/vaadin/tests/components/combobox/Comboboxes.html
+++ b/uitest/tb2/com/vaadin/tests/components/combobox/Comboboxes.html
diff --git a/uitest/src/com/vaadin/tests/components/combobox/EscapeClosesComboboxNotWindow.html b/uitest/tb2/com/vaadin/tests/components/combobox/EscapeClosesComboboxNotWindow.html
index 312fffcb97..312fffcb97 100644
--- a/uitest/src/com/vaadin/tests/components/combobox/EscapeClosesComboboxNotWindow.html
+++ b/uitest/tb2/com/vaadin/tests/components/combobox/EscapeClosesComboboxNotWindow.html
diff --git a/uitest/src/com/vaadin/tests/components/combobox/PopUpWidth.html b/uitest/tb2/com/vaadin/tests/components/combobox/PopUpWidth.html
index 35a6bcf29a..35a6bcf29a 100644
--- a/uitest/src/com/vaadin/tests/components/combobox/PopUpWidth.html
+++ b/uitest/tb2/com/vaadin/tests/components/combobox/PopUpWidth.html
diff --git a/uitest/src/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.html b/uitest/tb2/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.html
index fc3862ebb7..fc3862ebb7 100644
--- a/uitest/src/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.html
+++ b/uitest/tb2/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.html
diff --git a/uitest/src/com/vaadin/tests/components/combobox/WidthToggleReadOnly.html b/uitest/tb2/com/vaadin/tests/components/combobox/WidthToggleReadOnly.html
index b661aa2bd7..b661aa2bd7 100644
--- a/uitest/src/com/vaadin/tests/components/combobox/WidthToggleReadOnly.html
+++ b/uitest/tb2/com/vaadin/tests/components/combobox/WidthToggleReadOnly.html
diff --git a/uitest/src/com/vaadin/tests/components/customcomponent/CustomComponentGrowingContent.html b/uitest/tb2/com/vaadin/tests/components/customcomponent/CustomComponentGrowingContent.html
index 0a1b7212c9..0a1b7212c9 100644
--- a/uitest/src/com/vaadin/tests/components/customcomponent/CustomComponentGrowingContent.html
+++ b/uitest/tb2/com/vaadin/tests/components/customcomponent/CustomComponentGrowingContent.html
diff --git a/uitest/src/com/vaadin/tests/components/customcomponent/CustomComponentHideContent.html b/uitest/tb2/com/vaadin/tests/components/customcomponent/CustomComponentHideContent.html
index 0616c10ab3..0616c10ab3 100644
--- a/uitest/src/com/vaadin/tests/components/customcomponent/CustomComponentHideContent.html
+++ b/uitest/tb2/com/vaadin/tests/components/customcomponent/CustomComponentHideContent.html
diff --git a/uitest/src/com/vaadin/tests/components/customcomponent/EmbeddedInCustomComponent.html b/uitest/tb2/com/vaadin/tests/components/customcomponent/EmbeddedInCustomComponent.html
index 268d3074f7..268d3074f7 100644
--- a/uitest/src/com/vaadin/tests/components/customcomponent/EmbeddedInCustomComponent.html
+++ b/uitest/tb2/com/vaadin/tests/components/customcomponent/EmbeddedInCustomComponent.html
diff --git a/uitest/src/com/vaadin/tests/components/customfield/BooleanFieldExample.html b/uitest/tb2/com/vaadin/tests/components/customfield/BooleanFieldExample.html
index 6b1b3e8a2d..6b1b3e8a2d 100644
--- a/uitest/src/com/vaadin/tests/components/customfield/BooleanFieldExample.html
+++ b/uitest/tb2/com/vaadin/tests/components/customfield/BooleanFieldExample.html
diff --git a/uitest/src/com/vaadin/tests/components/customfield/EmbeddedFormExample.html b/uitest/tb2/com/vaadin/tests/components/customfield/EmbeddedFormExample.html
index 2af441bc83..2af441bc83 100644
--- a/uitest/src/com/vaadin/tests/components/customfield/EmbeddedFormExample.html
+++ b/uitest/tb2/com/vaadin/tests/components/customfield/EmbeddedFormExample.html
diff --git a/uitest/src/com/vaadin/tests/components/customfield/NestedFormExample.html b/uitest/tb2/com/vaadin/tests/components/customfield/NestedFormExample.html
index f9f5783c05..f9f5783c05 100644
--- a/uitest/src/com/vaadin/tests/components/customfield/NestedFormExample.html
+++ b/uitest/tb2/com/vaadin/tests/components/customfield/NestedFormExample.html
diff --git a/uitest/src/com/vaadin/tests/components/customlayout/CustomLayoutPrimaryStyleName.html b/uitest/tb2/com/vaadin/tests/components/customlayout/CustomLayoutPrimaryStyleName.html
index 0a5654bb1f..0a5654bb1f 100644
--- a/uitest/src/com/vaadin/tests/components/customlayout/CustomLayoutPrimaryStyleName.html
+++ b/uitest/tb2/com/vaadin/tests/components/customlayout/CustomLayoutPrimaryStyleName.html
diff --git a/uitest/src/com/vaadin/tests/components/customlayout/CustomLayoutUsingTemplate.html b/uitest/tb2/com/vaadin/tests/components/customlayout/CustomLayoutUsingTemplate.html
index 78a87894c6..78a87894c6 100644
--- a/uitest/src/com/vaadin/tests/components/customlayout/CustomLayoutUsingTemplate.html
+++ b/uitest/tb2/com/vaadin/tests/components/customlayout/CustomLayoutUsingTemplate.html
diff --git a/uitest/src/com/vaadin/tests/components/customlayout/CustomLayoutUsingTheme.html b/uitest/tb2/com/vaadin/tests/components/customlayout/CustomLayoutUsingTheme.html
index 7fe2e4c07c..7fe2e4c07c 100644
--- a/uitest/src/com/vaadin/tests/components/customlayout/CustomLayoutUsingTheme.html
+++ b/uitest/tb2/com/vaadin/tests/components/customlayout/CustomLayoutUsingTheme.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/CommitInvalid.html b/uitest/tb2/com/vaadin/tests/components/datefield/CommitInvalid.html
index 8420888098..8420888098 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/CommitInvalid.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/CommitInvalid.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/CustomDateFormat.html b/uitest/tb2/com/vaadin/tests/components/datefield/CustomDateFormat.html
index ed92afe378..ed92afe378 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/CustomDateFormat.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/CustomDateFormat.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/CustomDateFormats.html b/uitest/tb2/com/vaadin/tests/components/datefield/CustomDateFormats.html
index b20e7295f7..b20e7295f7 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/CustomDateFormats.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/CustomDateFormats.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/DateFieldEmptyValid.html b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldEmptyValid.html
index f387695b5f..f387695b5f 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/DateFieldEmptyValid.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldEmptyValid.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/DateFieldExtendedRange.html b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldExtendedRange.html
index 266a1a379d..266a1a379d 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/DateFieldExtendedRange.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldExtendedRange.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/DateFieldInSubWindow.html b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldInSubWindow.html
index f2ef2123f6..f2ef2123f6 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/DateFieldInSubWindow.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldInSubWindow.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/DateFieldPopupOffScreen.html b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldPopupOffScreen.html
index f7541f0270..f7541f0270 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/DateFieldPopupOffScreen.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldPopupOffScreen.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/DateFieldPrimaryStyleNames.html b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldPrimaryStyleNames.html
index 38034fd0c8..38034fd0c8 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/DateFieldPrimaryStyleNames.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldPrimaryStyleNames.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/DateFieldRangeValidation.html b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldRangeValidation.html
index 444f8e3bac..444f8e3bac 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/DateFieldRangeValidation.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldRangeValidation.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/DateFieldRanges_ChangingRangeSoValueFallsOutsideRangeCausesOutOfRangeExceptionIfImmediateField.html b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldRanges_ChangingRangeSoValueFallsOutsideRangeCausesOutOfRangeExceptionIfImmediateField.html
index ca5c006e82..ca5c006e82 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/DateFieldRanges_ChangingRangeSoValueFallsOutsideRangeCausesOutOfRangeExceptionIfImmediateField.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldRanges_ChangingRangeSoValueFallsOutsideRangeCausesOutOfRangeExceptionIfImmediateField.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/DateFieldRanges_EndRangeEarlierThanStartRangeCausesException.html b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldRanges_EndRangeEarlierThanStartRangeCausesException.html
index b19f519cb1..b19f519cb1 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/DateFieldRanges_EndRangeEarlierThanStartRangeCausesException.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldRanges_EndRangeEarlierThanStartRangeCausesException.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/DateFieldRanges_InitialDatesOutsideRange.html b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldRanges_InitialDatesOutsideRange.html
index eeeda5270b..eeeda5270b 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/DateFieldRanges_InitialDatesOutsideRange.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldRanges_InitialDatesOutsideRange.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/DateFieldRanges_MonthChangeMeansFocusDayRolledInsideRange.html b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldRanges_MonthChangeMeansFocusDayRolledInsideRange.html
index 1135c650f5..1135c650f5 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/DateFieldRanges_MonthChangeMeansFocusDayRolledInsideRange.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldRanges_MonthChangeMeansFocusDayRolledInsideRange.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/DateFieldRanges_NextYearClickableIfRangeAcceptsFractionOfNextYear.html b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldRanges_NextYearClickableIfRangeAcceptsFractionOfNextYear.html
index f5d7ee97ca..f5d7ee97ca 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/DateFieldRanges_NextYearClickableIfRangeAcceptsFractionOfNextYear.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldRanges_NextYearClickableIfRangeAcceptsFractionOfNextYear.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/DateFieldRanges_PrevYearClickableIfRangeAcceptsFractionOfPrevYear.html b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldRanges_PrevYearClickableIfRangeAcceptsFractionOfPrevYear.html
index 4c671b266d..4c671b266d 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/DateFieldRanges_PrevYearClickableIfRangeAcceptsFractionOfPrevYear.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldRanges_PrevYearClickableIfRangeAcceptsFractionOfPrevYear.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/DateFieldRanges_SettingValueOutsideRangeCausesException.html b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldRanges_SettingValueOutsideRangeCausesException.html
index c3f7e021a8..c3f7e021a8 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/DateFieldRanges_SettingValueOutsideRangeCausesException.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldRanges_SettingValueOutsideRangeCausesException.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/DateFieldTimezone.html b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldTimezone.html
index be325ef2eb..be325ef2eb 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/DateFieldTimezone.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldTimezone.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/DatePopupStyleName.html b/uitest/tb2/com/vaadin/tests/components/datefield/DatePopupStyleName.html
index f367fc383b..f367fc383b 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/DatePopupStyleName.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/DatePopupStyleName.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/DynamicallyChangeDateRange.html b/uitest/tb2/com/vaadin/tests/components/datefield/DynamicallyChangeDateRange.html
index 75c19945b0..75c19945b0 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/DynamicallyChangeDateRange.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/DynamicallyChangeDateRange.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/InlineDateFieldResolutionMsec.html b/uitest/tb2/com/vaadin/tests/components/datefield/InlineDateFieldResolutionMsec.html
index 13f918302b..13f918302b 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/InlineDateFieldResolutionMsec.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/InlineDateFieldResolutionMsec.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/InlineDateFieldValueChange.html b/uitest/tb2/com/vaadin/tests/components/datefield/InlineDateFieldValueChange.html
index 9614afb09b..9614afb09b 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/InlineDateFieldValueChange.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/InlineDateFieldValueChange.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/InlineDateFieldsHiddenOnStart.html b/uitest/tb2/com/vaadin/tests/components/datefield/InlineDateFieldsHiddenOnStart.html
index 6b79ef419b..6b79ef419b 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/InlineDateFieldsHiddenOnStart.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/InlineDateFieldsHiddenOnStart.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/NarrowPopupDateFieldInTable.html b/uitest/tb2/com/vaadin/tests/components/datefield/NarrowPopupDateFieldInTable.html
index 9852b30ae7..9852b30ae7 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/NarrowPopupDateFieldInTable.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/NarrowPopupDateFieldInTable.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldDisabledReadonly.html b/uitest/tb2/com/vaadin/tests/components/datefield/PopupDateFieldDisabledReadonly.html
index 009ca0aaf9..009ca0aaf9 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldDisabledReadonly.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/PopupDateFieldDisabledReadonly.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldLocaleTest.html b/uitest/tb2/com/vaadin/tests/components/datefield/PopupDateFieldLocaleTest.html
index 932ad0646e..932ad0646e 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldLocaleTest.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/PopupDateFieldLocaleTest.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldMonth.html b/uitest/tb2/com/vaadin/tests/components/datefield/PopupDateFieldMonth.html
index 9111388f5a..9111388f5a 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldMonth.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/PopupDateFieldMonth.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldPopup.html b/uitest/tb2/com/vaadin/tests/components/datefield/PopupDateFieldPopup.html
index 1ec418e523..1ec418e523 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldPopup.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/PopupDateFieldPopup.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldResolutions.html b/uitest/tb2/com/vaadin/tests/components/datefield/PopupDateFieldResolutions.html
index d799c776d0..d799c776d0 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldResolutions.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/PopupDateFieldResolutions.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldTest.html b/uitest/tb2/com/vaadin/tests/components/datefield/PopupDateFieldTest.html
index eb9859bf9d..eb9859bf9d 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldTest.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/PopupDateFieldTest.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldValueChangeEvents.html b/uitest/tb2/com/vaadin/tests/components/datefield/PopupDateFieldValueChangeEvents.html
index 18f0ce0da2..18f0ce0da2 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldValueChangeEvents.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/PopupDateFieldValueChangeEvents.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/RequiredInvalidDateField.html b/uitest/tb2/com/vaadin/tests/components/datefield/RequiredInvalidDateField.html
index 6dc46e4eec..6dc46e4eec 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/RequiredInvalidDateField.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/RequiredInvalidDateField.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/ShowSelectedDateAfterInvalid.html b/uitest/tb2/com/vaadin/tests/components/datefield/ShowSelectedDateAfterInvalid.html
index 1cd79338e9..1cd79338e9 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/ShowSelectedDateAfterInvalid.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/ShowSelectedDateAfterInvalid.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/TestDatefieldYear.html b/uitest/tb2/com/vaadin/tests/components/datefield/TestDatefieldYear.html
index 71c246593a..71c246593a 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/TestDatefieldYear.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/TestDatefieldYear.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/TestSettingTimeOnInitiallyNullInlineDateField.html b/uitest/tb2/com/vaadin/tests/components/datefield/TestSettingTimeOnInitiallyNullInlineDateField.html
index 7f4cd92be2..7f4cd92be2 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/TestSettingTimeOnInitiallyNullInlineDateField.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/TestSettingTimeOnInitiallyNullInlineDateField.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/TestSettingTimeOnInitiallyNullPopupDateField.html b/uitest/tb2/com/vaadin/tests/components/datefield/TestSettingTimeOnInitiallyNullPopupDateField.html
index 9db6763296..9db6763296 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/TestSettingTimeOnInitiallyNullPopupDateField.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/TestSettingTimeOnInitiallyNullPopupDateField.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/ValueThroughProperty.html b/uitest/tb2/com/vaadin/tests/components/datefield/ValueThroughProperty.html
index 07b8b1b237..07b8b1b237 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/ValueThroughProperty.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/ValueThroughProperty.html
diff --git a/uitest/src/com/vaadin/tests/components/datefield/WidthRecalculationOnEnableStateChange.html b/uitest/tb2/com/vaadin/tests/components/datefield/WidthRecalculationOnEnableStateChange.html
index 70441efd9f..70441efd9f 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/WidthRecalculationOnEnableStateChange.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/WidthRecalculationOnEnableStateChange.html
diff --git a/uitest/src/com/vaadin/tests/components/draganddropwrapper/DragAndDropDisable.html b/uitest/tb2/com/vaadin/tests/components/draganddropwrapper/DragAndDropDisable.html
index 50b66a3b68..50b66a3b68 100644
--- a/uitest/src/com/vaadin/tests/components/draganddropwrapper/DragAndDropDisable.html
+++ b/uitest/tb2/com/vaadin/tests/components/draganddropwrapper/DragAndDropDisable.html
diff --git a/uitest/src/com/vaadin/tests/components/draganddropwrapper/DragAndDropWrapperInPanel.html b/uitest/tb2/com/vaadin/tests/components/draganddropwrapper/DragAndDropWrapperInPanel.html
index e98c8bd41c..e98c8bd41c 100644
--- a/uitest/src/com/vaadin/tests/components/draganddropwrapper/DragAndDropWrapperInPanel.html
+++ b/uitest/tb2/com/vaadin/tests/components/draganddropwrapper/DragAndDropWrapperInPanel.html
diff --git a/uitest/src/com/vaadin/tests/components/draganddropwrapper/TooltipHandlingWhenNotDefined.html b/uitest/tb2/com/vaadin/tests/components/draganddropwrapper/TooltipHandlingWhenNotDefined.html
index c85d7e0626..c85d7e0626 100644
--- a/uitest/src/com/vaadin/tests/components/draganddropwrapper/TooltipHandlingWhenNotDefined.html
+++ b/uitest/tb2/com/vaadin/tests/components/draganddropwrapper/TooltipHandlingWhenNotDefined.html
diff --git a/uitest/src/com/vaadin/tests/components/embedded/EmbeddedAltText.html b/uitest/tb2/com/vaadin/tests/components/embedded/EmbeddedAltText.html
index 066c55fe55..066c55fe55 100644
--- a/uitest/src/com/vaadin/tests/components/embedded/EmbeddedAltText.html
+++ b/uitest/tb2/com/vaadin/tests/components/embedded/EmbeddedAltText.html
diff --git a/uitest/src/com/vaadin/tests/components/embedded/EmbeddedClickListenerRelativeCoordinates.html b/uitest/tb2/com/vaadin/tests/components/embedded/EmbeddedClickListenerRelativeCoordinates.html
index ae81cfe61c..ae81cfe61c 100644
--- a/uitest/src/com/vaadin/tests/components/embedded/EmbeddedClickListenerRelativeCoordinates.html
+++ b/uitest/tb2/com/vaadin/tests/components/embedded/EmbeddedClickListenerRelativeCoordinates.html
diff --git a/uitest/src/com/vaadin/tests/components/embedded/EmbeddedPdf.html b/uitest/tb2/com/vaadin/tests/components/embedded/EmbeddedPdf.html
index c550b0f5d9..c550b0f5d9 100644
--- a/uitest/src/com/vaadin/tests/components/embedded/EmbeddedPdf.html
+++ b/uitest/tb2/com/vaadin/tests/components/embedded/EmbeddedPdf.html
diff --git a/uitest/src/com/vaadin/tests/components/embedded/FlashIsVisible.html b/uitest/tb2/com/vaadin/tests/components/embedded/FlashIsVisible.html
index ffa2ac11ec..ffa2ac11ec 100644
--- a/uitest/src/com/vaadin/tests/components/embedded/FlashIsVisible.html
+++ b/uitest/tb2/com/vaadin/tests/components/embedded/FlashIsVisible.html
diff --git a/uitest/src/com/vaadin/tests/components/flash/FlashIsVisible.html b/uitest/tb2/com/vaadin/tests/components/flash/FlashIsVisible.html
index f3f8f50526..f3f8f50526 100644
--- a/uitest/src/com/vaadin/tests/components/flash/FlashIsVisible.html
+++ b/uitest/tb2/com/vaadin/tests/components/flash/FlashIsVisible.html
diff --git a/uitest/src/com/vaadin/tests/components/form/FormCaptionClickFocusing.html b/uitest/tb2/com/vaadin/tests/components/form/FormCaptionClickFocusing.html
index 14dbc6d4c8..14dbc6d4c8 100644
--- a/uitest/src/com/vaadin/tests/components/form/FormCaptionClickFocusing.html
+++ b/uitest/tb2/com/vaadin/tests/components/form/FormCaptionClickFocusing.html
diff --git a/uitest/src/com/vaadin/tests/components/form/FormClearDatasourceRepaint.html b/uitest/tb2/com/vaadin/tests/components/form/FormClearDatasourceRepaint.html
index 200ddb547d..200ddb547d 100644
--- a/uitest/src/com/vaadin/tests/components/form/FormClearDatasourceRepaint.html
+++ b/uitest/tb2/com/vaadin/tests/components/form/FormClearDatasourceRepaint.html
diff --git a/uitest/src/com/vaadin/tests/components/form/FormCommitWithInvalidValues.html b/uitest/tb2/com/vaadin/tests/components/form/FormCommitWithInvalidValues.html
index 0d5b435609..0d5b435609 100644
--- a/uitest/src/com/vaadin/tests/components/form/FormCommitWithInvalidValues.html
+++ b/uitest/tb2/com/vaadin/tests/components/form/FormCommitWithInvalidValues.html
diff --git a/uitest/src/com/vaadin/tests/components/form/FormDescription.html b/uitest/tb2/com/vaadin/tests/components/form/FormDescription.html
index 7cf93c6125..7cf93c6125 100644
--- a/uitest/src/com/vaadin/tests/components/form/FormDescription.html
+++ b/uitest/tb2/com/vaadin/tests/components/form/FormDescription.html
diff --git a/uitest/src/com/vaadin/tests/components/form/FormDescriptions.html b/uitest/tb2/com/vaadin/tests/components/form/FormDescriptions.html
index 1c6562ac52..1c6562ac52 100644
--- a/uitest/src/com/vaadin/tests/components/form/FormDescriptions.html
+++ b/uitest/tb2/com/vaadin/tests/components/form/FormDescriptions.html
diff --git a/uitest/src/com/vaadin/tests/components/form/FormErrorVisible.html b/uitest/tb2/com/vaadin/tests/components/form/FormErrorVisible.html
index 4abf8dc6ec..4abf8dc6ec 100644
--- a/uitest/src/com/vaadin/tests/components/form/FormErrorVisible.html
+++ b/uitest/tb2/com/vaadin/tests/components/form/FormErrorVisible.html
diff --git a/uitest/src/com/vaadin/tests/components/form/FormFieldCaptionsStyles.html b/uitest/tb2/com/vaadin/tests/components/form/FormFieldCaptionsStyles.html
index 10ebb37529..10ebb37529 100644
--- a/uitest/src/com/vaadin/tests/components/form/FormFieldCaptionsStyles.html
+++ b/uitest/tb2/com/vaadin/tests/components/form/FormFieldCaptionsStyles.html
diff --git a/uitest/src/com/vaadin/tests/components/form/FormFieldFactoryAndLayouts.html b/uitest/tb2/com/vaadin/tests/components/form/FormFieldFactoryAndLayouts.html
index c9d3dbef93..c9d3dbef93 100644
--- a/uitest/src/com/vaadin/tests/components/form/FormFieldFactoryAndLayouts.html
+++ b/uitest/tb2/com/vaadin/tests/components/form/FormFieldFactoryAndLayouts.html
diff --git a/uitest/src/com/vaadin/tests/components/form/FormPrimaryStyleName.html b/uitest/tb2/com/vaadin/tests/components/form/FormPrimaryStyleName.html
index a4b738a36d..a4b738a36d 100644
--- a/uitest/src/com/vaadin/tests/components/form/FormPrimaryStyleName.html
+++ b/uitest/tb2/com/vaadin/tests/components/form/FormPrimaryStyleName.html
diff --git a/uitest/src/com/vaadin/tests/components/form/FormWithEnterShortcut.html b/uitest/tb2/com/vaadin/tests/components/form/FormWithEnterShortcut.html
index 9680ef7022..9680ef7022 100644
--- a/uitest/src/com/vaadin/tests/components/form/FormWithEnterShortcut.html
+++ b/uitest/tb2/com/vaadin/tests/components/form/FormWithEnterShortcut.html
diff --git a/uitest/src/com/vaadin/tests/components/form/FormWithPaddingsAndBorders.html b/uitest/tb2/com/vaadin/tests/components/form/FormWithPaddingsAndBorders.html
index 384cc6c398..384cc6c398 100644
--- a/uitest/src/com/vaadin/tests/components/form/FormWithPaddingsAndBorders.html
+++ b/uitest/tb2/com/vaadin/tests/components/form/FormWithPaddingsAndBorders.html
diff --git a/uitest/src/com/vaadin/tests/components/form/UndefinedWideFormWithRelativeWideFooter.html b/uitest/tb2/com/vaadin/tests/components/form/UndefinedWideFormWithRelativeWideFooter.html
index ade84de312..ade84de312 100644
--- a/uitest/src/com/vaadin/tests/components/form/UndefinedWideFormWithRelativeWideFooter.html
+++ b/uitest/tb2/com/vaadin/tests/components/form/UndefinedWideFormWithRelativeWideFooter.html
diff --git a/uitest/src/com/vaadin/tests/components/formlayout/CaptionEnableDisable.html b/uitest/tb2/com/vaadin/tests/components/formlayout/CaptionEnableDisable.html
index 87bf0edb49..87bf0edb49 100644
--- a/uitest/src/com/vaadin/tests/components/formlayout/CaptionEnableDisable.html
+++ b/uitest/tb2/com/vaadin/tests/components/formlayout/CaptionEnableDisable.html
diff --git a/uitest/src/com/vaadin/tests/components/formlayout/FormLayoutCaptionStyles.html b/uitest/tb2/com/vaadin/tests/components/formlayout/FormLayoutCaptionStyles.html
index 14b5cc4c53..14b5cc4c53 100644
--- a/uitest/src/com/vaadin/tests/components/formlayout/FormLayoutCaptionStyles.html
+++ b/uitest/tb2/com/vaadin/tests/components/formlayout/FormLayoutCaptionStyles.html
diff --git a/uitest/src/com/vaadin/tests/components/formlayout/FormLayoutErrorHover.html b/uitest/tb2/com/vaadin/tests/components/formlayout/FormLayoutErrorHover.html
index 7733da4e95..7733da4e95 100644
--- a/uitest/src/com/vaadin/tests/components/formlayout/FormLayoutErrorHover.html
+++ b/uitest/tb2/com/vaadin/tests/components/formlayout/FormLayoutErrorHover.html
diff --git a/uitest/src/com/vaadin/tests/components/formlayout/NestedFormLayouts.html b/uitest/tb2/com/vaadin/tests/components/formlayout/NestedFormLayouts.html
index a95aecac80..a95aecac80 100644
--- a/uitest/src/com/vaadin/tests/components/formlayout/NestedFormLayouts.html
+++ b/uitest/tb2/com/vaadin/tests/components/formlayout/NestedFormLayouts.html
diff --git a/uitest/src/com/vaadin/tests/components/gridlayout/InsertRowInMiddle.html b/uitest/tb2/com/vaadin/tests/components/gridlayout/InsertRowInMiddle.html
index 7de29edd1b..7de29edd1b 100644
--- a/uitest/src/com/vaadin/tests/components/gridlayout/InsertRowInMiddle.html
+++ b/uitest/tb2/com/vaadin/tests/components/gridlayout/InsertRowInMiddle.html
diff --git a/uitest/src/com/vaadin/tests/components/gridlayout/LayoutAfterHidingError.html b/uitest/tb2/com/vaadin/tests/components/gridlayout/LayoutAfterHidingError.html
index 0ad58823be..0ad58823be 100644
--- a/uitest/src/com/vaadin/tests/components/gridlayout/LayoutAfterHidingError.html
+++ b/uitest/tb2/com/vaadin/tests/components/gridlayout/LayoutAfterHidingError.html
diff --git a/uitest/src/com/vaadin/tests/components/image/ImageAltText.html b/uitest/tb2/com/vaadin/tests/components/image/ImageAltText.html
index 743aa5caaf..743aa5caaf 100644
--- a/uitest/src/com/vaadin/tests/components/image/ImageAltText.html
+++ b/uitest/tb2/com/vaadin/tests/components/image/ImageAltText.html
diff --git a/uitest/src/com/vaadin/tests/components/image/ImageClicks.html b/uitest/tb2/com/vaadin/tests/components/image/ImageClicks.html
index 14afaab98d..14afaab98d 100644
--- a/uitest/src/com/vaadin/tests/components/image/ImageClicks.html
+++ b/uitest/tb2/com/vaadin/tests/components/image/ImageClicks.html
diff --git a/uitest/src/com/vaadin/tests/components/javascriptcomponent/BasicJavaScriptComponent.html b/uitest/tb2/com/vaadin/tests/components/javascriptcomponent/BasicJavaScriptComponent.html
index d7024b2972..d7024b2972 100644
--- a/uitest/src/com/vaadin/tests/components/javascriptcomponent/BasicJavaScriptComponent.html
+++ b/uitest/tb2/com/vaadin/tests/components/javascriptcomponent/BasicJavaScriptComponent.html
diff --git a/uitest/src/com/vaadin/tests/components/javascriptcomponent/JavaScriptResizeListener.html b/uitest/tb2/com/vaadin/tests/components/javascriptcomponent/JavaScriptResizeListener.html
index 53af1d4ceb..53af1d4ceb 100644
--- a/uitest/src/com/vaadin/tests/components/javascriptcomponent/JavaScriptResizeListener.html
+++ b/uitest/tb2/com/vaadin/tests/components/javascriptcomponent/JavaScriptResizeListener.html
diff --git a/uitest/src/com/vaadin/tests/components/label/HundredPercentWideLabelResize.html b/uitest/tb2/com/vaadin/tests/components/label/HundredPercentWideLabelResize.html
index 667f08ba4f..667f08ba4f 100644
--- a/uitest/src/com/vaadin/tests/components/label/HundredPercentWideLabelResize.html
+++ b/uitest/tb2/com/vaadin/tests/components/label/HundredPercentWideLabelResize.html
diff --git a/uitest/src/com/vaadin/tests/components/label/LabelPropertySourceValue.html b/uitest/tb2/com/vaadin/tests/components/label/LabelPropertySourceValue.html
index e62ef4bba1..e62ef4bba1 100644
--- a/uitest/src/com/vaadin/tests/components/label/LabelPropertySourceValue.html
+++ b/uitest/tb2/com/vaadin/tests/components/label/LabelPropertySourceValue.html
diff --git a/uitest/src/com/vaadin/tests/components/label/LabelTooltip-chameleon.html b/uitest/tb2/com/vaadin/tests/components/label/LabelTooltip-chameleon.html
index 8a042ede92..8a042ede92 100644
--- a/uitest/src/com/vaadin/tests/components/label/LabelTooltip-chameleon.html
+++ b/uitest/tb2/com/vaadin/tests/components/label/LabelTooltip-chameleon.html
diff --git a/uitest/src/com/vaadin/tests/components/label/LabelTooltip-runo.html b/uitest/tb2/com/vaadin/tests/components/label/LabelTooltip-runo.html
index 34fb088ff9..34fb088ff9 100644
--- a/uitest/src/com/vaadin/tests/components/label/LabelTooltip-runo.html
+++ b/uitest/tb2/com/vaadin/tests/components/label/LabelTooltip-runo.html
diff --git a/uitest/src/com/vaadin/tests/components/label/LabelTooltip.html b/uitest/tb2/com/vaadin/tests/components/label/LabelTooltip.html
index 05da9195ef..05da9195ef 100644
--- a/uitest/src/com/vaadin/tests/components/label/LabelTooltip.html
+++ b/uitest/tb2/com/vaadin/tests/components/label/LabelTooltip.html
diff --git a/uitest/src/com/vaadin/tests/components/label/LabelWrapping.html b/uitest/tb2/com/vaadin/tests/components/label/LabelWrapping.html
index b8038a75b4..b8038a75b4 100644
--- a/uitest/src/com/vaadin/tests/components/label/LabelWrapping.html
+++ b/uitest/tb2/com/vaadin/tests/components/label/LabelWrapping.html
diff --git a/uitest/src/com/vaadin/tests/components/label/Labels.html b/uitest/tb2/com/vaadin/tests/components/label/Labels.html
index 46ff066d8c..46ff066d8c 100644
--- a/uitest/src/com/vaadin/tests/components/label/Labels.html
+++ b/uitest/tb2/com/vaadin/tests/components/label/Labels.html
diff --git a/uitest/src/com/vaadin/tests/components/label/MarginsInLabels.html b/uitest/tb2/com/vaadin/tests/components/label/MarginsInLabels.html
index 080200092d..080200092d 100644
--- a/uitest/src/com/vaadin/tests/components/label/MarginsInLabels.html
+++ b/uitest/tb2/com/vaadin/tests/components/label/MarginsInLabels.html
diff --git a/uitest/src/com/vaadin/tests/components/link/LinkToPercentage.html b/uitest/tb2/com/vaadin/tests/components/link/LinkToPercentage.html
index 328b884478..328b884478 100644
--- a/uitest/src/com/vaadin/tests/components/link/LinkToPercentage.html
+++ b/uitest/tb2/com/vaadin/tests/components/link/LinkToPercentage.html
diff --git a/uitest/src/com/vaadin/tests/components/listselect/ListSelectAllowNewItem.html b/uitest/tb2/com/vaadin/tests/components/listselect/ListSelectAllowNewItem.html
index ad5eda1ace..ad5eda1ace 100644
--- a/uitest/src/com/vaadin/tests/components/listselect/ListSelectAllowNewItem.html
+++ b/uitest/tb2/com/vaadin/tests/components/listselect/ListSelectAllowNewItem.html
diff --git a/uitest/src/com/vaadin/tests/components/listselect/ListSelectJump.html b/uitest/tb2/com/vaadin/tests/components/listselect/ListSelectJump.html
index f066d488e6..f066d488e6 100644
--- a/uitest/src/com/vaadin/tests/components/listselect/ListSelectJump.html
+++ b/uitest/tb2/com/vaadin/tests/components/listselect/ListSelectJump.html
diff --git a/uitest/src/com/vaadin/tests/components/listselect/ListSelectParentDisabled.html b/uitest/tb2/com/vaadin/tests/components/listselect/ListSelectParentDisabled.html
index 886f454dcb..886f454dcb 100644
--- a/uitest/src/com/vaadin/tests/components/listselect/ListSelectParentDisabled.html
+++ b/uitest/tb2/com/vaadin/tests/components/listselect/ListSelectParentDisabled.html
diff --git a/uitest/src/com/vaadin/tests/components/listselect/ListSelectPrimaryStylename.html b/uitest/tb2/com/vaadin/tests/components/listselect/ListSelectPrimaryStylename.html
index 7dbb99d0e6..7dbb99d0e6 100644
--- a/uitest/src/com/vaadin/tests/components/listselect/ListSelectPrimaryStylename.html
+++ b/uitest/tb2/com/vaadin/tests/components/listselect/ListSelectPrimaryStylename.html
diff --git a/uitest/src/com/vaadin/tests/components/listselect/ListSelectSelection.html b/uitest/tb2/com/vaadin/tests/components/listselect/ListSelectSelection.html
index 9820e044f7..9820e044f7 100644
--- a/uitest/src/com/vaadin/tests/components/listselect/ListSelectSelection.html
+++ b/uitest/tb2/com/vaadin/tests/components/listselect/ListSelectSelection.html
diff --git a/uitest/src/com/vaadin/tests/components/loginform/CustomizedLoginFormTest.html b/uitest/tb2/com/vaadin/tests/components/loginform/CustomizedLoginFormTest.html
index 5a2a0d839a..5a2a0d839a 100644
--- a/uitest/src/com/vaadin/tests/components/loginform/CustomizedLoginFormTest.html
+++ b/uitest/tb2/com/vaadin/tests/components/loginform/CustomizedLoginFormTest.html
diff --git a/uitest/src/com/vaadin/tests/components/loginform/LoginFormTest.html b/uitest/tb2/com/vaadin/tests/components/loginform/LoginFormTest.html
index daaefab48c..daaefab48c 100644
--- a/uitest/src/com/vaadin/tests/components/loginform/LoginFormTest.html
+++ b/uitest/tb2/com/vaadin/tests/components/loginform/LoginFormTest.html
diff --git a/uitest/src/com/vaadin/tests/components/loginform/LoginFormUIInLoginHandler.html b/uitest/tb2/com/vaadin/tests/components/loginform/LoginFormUIInLoginHandler.html
index 3c0a50d11d..3c0a50d11d 100755
--- a/uitest/src/com/vaadin/tests/components/loginform/LoginFormUIInLoginHandler.html
+++ b/uitest/tb2/com/vaadin/tests/components/loginform/LoginFormUIInLoginHandler.html
diff --git a/uitest/src/com/vaadin/tests/components/media/AudioTest.html b/uitest/tb2/com/vaadin/tests/components/media/AudioTest.html
index 8425cad38a..8425cad38a 100644
--- a/uitest/src/com/vaadin/tests/components/media/AudioTest.html
+++ b/uitest/tb2/com/vaadin/tests/components/media/AudioTest.html
diff --git a/uitest/src/com/vaadin/tests/components/menubar/IconsInRootMenuBar.html b/uitest/tb2/com/vaadin/tests/components/menubar/IconsInRootMenuBar.html
index dfb74f9d34..dfb74f9d34 100644
--- a/uitest/src/com/vaadin/tests/components/menubar/IconsInRootMenuBar.html
+++ b/uitest/tb2/com/vaadin/tests/components/menubar/IconsInRootMenuBar.html
diff --git a/uitest/src/com/vaadin/tests/components/menubar/IconsInSubMenus.html b/uitest/tb2/com/vaadin/tests/components/menubar/IconsInSubMenus.html
index 87f6f7a65e..87f6f7a65e 100644
--- a/uitest/src/com/vaadin/tests/components/menubar/IconsInSubMenus.html
+++ b/uitest/tb2/com/vaadin/tests/components/menubar/IconsInSubMenus.html
diff --git a/uitest/src/com/vaadin/tests/components/menubar/MenuBarFocus.html b/uitest/tb2/com/vaadin/tests/components/menubar/MenuBarFocus.html
index cd8de3757a..cd8de3757a 100644
--- a/uitest/src/com/vaadin/tests/components/menubar/MenuBarFocus.html
+++ b/uitest/tb2/com/vaadin/tests/components/menubar/MenuBarFocus.html
diff --git a/uitest/src/com/vaadin/tests/components/menubar/MenuBarHtmlItems.html b/uitest/tb2/com/vaadin/tests/components/menubar/MenuBarHtmlItems.html
index 2878018752..2878018752 100644
--- a/uitest/src/com/vaadin/tests/components/menubar/MenuBarHtmlItems.html
+++ b/uitest/tb2/com/vaadin/tests/components/menubar/MenuBarHtmlItems.html
diff --git a/uitest/src/com/vaadin/tests/components/menubar/MenuBarItemsCheckable.html b/uitest/tb2/com/vaadin/tests/components/menubar/MenuBarItemsCheckable.html
index ebdfa81f20..ebdfa81f20 100644
--- a/uitest/src/com/vaadin/tests/components/menubar/MenuBarItemsCheckable.html
+++ b/uitest/tb2/com/vaadin/tests/components/menubar/MenuBarItemsCheckable.html
diff --git a/uitest/src/com/vaadin/tests/components/menubar/MenuBarLongMenus.html b/uitest/tb2/com/vaadin/tests/components/menubar/MenuBarLongMenus.html
index 7170a98325..7170a98325 100644
--- a/uitest/src/com/vaadin/tests/components/menubar/MenuBarLongMenus.html
+++ b/uitest/tb2/com/vaadin/tests/components/menubar/MenuBarLongMenus.html
diff --git a/uitest/src/com/vaadin/tests/components/menubar/MenuBarNavigationKeyboard.html b/uitest/tb2/com/vaadin/tests/components/menubar/MenuBarNavigationKeyboard.html
index a3d7700dae..a3d7700dae 100644
--- a/uitest/src/com/vaadin/tests/components/menubar/MenuBarNavigationKeyboard.html
+++ b/uitest/tb2/com/vaadin/tests/components/menubar/MenuBarNavigationKeyboard.html
diff --git a/uitest/src/com/vaadin/tests/components/menubar/MenuBarNavigationMouse.html b/uitest/tb2/com/vaadin/tests/components/menubar/MenuBarNavigationMouse.html
index 421966876b..421966876b 100644
--- a/uitest/src/com/vaadin/tests/components/menubar/MenuBarNavigationMouse.html
+++ b/uitest/tb2/com/vaadin/tests/components/menubar/MenuBarNavigationMouse.html
diff --git a/uitest/src/com/vaadin/tests/components/menubar/MenuBarPrimaryStylenames.html b/uitest/tb2/com/vaadin/tests/components/menubar/MenuBarPrimaryStylenames.html
index 3a8e8d81af..3a8e8d81af 100644
--- a/uitest/src/com/vaadin/tests/components/menubar/MenuBarPrimaryStylenames.html
+++ b/uitest/tb2/com/vaadin/tests/components/menubar/MenuBarPrimaryStylenames.html
diff --git a/uitest/src/com/vaadin/tests/components/menubar/MenuBarResize.html b/uitest/tb2/com/vaadin/tests/components/menubar/MenuBarResize.html
index 97006323a2..97006323a2 100644
--- a/uitest/src/com/vaadin/tests/components/menubar/MenuBarResize.html
+++ b/uitest/tb2/com/vaadin/tests/components/menubar/MenuBarResize.html
diff --git a/uitest/src/com/vaadin/tests/components/menubar/MenuBarRootItemSelectWithKeyboard.html b/uitest/tb2/com/vaadin/tests/components/menubar/MenuBarRootItemSelectWithKeyboard.html
index a53757a969..a53757a969 100644
--- a/uitest/src/com/vaadin/tests/components/menubar/MenuBarRootItemSelectWithKeyboard.html
+++ b/uitest/tb2/com/vaadin/tests/components/menubar/MenuBarRootItemSelectWithKeyboard.html
diff --git a/uitest/src/com/vaadin/tests/components/menubar/MenuBarRunsOutOfBrowser.html b/uitest/tb2/com/vaadin/tests/components/menubar/MenuBarRunsOutOfBrowser.html
index 63f6ff7753..63f6ff7753 100644
--- a/uitest/src/com/vaadin/tests/components/menubar/MenuBarRunsOutOfBrowser.html
+++ b/uitest/tb2/com/vaadin/tests/components/menubar/MenuBarRunsOutOfBrowser.html
diff --git a/uitest/src/com/vaadin/tests/components/menubar/Menubars.html b/uitest/tb2/com/vaadin/tests/components/menubar/Menubars.html
index 93d77f9f36..93d77f9f36 100644
--- a/uitest/src/com/vaadin/tests/components/menubar/Menubars.html
+++ b/uitest/tb2/com/vaadin/tests/components/menubar/Menubars.html
diff --git a/uitest/src/com/vaadin/tests/components/nativebutton/NativeButtonDisableOnClick.html b/uitest/tb2/com/vaadin/tests/components/nativebutton/NativeButtonDisableOnClick.html
index 5f80004c7c..5f80004c7c 100644
--- a/uitest/src/com/vaadin/tests/components/nativebutton/NativeButtonDisableOnClick.html
+++ b/uitest/tb2/com/vaadin/tests/components/nativebutton/NativeButtonDisableOnClick.html
diff --git a/uitest/src/com/vaadin/tests/components/nativebutton/NativeButtonHtml.html b/uitest/tb2/com/vaadin/tests/components/nativebutton/NativeButtonHtml.html
index 8a1b21c35d..8a1b21c35d 100644
--- a/uitest/src/com/vaadin/tests/components/nativebutton/NativeButtonHtml.html
+++ b/uitest/tb2/com/vaadin/tests/components/nativebutton/NativeButtonHtml.html
diff --git a/uitest/src/com/vaadin/tests/components/nativeselect/NativeSelectParentDisabled.html b/uitest/tb2/com/vaadin/tests/components/nativeselect/NativeSelectParentDisabled.html
index a8d3577eba..a8d3577eba 100644
--- a/uitest/src/com/vaadin/tests/components/nativeselect/NativeSelectParentDisabled.html
+++ b/uitest/tb2/com/vaadin/tests/components/nativeselect/NativeSelectParentDisabled.html
diff --git a/uitest/src/com/vaadin/tests/components/notification/CloseErrorNotificationWithEscape.html b/uitest/tb2/com/vaadin/tests/components/notification/CloseErrorNotificationWithEscape.html
index c9d9e186bc..c9d9e186bc 100644
--- a/uitest/src/com/vaadin/tests/components/notification/CloseErrorNotificationWithEscape.html
+++ b/uitest/tb2/com/vaadin/tests/components/notification/CloseErrorNotificationWithEscape.html
diff --git a/uitest/src/com/vaadin/tests/components/notification/Notifications.html b/uitest/tb2/com/vaadin/tests/components/notification/Notifications.html
index 7554175cdb..7554175cdb 100644
--- a/uitest/src/com/vaadin/tests/components/notification/Notifications.html
+++ b/uitest/tb2/com/vaadin/tests/components/notification/Notifications.html
diff --git a/uitest/src/com/vaadin/tests/components/notification/NotificationsAndModalWindow.html b/uitest/tb2/com/vaadin/tests/components/notification/NotificationsAndModalWindow.html
index 35d22da46e..35d22da46e 100644
--- a/uitest/src/com/vaadin/tests/components/notification/NotificationsAndModalWindow.html
+++ b/uitest/tb2/com/vaadin/tests/components/notification/NotificationsAndModalWindow.html
diff --git a/uitest/src/com/vaadin/tests/components/notification/NotificationsHtmlAllowed.html b/uitest/tb2/com/vaadin/tests/components/notification/NotificationsHtmlAllowed.html
index 1e43728f6a..1e43728f6a 100644
--- a/uitest/src/com/vaadin/tests/components/notification/NotificationsHtmlAllowed.html
+++ b/uitest/tb2/com/vaadin/tests/components/notification/NotificationsHtmlAllowed.html
diff --git a/uitest/src/com/vaadin/tests/components/notification/SemitransparentNotification.html b/uitest/tb2/com/vaadin/tests/components/notification/SemitransparentNotification.html
index f125b98ee1..f125b98ee1 100755
--- a/uitest/src/com/vaadin/tests/components/notification/SemitransparentNotification.html
+++ b/uitest/tb2/com/vaadin/tests/components/notification/SemitransparentNotification.html
diff --git a/uitest/src/com/vaadin/tests/components/optiongroup/DisabledOptionGroupItems.html b/uitest/tb2/com/vaadin/tests/components/optiongroup/DisabledOptionGroupItems.html
index 01c033e4fa..01c033e4fa 100644
--- a/uitest/src/com/vaadin/tests/components/optiongroup/DisabledOptionGroupItems.html
+++ b/uitest/tb2/com/vaadin/tests/components/optiongroup/DisabledOptionGroupItems.html
diff --git a/uitest/src/com/vaadin/tests/components/optiongroup/HtmlOptionGroupItems.html b/uitest/tb2/com/vaadin/tests/components/optiongroup/HtmlOptionGroupItems.html
index d74354299d..d74354299d 100644
--- a/uitest/src/com/vaadin/tests/components/optiongroup/HtmlOptionGroupItems.html
+++ b/uitest/tb2/com/vaadin/tests/components/optiongroup/HtmlOptionGroupItems.html
diff --git a/uitest/src/com/vaadin/tests/components/optiongroup/OptionGroupItemIcons.html b/uitest/tb2/com/vaadin/tests/components/optiongroup/OptionGroupItemIcons.html
index 978d911a2d..978d911a2d 100644
--- a/uitest/src/com/vaadin/tests/components/optiongroup/OptionGroupItemIcons.html
+++ b/uitest/tb2/com/vaadin/tests/components/optiongroup/OptionGroupItemIcons.html
diff --git a/uitest/src/com/vaadin/tests/components/optiongroup/OptionGroupParentDisabled.html b/uitest/tb2/com/vaadin/tests/components/optiongroup/OptionGroupParentDisabled.html
index db5a268ecd..db5a268ecd 100644
--- a/uitest/src/com/vaadin/tests/components/optiongroup/OptionGroupParentDisabled.html
+++ b/uitest/tb2/com/vaadin/tests/components/optiongroup/OptionGroupParentDisabled.html
diff --git a/uitest/src/com/vaadin/tests/components/optiongroup/OptionGroupRetainFocusKeyboardValueChange.html b/uitest/tb2/com/vaadin/tests/components/optiongroup/OptionGroupRetainFocusKeyboardValueChange.html
index 046cac0e30..046cac0e30 100644
--- a/uitest/src/com/vaadin/tests/components/optiongroup/OptionGroupRetainFocusKeyboardValueChange.html
+++ b/uitest/tb2/com/vaadin/tests/components/optiongroup/OptionGroupRetainFocusKeyboardValueChange.html
diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/ExpandChangeReattach.html b/uitest/tb2/com/vaadin/tests/components/orderedlayout/ExpandChangeReattach.html
index 8fbd3d215b..8fbd3d215b 100644
--- a/uitest/src/com/vaadin/tests/components/orderedlayout/ExpandChangeReattach.html
+++ b/uitest/tb2/com/vaadin/tests/components/orderedlayout/ExpandChangeReattach.html
diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/HorizontalLayoutVerticalAlign.html b/uitest/tb2/com/vaadin/tests/components/orderedlayout/HorizontalLayoutVerticalAlign.html
index d16e4a3354..d16e4a3354 100644
--- a/uitest/src/com/vaadin/tests/components/orderedlayout/HorizontalLayoutVerticalAlign.html
+++ b/uitest/tb2/com/vaadin/tests/components/orderedlayout/HorizontalLayoutVerticalAlign.html
diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/HorizontalRelativeChildren.html b/uitest/tb2/com/vaadin/tests/components/orderedlayout/HorizontalRelativeChildren.html
index 1957637bcb..1957637bcb 100644
--- a/uitest/src/com/vaadin/tests/components/orderedlayout/HorizontalRelativeChildren.html
+++ b/uitest/tb2/com/vaadin/tests/components/orderedlayout/HorizontalRelativeChildren.html
diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/HorizontalRelativeSizeWithoutExpand.html b/uitest/tb2/com/vaadin/tests/components/orderedlayout/HorizontalRelativeSizeWithoutExpand.html
index 06de880bcf..06de880bcf 100755
--- a/uitest/src/com/vaadin/tests/components/orderedlayout/HorizontalRelativeSizeWithoutExpand.html
+++ b/uitest/tb2/com/vaadin/tests/components/orderedlayout/HorizontalRelativeSizeWithoutExpand.html
diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/InsertComponentInHorizontalLayout.html b/uitest/tb2/com/vaadin/tests/components/orderedlayout/InsertComponentInHorizontalLayout.html
index 11b343077a..11b343077a 100755
--- a/uitest/src/com/vaadin/tests/components/orderedlayout/InsertComponentInHorizontalLayout.html
+++ b/uitest/tb2/com/vaadin/tests/components/orderedlayout/InsertComponentInHorizontalLayout.html
diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/LayoutClickListenerTest.html b/uitest/tb2/com/vaadin/tests/components/orderedlayout/LayoutClickListenerTest.html
index f0fd1568b1..f0fd1568b1 100644
--- a/uitest/src/com/vaadin/tests/components/orderedlayout/LayoutClickListenerTest.html
+++ b/uitest/tb2/com/vaadin/tests/components/orderedlayout/LayoutClickListenerTest.html
diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.html b/uitest/tb2/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.html
index 9e1400521b..9e1400521b 100644
--- a/uitest/src/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.html
+++ b/uitest/tb2/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.html
diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/OrderedLayoutComponentOrdering.html b/uitest/tb2/com/vaadin/tests/components/orderedlayout/OrderedLayoutComponentOrdering.html
index ba75d7e56e..ba75d7e56e 100644
--- a/uitest/src/com/vaadin/tests/components/orderedlayout/OrderedLayoutComponentOrdering.html
+++ b/uitest/tb2/com/vaadin/tests/components/orderedlayout/OrderedLayoutComponentOrdering.html
diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/OrderedLayoutSlotStyleNames.html b/uitest/tb2/com/vaadin/tests/components/orderedlayout/OrderedLayoutSlotStyleNames.html
index adfc8fb7c7..adfc8fb7c7 100644
--- a/uitest/src/com/vaadin/tests/components/orderedlayout/OrderedLayoutSlotStyleNames.html
+++ b/uitest/tb2/com/vaadin/tests/components/orderedlayout/OrderedLayoutSlotStyleNames.html
diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/RelativeChildWithoutExpand.html b/uitest/tb2/com/vaadin/tests/components/orderedlayout/RelativeChildWithoutExpand.html
index c7f75ff55a..c7f75ff55a 100644
--- a/uitest/src/com/vaadin/tests/components/orderedlayout/RelativeChildWithoutExpand.html
+++ b/uitest/tb2/com/vaadin/tests/components/orderedlayout/RelativeChildWithoutExpand.html
diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/RelativeChildrenWithoutExpand.html b/uitest/tb2/com/vaadin/tests/components/orderedlayout/RelativeChildrenWithoutExpand.html
index 46252bc447..46252bc447 100644
--- a/uitest/src/com/vaadin/tests/components/orderedlayout/RelativeChildrenWithoutExpand.html
+++ b/uitest/tb2/com/vaadin/tests/components/orderedlayout/RelativeChildrenWithoutExpand.html
diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/ReplaceComponentNPE.html b/uitest/tb2/com/vaadin/tests/components/orderedlayout/ReplaceComponentNPE.html
index 7a071030dc..7a071030dc 100644
--- a/uitest/src/com/vaadin/tests/components/orderedlayout/ReplaceComponentNPE.html
+++ b/uitest/tb2/com/vaadin/tests/components/orderedlayout/ReplaceComponentNPE.html
diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/VerticalLayoutChangingChildrenSizes.html b/uitest/tb2/com/vaadin/tests/components/orderedlayout/VerticalLayoutChangingChildrenSizes.html
index 8b6a8d7d26..8b6a8d7d26 100644
--- a/uitest/src/com/vaadin/tests/components/orderedlayout/VerticalLayoutChangingChildrenSizes.html
+++ b/uitest/tb2/com/vaadin/tests/components/orderedlayout/VerticalLayoutChangingChildrenSizes.html
diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/VerticalLayoutWidthCalculation.html b/uitest/tb2/com/vaadin/tests/components/orderedlayout/VerticalLayoutWidthCalculation.html
index f0d837d97a..f0d837d97a 100644
--- a/uitest/src/com/vaadin/tests/components/orderedlayout/VerticalLayoutWidthCalculation.html
+++ b/uitest/tb2/com/vaadin/tests/components/orderedlayout/VerticalLayoutWidthCalculation.html
diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/VerticalRelativeChildren.html b/uitest/tb2/com/vaadin/tests/components/orderedlayout/VerticalRelativeChildren.html
index bcff408592..bcff408592 100644
--- a/uitest/src/com/vaadin/tests/components/orderedlayout/VerticalRelativeChildren.html
+++ b/uitest/tb2/com/vaadin/tests/components/orderedlayout/VerticalRelativeChildren.html
diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/VerticalRelativeSizeWithoutExpand.html b/uitest/tb2/com/vaadin/tests/components/orderedlayout/VerticalRelativeSizeWithoutExpand.html
index caf4347b45..caf4347b45 100755
--- a/uitest/src/com/vaadin/tests/components/orderedlayout/VerticalRelativeSizeWithoutExpand.html
+++ b/uitest/tb2/com/vaadin/tests/components/orderedlayout/VerticalRelativeSizeWithoutExpand.html
diff --git a/uitest/src/com/vaadin/tests/components/page/PageReload.html b/uitest/tb2/com/vaadin/tests/components/page/PageReload.html
index 20d61a48f1..20d61a48f1 100644
--- a/uitest/src/com/vaadin/tests/components/page/PageReload.html
+++ b/uitest/tb2/com/vaadin/tests/components/page/PageReload.html
diff --git a/uitest/src/com/vaadin/tests/components/panel/PanelChangeContents.html b/uitest/tb2/com/vaadin/tests/components/panel/PanelChangeContents.html
index bff19c4846..bff19c4846 100644
--- a/uitest/src/com/vaadin/tests/components/panel/PanelChangeContents.html
+++ b/uitest/tb2/com/vaadin/tests/components/panel/PanelChangeContents.html
diff --git a/uitest/src/com/vaadin/tests/components/panel/PanelClickListenerRelativeCoordinates.html b/uitest/tb2/com/vaadin/tests/components/panel/PanelClickListenerRelativeCoordinates.html
index 4b71c5a9a9..4b71c5a9a9 100644
--- a/uitest/src/com/vaadin/tests/components/panel/PanelClickListenerRelativeCoordinates.html
+++ b/uitest/tb2/com/vaadin/tests/components/panel/PanelClickListenerRelativeCoordinates.html
diff --git a/uitest/src/com/vaadin/tests/components/panel/PanelShouldNotScroll.html b/uitest/tb2/com/vaadin/tests/components/panel/PanelShouldNotScroll.html
index 8b03ca330f..8b03ca330f 100644
--- a/uitest/src/com/vaadin/tests/components/panel/PanelShouldNotScroll.html
+++ b/uitest/tb2/com/vaadin/tests/components/panel/PanelShouldNotScroll.html
diff --git a/uitest/src/com/vaadin/tests/components/panel/WebkitScrollbarTest.html b/uitest/tb2/com/vaadin/tests/components/panel/WebkitScrollbarTest.html
index ee33ee2bf0..ee33ee2bf0 100644
--- a/uitest/src/com/vaadin/tests/components/panel/WebkitScrollbarTest.html
+++ b/uitest/tb2/com/vaadin/tests/components/panel/WebkitScrollbarTest.html
diff --git a/uitest/src/com/vaadin/tests/components/passwordfield/PasswordFieldBasicStates.html b/uitest/tb2/com/vaadin/tests/components/passwordfield/PasswordFieldBasicStates.html
index ed671c9104..ed671c9104 100644
--- a/uitest/src/com/vaadin/tests/components/passwordfield/PasswordFieldBasicStates.html
+++ b/uitest/tb2/com/vaadin/tests/components/passwordfield/PasswordFieldBasicStates.html
diff --git a/uitest/src/com/vaadin/tests/components/popupview/ClickingWhilePopupOpen.html b/uitest/tb2/com/vaadin/tests/components/popupview/ClickingWhilePopupOpen.html
index 43f1c2e8ed..43f1c2e8ed 100644
--- a/uitest/src/com/vaadin/tests/components/popupview/ClickingWhilePopupOpen.html
+++ b/uitest/tb2/com/vaadin/tests/components/popupview/ClickingWhilePopupOpen.html
diff --git a/uitest/src/com/vaadin/tests/components/popupview/PopupViewClickShortcut.html b/uitest/tb2/com/vaadin/tests/components/popupview/PopupViewClickShortcut.html
index 7f787017a0..7f787017a0 100644
--- a/uitest/src/com/vaadin/tests/components/popupview/PopupViewClickShortcut.html
+++ b/uitest/tb2/com/vaadin/tests/components/popupview/PopupViewClickShortcut.html
diff --git a/uitest/src/com/vaadin/tests/components/popupview/PopupViewInEmbeddedApplication.html b/uitest/tb2/com/vaadin/tests/components/popupview/PopupViewInEmbeddedApplication.html
index d2ca843cf5..d2ca843cf5 100644
--- a/uitest/src/com/vaadin/tests/components/popupview/PopupViewInEmbeddedApplication.html
+++ b/uitest/tb2/com/vaadin/tests/components/popupview/PopupViewInEmbeddedApplication.html
diff --git a/uitest/src/com/vaadin/tests/components/popupview/PopupViewOffScreen.html b/uitest/tb2/com/vaadin/tests/components/popupview/PopupViewOffScreen.html
index 99ee864179..99ee864179 100644
--- a/uitest/src/com/vaadin/tests/components/popupview/PopupViewOffScreen.html
+++ b/uitest/tb2/com/vaadin/tests/components/popupview/PopupViewOffScreen.html
diff --git a/uitest/src/com/vaadin/tests/components/popupview/PopupViewShouldCloseOnTabOut.html b/uitest/tb2/com/vaadin/tests/components/popupview/PopupViewShouldCloseOnTabOut.html
index fb62215f16..fb62215f16 100644
--- a/uitest/src/com/vaadin/tests/components/popupview/PopupViewShouldCloseOnTabOut.html
+++ b/uitest/tb2/com/vaadin/tests/components/popupview/PopupViewShouldCloseOnTabOut.html
diff --git a/uitest/src/com/vaadin/tests/components/popupview/ReopenPopupView.html b/uitest/tb2/com/vaadin/tests/components/popupview/ReopenPopupView.html
index a8d1407005..a8d1407005 100644
--- a/uitest/src/com/vaadin/tests/components/popupview/ReopenPopupView.html
+++ b/uitest/tb2/com/vaadin/tests/components/popupview/ReopenPopupView.html
diff --git a/uitest/src/com/vaadin/tests/components/progressindicator/ProgressBarPrimaryStyleName.html b/uitest/tb2/com/vaadin/tests/components/progressindicator/ProgressBarPrimaryStyleName.html
index 92f678947a..92f678947a 100644
--- a/uitest/src/com/vaadin/tests/components/progressindicator/ProgressBarPrimaryStyleName.html
+++ b/uitest/tb2/com/vaadin/tests/components/progressindicator/ProgressBarPrimaryStyleName.html
diff --git a/uitest/src/com/vaadin/tests/components/progressindicator/ProgressBarTest.html b/uitest/tb2/com/vaadin/tests/components/progressindicator/ProgressBarTest.html
index b7add101f9..b7add101f9 100644
--- a/uitest/src/com/vaadin/tests/components/progressindicator/ProgressBarTest.html
+++ b/uitest/tb2/com/vaadin/tests/components/progressindicator/ProgressBarTest.html
diff --git a/uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreaPreventsTextFieldAccess.html b/uitest/tb2/com/vaadin/tests/components/richtextarea/RichTextAreaPreventsTextFieldAccess.html
index 6601bf9d88..6601bf9d88 100644
--- a/uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreaPreventsTextFieldAccess.html
+++ b/uitest/tb2/com/vaadin/tests/components/richtextarea/RichTextAreaPreventsTextFieldAccess.html
diff --git a/uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreaScrolling.html b/uitest/tb2/com/vaadin/tests/components/richtextarea/RichTextAreaScrolling.html
index be1c5a2cde..be1c5a2cde 100644
--- a/uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreaScrolling.html
+++ b/uitest/tb2/com/vaadin/tests/components/richtextarea/RichTextAreaScrolling.html
diff --git a/uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreaSize.html b/uitest/tb2/com/vaadin/tests/components/richtextarea/RichTextAreaSize.html
index 7708c88e54..7708c88e54 100644
--- a/uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreaSize.html
+++ b/uitest/tb2/com/vaadin/tests/components/richtextarea/RichTextAreaSize.html
diff --git a/uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreaUpdateWhileTyping.html b/uitest/tb2/com/vaadin/tests/components/richtextarea/RichTextAreaUpdateWhileTyping.html
index 6ddd1b4097..6ddd1b4097 100644
--- a/uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreaUpdateWhileTyping.html
+++ b/uitest/tb2/com/vaadin/tests/components/richtextarea/RichTextAreaUpdateWhileTyping.html
diff --git a/uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreas.html b/uitest/tb2/com/vaadin/tests/components/richtextarea/RichTextAreas.html
index 7d96b4185f..7d96b4185f 100644
--- a/uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreas.html
+++ b/uitest/tb2/com/vaadin/tests/components/richtextarea/RichTextAreas.html
diff --git a/uitest/src/com/vaadin/tests/components/select/NativeSelects.html b/uitest/tb2/com/vaadin/tests/components/select/NativeSelects.html
index f9ab8eb3a0..f9ab8eb3a0 100644
--- a/uitest/src/com/vaadin/tests/components/select/NativeSelects.html
+++ b/uitest/tb2/com/vaadin/tests/components/select/NativeSelects.html
diff --git a/uitest/src/com/vaadin/tests/components/select/OptionGroupBasedSelectsParentDisabledScreenshots.html b/uitest/tb2/com/vaadin/tests/components/select/OptionGroupBasedSelectsParentDisabledScreenshots.html
index 4259da836d..4259da836d 100644
--- a/uitest/src/com/vaadin/tests/components/select/OptionGroupBasedSelectsParentDisabledScreenshots.html
+++ b/uitest/tb2/com/vaadin/tests/components/select/OptionGroupBasedSelectsParentDisabledScreenshots.html
diff --git a/uitest/src/com/vaadin/tests/components/select/SelectDisplaysOldValue.html b/uitest/tb2/com/vaadin/tests/components/select/SelectDisplaysOldValue.html
index 122e90e140..122e90e140 100644
--- a/uitest/src/com/vaadin/tests/components/select/SelectDisplaysOldValue.html
+++ b/uitest/tb2/com/vaadin/tests/components/select/SelectDisplaysOldValue.html
diff --git a/uitest/src/com/vaadin/tests/components/select/SelectIconPlacement.html b/uitest/tb2/com/vaadin/tests/components/select/SelectIconPlacement.html
index 90e2e293a3..90e2e293a3 100644
--- a/uitest/src/com/vaadin/tests/components/select/SelectIconPlacement.html
+++ b/uitest/tb2/com/vaadin/tests/components/select/SelectIconPlacement.html
diff --git a/uitest/src/com/vaadin/tests/components/select/SelectItemCaptionRefresh.html b/uitest/tb2/com/vaadin/tests/components/select/SelectItemCaptionRefresh.html
index 2f8532de61..2f8532de61 100644
--- a/uitest/src/com/vaadin/tests/components/select/SelectItemCaptionRefresh.html
+++ b/uitest/tb2/com/vaadin/tests/components/select/SelectItemCaptionRefresh.html
diff --git a/uitest/src/com/vaadin/tests/components/select/StylingPopupOpener.html b/uitest/tb2/com/vaadin/tests/components/select/StylingPopupOpener.html
index 48adf2edfe..48adf2edfe 100644
--- a/uitest/src/com/vaadin/tests/components/select/StylingPopupOpener.html
+++ b/uitest/tb2/com/vaadin/tests/components/select/StylingPopupOpener.html
diff --git a/uitest/src/com/vaadin/tests/components/select/TwinColSelectCaptionStyles.html b/uitest/tb2/com/vaadin/tests/components/select/TwinColSelectCaptionStyles.html
index c2b55a5229..c2b55a5229 100644
--- a/uitest/src/com/vaadin/tests/components/select/TwinColSelectCaptionStyles.html
+++ b/uitest/tb2/com/vaadin/tests/components/select/TwinColSelectCaptionStyles.html
diff --git a/uitest/src/com/vaadin/tests/components/select/TwinColSelectDualCaptions.html b/uitest/tb2/com/vaadin/tests/components/select/TwinColSelectDualCaptions.html
index bdb7121675..bdb7121675 100644
--- a/uitest/src/com/vaadin/tests/components/select/TwinColSelectDualCaptions.html
+++ b/uitest/tb2/com/vaadin/tests/components/select/TwinColSelectDualCaptions.html
diff --git a/uitest/src/com/vaadin/tests/components/select/TwinColSelectsDisabledReadonly.html b/uitest/tb2/com/vaadin/tests/components/select/TwinColSelectsDisabledReadonly.html
index aa217d97cf..aa217d97cf 100644
--- a/uitest/src/com/vaadin/tests/components/select/TwinColSelectsDisabledReadonly.html
+++ b/uitest/tb2/com/vaadin/tests/components/select/TwinColSelectsDisabledReadonly.html
diff --git a/uitest/src/com/vaadin/tests/components/slider/SliderKeyboardFocus.html b/uitest/tb2/com/vaadin/tests/components/slider/SliderKeyboardFocus.html
index 0521506418..0521506418 100644
--- a/uitest/src/com/vaadin/tests/components/slider/SliderKeyboardFocus.html
+++ b/uitest/tb2/com/vaadin/tests/components/slider/SliderKeyboardFocus.html
diff --git a/uitest/src/com/vaadin/tests/components/slider/SliderOrientation.html b/uitest/tb2/com/vaadin/tests/components/slider/SliderOrientation.html
index 174ddca016..174ddca016 100644
--- a/uitest/src/com/vaadin/tests/components/slider/SliderOrientation.html
+++ b/uitest/tb2/com/vaadin/tests/components/slider/SliderOrientation.html
diff --git a/uitest/src/com/vaadin/tests/components/slider/SliderPrimaryStyleName.html b/uitest/tb2/com/vaadin/tests/components/slider/SliderPrimaryStyleName.html
index b61ec80920..b61ec80920 100644
--- a/uitest/src/com/vaadin/tests/components/slider/SliderPrimaryStyleName.html
+++ b/uitest/tb2/com/vaadin/tests/components/slider/SliderPrimaryStyleName.html
diff --git a/uitest/src/com/vaadin/tests/components/slider/SliderUpdateFromValueChange.html b/uitest/tb2/com/vaadin/tests/components/slider/SliderUpdateFromValueChange.html
index 81c5938eb2..81c5938eb2 100644
--- a/uitest/src/com/vaadin/tests/components/slider/SliderUpdateFromValueChange.html
+++ b/uitest/tb2/com/vaadin/tests/components/slider/SliderUpdateFromValueChange.html
diff --git a/uitest/src/com/vaadin/tests/components/slider/SliderValueFromDataSource.html b/uitest/tb2/com/vaadin/tests/components/slider/SliderValueFromDataSource.html
index 8b5a7067e4..8b5a7067e4 100644
--- a/uitest/src/com/vaadin/tests/components/slider/SliderValueFromDataSource.html
+++ b/uitest/tb2/com/vaadin/tests/components/slider/SliderValueFromDataSource.html
diff --git a/uitest/src/com/vaadin/tests/components/splitpanel/HorizontalSplitPanelBasicStates.html b/uitest/tb2/com/vaadin/tests/components/splitpanel/HorizontalSplitPanelBasicStates.html
index 82229773d0..82229773d0 100644
--- a/uitest/src/com/vaadin/tests/components/splitpanel/HorizontalSplitPanelBasicStates.html
+++ b/uitest/tb2/com/vaadin/tests/components/splitpanel/HorizontalSplitPanelBasicStates.html
diff --git a/uitest/src/com/vaadin/tests/components/splitpanel/HorizontalSplitPanelMoveSplitter.html b/uitest/tb2/com/vaadin/tests/components/splitpanel/HorizontalSplitPanelMoveSplitter.html
index 131950da41..131950da41 100644
--- a/uitest/src/com/vaadin/tests/components/splitpanel/HorizontalSplitPanelMoveSplitter.html
+++ b/uitest/tb2/com/vaadin/tests/components/splitpanel/HorizontalSplitPanelMoveSplitter.html
diff --git a/uitest/src/com/vaadin/tests/components/splitpanel/HorizontalSplitPanelSplitterClick.html b/uitest/tb2/com/vaadin/tests/components/splitpanel/HorizontalSplitPanelSplitterClick.html
index 12e90c3d3f..12e90c3d3f 100644
--- a/uitest/src/com/vaadin/tests/components/splitpanel/HorizontalSplitPanelSplitterClick.html
+++ b/uitest/tb2/com/vaadin/tests/components/splitpanel/HorizontalSplitPanelSplitterClick.html
diff --git a/uitest/src/com/vaadin/tests/components/splitpanel/RetainSplitterPositionWhenOutOfBounds.html b/uitest/tb2/com/vaadin/tests/components/splitpanel/RetainSplitterPositionWhenOutOfBounds.html
index dff4dbb996..dff4dbb996 100644
--- a/uitest/src/com/vaadin/tests/components/splitpanel/RetainSplitterPositionWhenOutOfBounds.html
+++ b/uitest/tb2/com/vaadin/tests/components/splitpanel/RetainSplitterPositionWhenOutOfBounds.html
diff --git a/uitest/src/com/vaadin/tests/components/splitpanel/SplitPanelExtraScrollbars.html b/uitest/tb2/com/vaadin/tests/components/splitpanel/SplitPanelExtraScrollbars.html
index e8e7395198..e8e7395198 100644
--- a/uitest/src/com/vaadin/tests/components/splitpanel/SplitPanelExtraScrollbars.html
+++ b/uitest/tb2/com/vaadin/tests/components/splitpanel/SplitPanelExtraScrollbars.html
diff --git a/uitest/src/com/vaadin/tests/components/splitpanel/SplitPanelReversePosition.html b/uitest/tb2/com/vaadin/tests/components/splitpanel/SplitPanelReversePosition.html
index 6bdc9dd5e7..6bdc9dd5e7 100644
--- a/uitest/src/com/vaadin/tests/components/splitpanel/SplitPanelReversePosition.html
+++ b/uitest/tb2/com/vaadin/tests/components/splitpanel/SplitPanelReversePosition.html
diff --git a/uitest/src/com/vaadin/tests/components/splitpanel/SplitPanelSwapComponents.html b/uitest/tb2/com/vaadin/tests/components/splitpanel/SplitPanelSwapComponents.html
index f84eba7c36..f84eba7c36 100644
--- a/uitest/src/com/vaadin/tests/components/splitpanel/SplitPanelSwapComponents.html
+++ b/uitest/tb2/com/vaadin/tests/components/splitpanel/SplitPanelSwapComponents.html
diff --git a/uitest/src/com/vaadin/tests/components/splitpanel/SplitPanelWithMinimumAndMaximum.html b/uitest/tb2/com/vaadin/tests/components/splitpanel/SplitPanelWithMinimumAndMaximum.html
index c522d2b8d8..c522d2b8d8 100644
--- a/uitest/src/com/vaadin/tests/components/splitpanel/SplitPanelWithMinimumAndMaximum.html
+++ b/uitest/tb2/com/vaadin/tests/components/splitpanel/SplitPanelWithMinimumAndMaximum.html
diff --git a/uitest/src/com/vaadin/tests/components/splitpanel/VerticalSplitPanelBasicStates.html b/uitest/tb2/com/vaadin/tests/components/splitpanel/VerticalSplitPanelBasicStates.html
index cf67caccb7..cf67caccb7 100644
--- a/uitest/src/com/vaadin/tests/components/splitpanel/VerticalSplitPanelBasicStates.html
+++ b/uitest/tb2/com/vaadin/tests/components/splitpanel/VerticalSplitPanelBasicStates.html
diff --git a/uitest/src/com/vaadin/tests/components/splitpanel/VerticalSplitPanelMoveSplitter.html b/uitest/tb2/com/vaadin/tests/components/splitpanel/VerticalSplitPanelMoveSplitter.html
index 852efed548..852efed548 100644
--- a/uitest/src/com/vaadin/tests/components/splitpanel/VerticalSplitPanelMoveSplitter.html
+++ b/uitest/tb2/com/vaadin/tests/components/splitpanel/VerticalSplitPanelMoveSplitter.html
diff --git a/uitest/src/com/vaadin/tests/components/splitpanel/VerticalSplitPanelSplitterClick.html b/uitest/tb2/com/vaadin/tests/components/splitpanel/VerticalSplitPanelSplitterClick.html
index 85d891e1bb..85d891e1bb 100644
--- a/uitest/src/com/vaadin/tests/components/splitpanel/VerticalSplitPanelSplitterClick.html
+++ b/uitest/tb2/com/vaadin/tests/components/splitpanel/VerticalSplitPanelSplitterClick.html
diff --git a/uitest/src/com/vaadin/tests/components/table/ActionsOnTableBackground.html b/uitest/tb2/com/vaadin/tests/components/table/ActionsOnTableBackground.html
index 93037c3da1..93037c3da1 100644
--- a/uitest/src/com/vaadin/tests/components/table/ActionsOnTableBackground.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/ActionsOnTableBackground.html
diff --git a/uitest/src/com/vaadin/tests/components/table/AddItemToEmptyTable.html b/uitest/tb2/com/vaadin/tests/components/table/AddItemToEmptyTable.html
index 7f4845d1a9..7f4845d1a9 100644
--- a/uitest/src/com/vaadin/tests/components/table/AddItemToEmptyTable.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/AddItemToEmptyTable.html
diff --git a/uitest/src/com/vaadin/tests/components/table/AddNonRenderedRow.html b/uitest/tb2/com/vaadin/tests/components/table/AddNonRenderedRow.html
index ba1e177235..ba1e177235 100644
--- a/uitest/src/com/vaadin/tests/components/table/AddNonRenderedRow.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/AddNonRenderedRow.html
diff --git a/uitest/src/com/vaadin/tests/components/table/ClippedComponentsInTable.html b/uitest/tb2/com/vaadin/tests/components/table/ClippedComponentsInTable.html
index 4a6ccbbe2d..4a6ccbbe2d 100644
--- a/uitest/src/com/vaadin/tests/components/table/ClippedComponentsInTable.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/ClippedComponentsInTable.html
diff --git a/uitest/src/com/vaadin/tests/components/table/CollapseIndicatorOverlapsColumn.html b/uitest/tb2/com/vaadin/tests/components/table/CollapseIndicatorOverlapsColumn.html
index e3d0821642..e3d0821642 100644
--- a/uitest/src/com/vaadin/tests/components/table/CollapseIndicatorOverlapsColumn.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/CollapseIndicatorOverlapsColumn.html
diff --git a/uitest/src/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansion.html b/uitest/tb2/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansion.html
index 4dc63721a1..4dc63721a1 100644
--- a/uitest/src/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansion.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansion.html
diff --git a/uitest/src/com/vaadin/tests/components/table/ColumnExpandRatio.html b/uitest/tb2/com/vaadin/tests/components/table/ColumnExpandRatio.html
index 6d5422831e..6d5422831e 100644
--- a/uitest/src/com/vaadin/tests/components/table/ColumnExpandRatio.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/ColumnExpandRatio.html
diff --git a/uitest/src/com/vaadin/tests/components/table/ColumnExpandWithFixedColumns.html b/uitest/tb2/com/vaadin/tests/components/table/ColumnExpandWithFixedColumns.html
index eb338c8dde..eb338c8dde 100644
--- a/uitest/src/com/vaadin/tests/components/table/ColumnExpandWithFixedColumns.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/ColumnExpandWithFixedColumns.html
diff --git a/uitest/src/com/vaadin/tests/components/table/ColumnReorderingWithManyColumns.html b/uitest/tb2/com/vaadin/tests/components/table/ColumnReorderingWithManyColumns.html
index 5b5c83e629..5b5c83e629 100644
--- a/uitest/src/com/vaadin/tests/components/table/ColumnReorderingWithManyColumns.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/ColumnReorderingWithManyColumns.html
diff --git a/uitest/src/com/vaadin/tests/components/table/ContainerChangeWithPartlySamePropertyIds.html b/uitest/tb2/com/vaadin/tests/components/table/ContainerChangeWithPartlySamePropertyIds.html
index 6c8a770b6a..6c8a770b6a 100644
--- a/uitest/src/com/vaadin/tests/components/table/ContainerChangeWithPartlySamePropertyIds.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/ContainerChangeWithPartlySamePropertyIds.html
diff --git a/uitest/src/com/vaadin/tests/components/table/ContainerSizeChangeDuringTablePaint.html b/uitest/tb2/com/vaadin/tests/components/table/ContainerSizeChangeDuringTablePaint.html
index 236f184a41..236f184a41 100644
--- a/uitest/src/com/vaadin/tests/components/table/ContainerSizeChangeDuringTablePaint.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/ContainerSizeChangeDuringTablePaint.html
diff --git a/uitest/src/com/vaadin/tests/components/table/DisabledTableKeyboardNavigation.html b/uitest/tb2/com/vaadin/tests/components/table/DisabledTableKeyboardNavigation.html
index a8f0e864c3..a8f0e864c3 100644
--- a/uitest/src/com/vaadin/tests/components/table/DisabledTableKeyboardNavigation.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/DisabledTableKeyboardNavigation.html
diff --git a/uitest/src/com/vaadin/tests/components/table/EmptyTable.html b/uitest/tb2/com/vaadin/tests/components/table/EmptyTable.html
index 7196771f56..7196771f56 100644
--- a/uitest/src/com/vaadin/tests/components/table/EmptyTable.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/EmptyTable.html
diff --git a/uitest/src/com/vaadin/tests/components/table/FixedHeightTable.html b/uitest/tb2/com/vaadin/tests/components/table/FixedHeightTable.html
index fb8f7c8b7f..fb8f7c8b7f 100644
--- a/uitest/src/com/vaadin/tests/components/table/FixedHeightTable.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/FixedHeightTable.html
diff --git a/uitest/src/com/vaadin/tests/components/table/Footer.html b/uitest/tb2/com/vaadin/tests/components/table/Footer.html
index dbbdef2f9c..dbbdef2f9c 100644
--- a/uitest/src/com/vaadin/tests/components/table/Footer.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/Footer.html
diff --git a/uitest/src/com/vaadin/tests/components/table/FooterClick.html b/uitest/tb2/com/vaadin/tests/components/table/FooterClick.html
index fb3d004620..fb3d004620 100644
--- a/uitest/src/com/vaadin/tests/components/table/FooterClick.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/FooterClick.html
diff --git a/uitest/src/com/vaadin/tests/components/table/HeaderClick.html b/uitest/tb2/com/vaadin/tests/components/table/HeaderClick.html
index d5328b25d3..d5328b25d3 100644
--- a/uitest/src/com/vaadin/tests/components/table/HeaderClick.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/HeaderClick.html
diff --git a/uitest/src/com/vaadin/tests/components/table/HeaderFooterClickLeftRightMiddle.html b/uitest/tb2/com/vaadin/tests/components/table/HeaderFooterClickLeftRightMiddle.html
index dfd001bf5c..dfd001bf5c 100644
--- a/uitest/src/com/vaadin/tests/components/table/HeaderFooterClickLeftRightMiddle.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/HeaderFooterClickLeftRightMiddle.html
diff --git a/uitest/src/com/vaadin/tests/components/table/HeaderPositionWhenSorting.html b/uitest/tb2/com/vaadin/tests/components/table/HeaderPositionWhenSorting.html
index c3128820ef..c3128820ef 100644
--- a/uitest/src/com/vaadin/tests/components/table/HeaderPositionWhenSorting.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/HeaderPositionWhenSorting.html
diff --git a/uitest/src/com/vaadin/tests/components/table/HeaderSyncOnScroll.html b/uitest/tb2/com/vaadin/tests/components/table/HeaderSyncOnScroll.html
index 66f6107f90..66f6107f90 100644
--- a/uitest/src/com/vaadin/tests/components/table/HeaderSyncOnScroll.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/HeaderSyncOnScroll.html
diff --git a/uitest/src/com/vaadin/tests/components/table/HeaderUpdateWhenNoRows.html b/uitest/tb2/com/vaadin/tests/components/table/HeaderUpdateWhenNoRows.html
index ef2067fbf5..ef2067fbf5 100644
--- a/uitest/src/com/vaadin/tests/components/table/HeaderUpdateWhenNoRows.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/HeaderUpdateWhenNoRows.html
diff --git a/uitest/src/com/vaadin/tests/components/table/HiddenComponentCells.html b/uitest/tb2/com/vaadin/tests/components/table/HiddenComponentCells.html
index 22ba16abca..22ba16abca 100644
--- a/uitest/src/com/vaadin/tests/components/table/HiddenComponentCells.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/HiddenComponentCells.html
diff --git a/uitest/src/com/vaadin/tests/components/table/HorizontalScrollWithNoRows.html b/uitest/tb2/com/vaadin/tests/components/table/HorizontalScrollWithNoRows.html
index 98629252d9..98629252d9 100644
--- a/uitest/src/com/vaadin/tests/components/table/HorizontalScrollWithNoRows.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/HorizontalScrollWithNoRows.html
diff --git a/uitest/src/com/vaadin/tests/components/table/ItemClickEvents.html b/uitest/tb2/com/vaadin/tests/components/table/ItemClickEvents.html
index 1d7b2b6bf9..1d7b2b6bf9 100644
--- a/uitest/src/com/vaadin/tests/components/table/ItemClickEvents.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/ItemClickEvents.html
diff --git a/uitest/src/com/vaadin/tests/components/table/LargeSelectionCausesNPE.html b/uitest/tb2/com/vaadin/tests/components/table/LargeSelectionCausesNPE.html
index 8ee0bad9ec..8ee0bad9ec 100644
--- a/uitest/src/com/vaadin/tests/components/table/LargeSelectionCausesNPE.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/LargeSelectionCausesNPE.html
diff --git a/uitest/src/com/vaadin/tests/components/table/LastColumnNegative.html b/uitest/tb2/com/vaadin/tests/components/table/LastColumnNegative.html
index 441142e7f9..441142e7f9 100644
--- a/uitest/src/com/vaadin/tests/components/table/LastColumnNegative.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/LastColumnNegative.html
diff --git a/uitest/src/com/vaadin/tests/components/table/MissingScrollbar.html b/uitest/tb2/com/vaadin/tests/components/table/MissingScrollbar.html
index e1f783d42f..e1f783d42f 100644
--- a/uitest/src/com/vaadin/tests/components/table/MissingScrollbar.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/MissingScrollbar.html
diff --git a/uitest/src/com/vaadin/tests/components/table/ModifyContainerProperty.html b/uitest/tb2/com/vaadin/tests/components/table/ModifyContainerProperty.html
index 33318c9a95..33318c9a95 100644
--- a/uitest/src/com/vaadin/tests/components/table/ModifyContainerProperty.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/ModifyContainerProperty.html
diff --git a/uitest/src/com/vaadin/tests/components/table/MultiSelectValueOrder.html b/uitest/tb2/com/vaadin/tests/components/table/MultiSelectValueOrder.html
index 4bac7741da..4bac7741da 100644
--- a/uitest/src/com/vaadin/tests/components/table/MultiSelectValueOrder.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/MultiSelectValueOrder.html
diff --git a/uitest/src/com/vaadin/tests/components/table/MultiSelectWithRemovedRow.html b/uitest/tb2/com/vaadin/tests/components/table/MultiSelectWithRemovedRow.html
index 670736127b..670736127b 100644
--- a/uitest/src/com/vaadin/tests/components/table/MultiSelectWithRemovedRow.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/MultiSelectWithRemovedRow.html
diff --git a/uitest/src/com/vaadin/tests/components/table/OddEvenRowStyling.html b/uitest/tb2/com/vaadin/tests/components/table/OddEvenRowStyling.html
index 525ad34888..525ad34888 100644
--- a/uitest/src/com/vaadin/tests/components/table/OddEvenRowStyling.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/OddEvenRowStyling.html
diff --git a/uitest/src/com/vaadin/tests/components/table/ProgrammaticUnselectInRange.html b/uitest/tb2/com/vaadin/tests/components/table/ProgrammaticUnselectInRange.html
index 8d185b6219..8d185b6219 100644
--- a/uitest/src/com/vaadin/tests/components/table/ProgrammaticUnselectInRange.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/ProgrammaticUnselectInRange.html
diff --git a/uitest/src/com/vaadin/tests/components/table/PropertyValueChange.html b/uitest/tb2/com/vaadin/tests/components/table/PropertyValueChange.html
index b5904120d6..b5904120d6 100644
--- a/uitest/src/com/vaadin/tests/components/table/PropertyValueChange.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/PropertyValueChange.html
diff --git a/uitest/src/com/vaadin/tests/components/table/RefreshRenderedCellsOnlyIfAttached.html b/uitest/tb2/com/vaadin/tests/components/table/RefreshRenderedCellsOnlyIfAttached.html
index e6d4d69f81..e6d4d69f81 100644
--- a/uitest/src/com/vaadin/tests/components/table/RefreshRenderedCellsOnlyIfAttached.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/RefreshRenderedCellsOnlyIfAttached.html
diff --git a/uitest/src/com/vaadin/tests/components/table/RemoveItemOnClick.html b/uitest/tb2/com/vaadin/tests/components/table/RemoveItemOnClick.html
index e95dbb3a65..e95dbb3a65 100644
--- a/uitest/src/com/vaadin/tests/components/table/RemoveItemOnClick.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/RemoveItemOnClick.html
diff --git a/uitest/src/com/vaadin/tests/components/table/ResizeColumnAfterScrolling.html b/uitest/tb2/com/vaadin/tests/components/table/ResizeColumnAfterScrolling.html
index 7e7536d63a..7e7536d63a 100644
--- a/uitest/src/com/vaadin/tests/components/table/ResizeColumnAfterScrolling.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/ResizeColumnAfterScrolling.html
diff --git a/uitest/src/com/vaadin/tests/components/table/RowFocusAppliedAndRemovedOnSelection.html b/uitest/tb2/com/vaadin/tests/components/table/RowFocusAppliedAndRemovedOnSelection.html
index a2f57aa085..a2f57aa085 100644
--- a/uitest/src/com/vaadin/tests/components/table/RowFocusAppliedAndRemovedOnSelection.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/RowFocusAppliedAndRemovedOnSelection.html
diff --git a/uitest/src/com/vaadin/tests/components/table/RowUpdateShouldRetainContextMenu.html b/uitest/tb2/com/vaadin/tests/components/table/RowUpdateShouldRetainContextMenu.html
index 65487d8fa8..65487d8fa8 100644
--- a/uitest/src/com/vaadin/tests/components/table/RowUpdateShouldRetainContextMenu.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/RowUpdateShouldRetainContextMenu.html
diff --git a/uitest/src/com/vaadin/tests/components/table/SelectableEditable.html b/uitest/tb2/com/vaadin/tests/components/table/SelectableEditable.html
index 8d46523c40..8d46523c40 100644
--- a/uitest/src/com/vaadin/tests/components/table/SelectableEditable.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/SelectableEditable.html
diff --git a/uitest/src/com/vaadin/tests/components/table/SetDataSourceWithPropertyIds.html b/uitest/tb2/com/vaadin/tests/components/table/SetDataSourceWithPropertyIds.html
index 02132e45a7..02132e45a7 100644
--- a/uitest/src/com/vaadin/tests/components/table/SetDataSourceWithPropertyIds.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/SetDataSourceWithPropertyIds.html
diff --git a/uitest/src/com/vaadin/tests/components/table/ShowLastItem.html b/uitest/tb2/com/vaadin/tests/components/table/ShowLastItem.html
index c9c93198fa..c9c93198fa 100644
--- a/uitest/src/com/vaadin/tests/components/table/ShowLastItem.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/ShowLastItem.html
diff --git a/uitest/src/com/vaadin/tests/components/table/SortLabelsInTable.html b/uitest/tb2/com/vaadin/tests/components/table/SortLabelsInTable.html
index 21d2d7f3b3..21d2d7f3b3 100644
--- a/uitest/src/com/vaadin/tests/components/table/SortLabelsInTable.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/SortLabelsInTable.html
diff --git a/uitest/src/com/vaadin/tests/components/table/SortLongTable.html b/uitest/tb2/com/vaadin/tests/components/table/SortLongTable.html
index 96513509e1..96513509e1 100644
--- a/uitest/src/com/vaadin/tests/components/table/SortLongTable.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/SortLongTable.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableClickValueChangeInteraction.html b/uitest/tb2/com/vaadin/tests/components/table/TableClickValueChangeInteraction.html
index 5b50eeba23..5b50eeba23 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableClickValueChangeInteraction.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableClickValueChangeInteraction.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableColumnAlignment.html b/uitest/tb2/com/vaadin/tests/components/table/TableColumnAlignment.html
index 49bb86dbce..49bb86dbce 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableColumnAlignment.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableColumnAlignment.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableColumnHeaders.html b/uitest/tb2/com/vaadin/tests/components/table/TableColumnHeaders.html
index 9f4e6cb8da..9f4e6cb8da 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableColumnHeaders.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableColumnHeaders.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableColumnIcons-chameleon.html b/uitest/tb2/com/vaadin/tests/components/table/TableColumnIcons-chameleon.html
index efb99410fe..efb99410fe 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableColumnIcons-chameleon.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableColumnIcons-chameleon.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableColumnIcons-runo.html b/uitest/tb2/com/vaadin/tests/components/table/TableColumnIcons-runo.html
index d565fb5140..d565fb5140 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableColumnIcons-runo.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableColumnIcons-runo.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableColumnIcons.html b/uitest/tb2/com/vaadin/tests/components/table/TableColumnIcons.html
index 81b8be89fa..81b8be89fa 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableColumnIcons.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableColumnIcons.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableColumnSorting.html b/uitest/tb2/com/vaadin/tests/components/table/TableColumnSorting.html
index 7f6ee1a975..7f6ee1a975 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableColumnSorting.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableColumnSorting.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableColumnWidthsAndExpandRatios.html b/uitest/tb2/com/vaadin/tests/components/table/TableColumnWidthsAndExpandRatios.html
index 75d98ce2e6..75d98ce2e6 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableColumnWidthsAndExpandRatios.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableColumnWidthsAndExpandRatios.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableContextMenuAndIcons.html b/uitest/tb2/com/vaadin/tests/components/table/TableContextMenuAndIcons.html
index 82f1e63d6b..82f1e63d6b 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableContextMenuAndIcons.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableContextMenuAndIcons.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableDragColumn.html b/uitest/tb2/com/vaadin/tests/components/table/TableDragColumn.html
index 5d0ba160fe..5d0ba160fe 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableDragColumn.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableDragColumn.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableDragColumnFloatingElementStyles.html b/uitest/tb2/com/vaadin/tests/components/table/TableDragColumnFloatingElementStyles.html
index e225091b5f..e225091b5f 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableDragColumnFloatingElementStyles.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableDragColumnFloatingElementStyles.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableGeneratedColumns.html b/uitest/tb2/com/vaadin/tests/components/table/TableGeneratedColumns.html
index 19326e9f12..19326e9f12 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableGeneratedColumns.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableGeneratedColumns.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableGeneratedRows-chameleon.html b/uitest/tb2/com/vaadin/tests/components/table/TableGeneratedRows-chameleon.html
index c382a7c766..c382a7c766 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableGeneratedRows-chameleon.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableGeneratedRows-chameleon.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableGeneratedRows.html b/uitest/tb2/com/vaadin/tests/components/table/TableGeneratedRows.html
index 35a600765f..35a600765f 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableGeneratedRows.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableGeneratedRows.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableGeneratedStringColumns.html b/uitest/tb2/com/vaadin/tests/components/table/TableGeneratedStringColumns.html
index 4d5f4c2d17..4d5f4c2d17 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableGeneratedStringColumns.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableGeneratedStringColumns.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.html b/uitest/tb2/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.html
index 01b2c578f0..01b2c578f0 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableLastRowMissing.html b/uitest/tb2/com/vaadin/tests/components/table/TableLastRowMissing.html
index ca8ee6d6a4..ca8ee6d6a4 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableLastRowMissing.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableLastRowMissing.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableModificationsWhenScrolledRight.html b/uitest/tb2/com/vaadin/tests/components/table/TableModificationsWhenScrolledRight.html
index eab6164330..eab6164330 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableModificationsWhenScrolledRight.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableModificationsWhenScrolledRight.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableMultiSelectMouse.html b/uitest/tb2/com/vaadin/tests/components/table/TableMultiSelectMouse.html
index a980253743..a980253743 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableMultiSelectMouse.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableMultiSelectMouse.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableMultiSelectSimple-chameleon.html b/uitest/tb2/com/vaadin/tests/components/table/TableMultiSelectSimple-chameleon.html
index aa9bfd5391..aa9bfd5391 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableMultiSelectSimple-chameleon.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableMultiSelectSimple-chameleon.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableMultiSelectSimple.html b/uitest/tb2/com/vaadin/tests/components/table/TableMultiSelectSimple.html
index dcf88620ca..dcf88620ca 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableMultiSelectSimple.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableMultiSelectSimple.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TablePageLengthUpdate.html b/uitest/tb2/com/vaadin/tests/components/table/TablePageLengthUpdate.html
index bc438eaf1b..bc438eaf1b 100644
--- a/uitest/src/com/vaadin/tests/components/table/TablePageLengthUpdate.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TablePageLengthUpdate.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableReduceContainerSize.html b/uitest/tb2/com/vaadin/tests/components/table/TableReduceContainerSize.html
index 9bd0149bdb..9bd0149bdb 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableReduceContainerSize.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableReduceContainerSize.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableRemoveActionHandlers.html b/uitest/tb2/com/vaadin/tests/components/table/TableRemoveActionHandlers.html
index a363f6980e..a363f6980e 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableRemoveActionHandlers.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableRemoveActionHandlers.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableRepaintWhenMadeVisible.html b/uitest/tb2/com/vaadin/tests/components/table/TableRepaintWhenMadeVisible.html
index e523a89df3..e523a89df3 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableRepaintWhenMadeVisible.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableRepaintWhenMadeVisible.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableRowHeight.html b/uitest/tb2/com/vaadin/tests/components/table/TableRowHeight.html
index a28df6329f..a28df6329f 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableRowHeight.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableRowHeight.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableRowHeight3.html b/uitest/tb2/com/vaadin/tests/components/table/TableRowHeight3.html
index 2aa90085e4..2aa90085e4 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableRowHeight3.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableRowHeight3.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableRowNoHeightNoRows.html b/uitest/tb2/com/vaadin/tests/components/table/TableRowNoHeightNoRows.html
index 35d64c3a0c..35d64c3a0c 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableRowNoHeightNoRows.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableRowNoHeightNoRows.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableScrollOnFocus.html b/uitest/tb2/com/vaadin/tests/components/table/TableScrollOnFocus.html
index 93e5a802ee..93e5a802ee 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableScrollOnFocus.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableScrollOnFocus.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableScrolling.html b/uitest/tb2/com/vaadin/tests/components/table/TableScrolling.html
index 51fa844412..51fa844412 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableScrolling.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableScrolling.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableShouldNotEatValueChanges.html b/uitest/tb2/com/vaadin/tests/components/table/TableShouldNotEatValueChanges.html
index e24f4ddca4..e24f4ddca4 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableShouldNotEatValueChanges.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableShouldNotEatValueChanges.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableSingleSelect.html b/uitest/tb2/com/vaadin/tests/components/table/TableSingleSelect.html
index c809678a4f..c809678a4f 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableSingleSelect.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableSingleSelect.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableSqlContainer.html b/uitest/tb2/com/vaadin/tests/components/table/TableSqlContainer.html
index c6ccb4df73..c6ccb4df73 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableSqlContainer.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableSqlContainer.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableToggleVisibility.html b/uitest/tb2/com/vaadin/tests/components/table/TableToggleVisibility.html
index e9c57203c0..e9c57203c0 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableToggleVisibility.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableToggleVisibility.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableUndefinedSize.html b/uitest/tb2/com/vaadin/tests/components/table/TableUndefinedSize.html
index f21a78ddb0..f21a78ddb0 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableUndefinedSize.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableUndefinedSize.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableUnregisterComponent.html b/uitest/tb2/com/vaadin/tests/components/table/TableUnregisterComponent.html
index 1e5617d64f..1e5617d64f 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableUnregisterComponent.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableUnregisterComponent.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableVisibleColumnsUpdate.html b/uitest/tb2/com/vaadin/tests/components/table/TableVisibleColumnsUpdate.html
index 05325cb9e6..05325cb9e6 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableVisibleColumnsUpdate.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableVisibleColumnsUpdate.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableWithBrokenGeneratorAndContainer.html b/uitest/tb2/com/vaadin/tests/components/table/TableWithBrokenGeneratorAndContainer.html
index 441324bb6a..441324bb6a 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableWithBrokenGeneratorAndContainer.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableWithBrokenGeneratorAndContainer.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableWithCustomConverterFactory.html b/uitest/tb2/com/vaadin/tests/components/table/TableWithCustomConverterFactory.html
index 3bf592aeb1..3bf592aeb1 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableWithCustomConverterFactory.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableWithCustomConverterFactory.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableWithManyColumns.html b/uitest/tb2/com/vaadin/tests/components/table/TableWithManyColumns.html
index a933b0b1d1..a933b0b1d1 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableWithManyColumns.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableWithManyColumns.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TableWithNoncollapsibleColumns.html b/uitest/tb2/com/vaadin/tests/components/table/TableWithNoncollapsibleColumns.html
index e3c9a8423b..e3c9a8423b 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableWithNoncollapsibleColumns.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TableWithNoncollapsibleColumns.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TestCurrentPageFirstItem.html b/uitest/tb2/com/vaadin/tests/components/table/TestCurrentPageFirstItem.html
index 451e9b9c8d..451e9b9c8d 100644
--- a/uitest/src/com/vaadin/tests/components/table/TestCurrentPageFirstItem.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TestCurrentPageFirstItem.html
diff --git a/uitest/src/com/vaadin/tests/components/table/TooManySetColumnCollapsedCalls.html b/uitest/tb2/com/vaadin/tests/components/table/TooManySetColumnCollapsedCalls.html
index a234594b8f..a234594b8f 100644
--- a/uitest/src/com/vaadin/tests/components/table/TooManySetColumnCollapsedCalls.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/TooManySetColumnCollapsedCalls.html
diff --git a/uitest/src/com/vaadin/tests/components/table/UncollapsedCollumnWidth.html b/uitest/tb2/com/vaadin/tests/components/table/UncollapsedCollumnWidth.html
index e1b39533f3..e1b39533f3 100644
--- a/uitest/src/com/vaadin/tests/components/table/UncollapsedCollumnWidth.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/UncollapsedCollumnWidth.html
diff --git a/uitest/src/com/vaadin/tests/components/table/ValueAfterClearingContainer.html b/uitest/tb2/com/vaadin/tests/components/table/ValueAfterClearingContainer.html
index 3aecf8bf97..3aecf8bf97 100644
--- a/uitest/src/com/vaadin/tests/components/table/ValueAfterClearingContainer.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/ValueAfterClearingContainer.html
diff --git a/uitest/src/com/vaadin/tests/components/table/ViewPortCalculation.html b/uitest/tb2/com/vaadin/tests/components/table/ViewPortCalculation.html
index aa2b29b3b7..aa2b29b3b7 100644
--- a/uitest/src/com/vaadin/tests/components/table/ViewPortCalculation.html
+++ b/uitest/tb2/com/vaadin/tests/components/table/ViewPortCalculation.html
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/AddAndRemoveTabs.html b/uitest/tb2/com/vaadin/tests/components/tabsheet/AddAndRemoveTabs.html
index 993ef79c91..993ef79c91 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/AddAndRemoveTabs.html
+++ b/uitest/tb2/com/vaadin/tests/components/tabsheet/AddAndRemoveTabs.html
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/EXtraScrollbarsInTabSheet.html b/uitest/tb2/com/vaadin/tests/components/tabsheet/EXtraScrollbarsInTabSheet.html
index 4287eaa05b..4287eaa05b 100755
--- a/uitest/src/com/vaadin/tests/components/tabsheet/EXtraScrollbarsInTabSheet.html
+++ b/uitest/tb2/com/vaadin/tests/components/tabsheet/EXtraScrollbarsInTabSheet.html
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/MoveComponentBetweenTabsheets.html b/uitest/tb2/com/vaadin/tests/components/tabsheet/MoveComponentBetweenTabsheets.html
index a23729b282..a23729b282 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/MoveComponentBetweenTabsheets.html
+++ b/uitest/tb2/com/vaadin/tests/components/tabsheet/MoveComponentBetweenTabsheets.html
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/NestedTabSheetsHideTabs.html b/uitest/tb2/com/vaadin/tests/components/tabsheet/NestedTabSheetsHideTabs.html
index cc018de5eb..cc018de5eb 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/NestedTabSheetsHideTabs.html
+++ b/uitest/tb2/com/vaadin/tests/components/tabsheet/NestedTabSheetsHideTabs.html
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/RemoveTabsTabsheet.html b/uitest/tb2/com/vaadin/tests/components/tabsheet/RemoveTabsTabsheet.html
index 13f103b82d..13f103b82d 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/RemoveTabsTabsheet.html
+++ b/uitest/tb2/com/vaadin/tests/components/tabsheet/RemoveTabsTabsheet.html
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/ScrollbarsInNestedTabsheets.html b/uitest/tb2/com/vaadin/tests/components/tabsheet/ScrollbarsInNestedTabsheets.html
index f5579c9875..f5579c9875 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/ScrollbarsInNestedTabsheets.html
+++ b/uitest/tb2/com/vaadin/tests/components/tabsheet/ScrollbarsInNestedTabsheets.html
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/TabGetAndReplaceComponent.html b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabGetAndReplaceComponent.html
index fce39361e1..fce39361e1 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/TabGetAndReplaceComponent.html
+++ b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabGetAndReplaceComponent.html
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/TabSheetBasicOperations.html b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetBasicOperations.html
index 357455545e..357455545e 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/TabSheetBasicOperations.html
+++ b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetBasicOperations.html
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/TabSheetCaptions.html b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetCaptions.html
index d240d4b419..d240d4b419 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/TabSheetCaptions.html
+++ b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetCaptions.html
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/TabSheetDisabling.html b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetDisabling.html
index bc03f7687b..bc03f7687b 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/TabSheetDisabling.html
+++ b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetDisabling.html
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/TabSheetDiscardsMovedComponents.html b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetDiscardsMovedComponents.html
index 4cb6925b28..4cb6925b28 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/TabSheetDiscardsMovedComponents.html
+++ b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetDiscardsMovedComponents.html
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/TabSheetIcons.html b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetIcons.html
index 6876497a1f..6876497a1f 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/TabSheetIcons.html
+++ b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetIcons.html
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/TabSheetIndexOperations.html b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetIndexOperations.html
index 8db5641603..8db5641603 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/TabSheetIndexOperations.html
+++ b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetIndexOperations.html
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/TabSheetSelectionStyles.html b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetSelectionStyles.html
index e046cfacb4..e046cfacb4 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/TabSheetSelectionStyles.html
+++ b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetSelectionStyles.html
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/TabSheetTabStyleNames.html b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetTabStyleNames.html
index d49e2817d3..d49e2817d3 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/TabSheetTabStyleNames.html
+++ b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetTabStyleNames.html
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/TabSheetWithDisappearingContent.html b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetWithDisappearingContent.html
index 47f8993aca..47f8993aca 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/TabSheetWithDisappearingContent.html
+++ b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetWithDisappearingContent.html
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/TabSheetWithHasComponent.html b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetWithHasComponent.html
index 19eff4f8b7..19eff4f8b7 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/TabSheetWithHasComponent.html
+++ b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetWithHasComponent.html
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/TabSheetWithTabIds.html b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetWithTabIds.html
index 64e85f55e3..64e85f55e3 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/TabSheetWithTabIds.html
+++ b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetWithTabIds.html
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/TabSheetWithoutTabCaption.html b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetWithoutTabCaption.html
index 36e85c1b37..36e85c1b37 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/TabSheetWithoutTabCaption.html
+++ b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabSheetWithoutTabCaption.html
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetMinimalClosableTabs.html b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabsheetMinimalClosableTabs.html
index 799e844e04..799e844e04 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetMinimalClosableTabs.html
+++ b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabsheetMinimalClosableTabs.html
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetScrolling.html b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabsheetScrolling.html
index dd45e2c591..dd45e2c591 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetScrolling.html
+++ b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabsheetScrolling.html
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetShouldUpdateHeight.html b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabsheetShouldUpdateHeight.html
index 2536ed50f6..2536ed50f6 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetShouldUpdateHeight.html
+++ b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabsheetShouldUpdateHeight.html
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetTooltip.html b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabsheetTooltip.html
index 38ff6ab8ca..38ff6ab8ca 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetTooltip.html
+++ b/uitest/tb2/com/vaadin/tests/components/tabsheet/TabsheetTooltip.html
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/VerticalScrollbarPosition.html b/uitest/tb2/com/vaadin/tests/components/tabsheet/VerticalScrollbarPosition.html
index 3da03edb6a..3da03edb6a 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/VerticalScrollbarPosition.html
+++ b/uitest/tb2/com/vaadin/tests/components/tabsheet/VerticalScrollbarPosition.html
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/WrapTabSheetInTabSheet.html b/uitest/tb2/com/vaadin/tests/components/tabsheet/WrapTabSheetInTabSheet.html
index f1a54df714..f1a54df714 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/WrapTabSheetInTabSheet.html
+++ b/uitest/tb2/com/vaadin/tests/components/tabsheet/WrapTabSheetInTabSheet.html
diff --git a/uitest/src/com/vaadin/tests/components/textarea/ScrollCursor.html b/uitest/tb2/com/vaadin/tests/components/textarea/ScrollCursor.html
index 9eaa1ceada..9eaa1ceada 100644
--- a/uitest/src/com/vaadin/tests/components/textarea/ScrollCursor.html
+++ b/uitest/tb2/com/vaadin/tests/components/textarea/ScrollCursor.html
diff --git a/uitest/src/com/vaadin/tests/components/textarea/TextAreaBasicStates.html b/uitest/tb2/com/vaadin/tests/components/textarea/TextAreaBasicStates.html
index 3d44192506..3d44192506 100644
--- a/uitest/src/com/vaadin/tests/components/textarea/TextAreaBasicStates.html
+++ b/uitest/tb2/com/vaadin/tests/components/textarea/TextAreaBasicStates.html
diff --git a/uitest/src/com/vaadin/tests/components/textarea/TextAreaMaxLength.html b/uitest/tb2/com/vaadin/tests/components/textarea/TextAreaMaxLength.html
index 5fe43b7b7a..5fe43b7b7a 100755
--- a/uitest/src/com/vaadin/tests/components/textarea/TextAreaMaxLength.html
+++ b/uitest/tb2/com/vaadin/tests/components/textarea/TextAreaMaxLength.html
diff --git a/uitest/src/com/vaadin/tests/components/textarea/TextAreaNullRepresentation.html b/uitest/tb2/com/vaadin/tests/components/textarea/TextAreaNullRepresentation.html
index 6b29b634db..6b29b634db 100644
--- a/uitest/src/com/vaadin/tests/components/textarea/TextAreaNullRepresentation.html
+++ b/uitest/tb2/com/vaadin/tests/components/textarea/TextAreaNullRepresentation.html
diff --git a/uitest/src/com/vaadin/tests/components/textarea/TextAreaWordwrap.html b/uitest/tb2/com/vaadin/tests/components/textarea/TextAreaWordwrap.html
index 43bb52b3e7..43bb52b3e7 100644
--- a/uitest/src/com/vaadin/tests/components/textarea/TextAreaWordwrap.html
+++ b/uitest/tb2/com/vaadin/tests/components/textarea/TextAreaWordwrap.html
diff --git a/uitest/src/com/vaadin/tests/components/textfield/BigDecimalTextField.html b/uitest/tb2/com/vaadin/tests/components/textfield/BigDecimalTextField.html
index 2428e8b4bb..2428e8b4bb 100644
--- a/uitest/src/com/vaadin/tests/components/textfield/BigDecimalTextField.html
+++ b/uitest/tb2/com/vaadin/tests/components/textfield/BigDecimalTextField.html
diff --git a/uitest/src/com/vaadin/tests/components/textfield/SelectionAndCursorPosition.html b/uitest/tb2/com/vaadin/tests/components/textfield/SelectionAndCursorPosition.html
index c058d8d975..c058d8d975 100644
--- a/uitest/src/com/vaadin/tests/components/textfield/SelectionAndCursorPosition.html
+++ b/uitest/tb2/com/vaadin/tests/components/textfield/SelectionAndCursorPosition.html
diff --git a/uitest/src/com/vaadin/tests/components/textfield/SetTabIndex.html b/uitest/tb2/com/vaadin/tests/components/textfield/SetTabIndex.html
index b61b464f97..b61b464f97 100644
--- a/uitest/src/com/vaadin/tests/components/textfield/SetTabIndex.html
+++ b/uitest/tb2/com/vaadin/tests/components/textfield/SetTabIndex.html
diff --git a/uitest/src/com/vaadin/tests/components/textfield/TextChangeEventsEternalLoop.html b/uitest/tb2/com/vaadin/tests/components/textfield/TextChangeEventsEternalLoop.html
index 6f0772aa29..6f0772aa29 100644
--- a/uitest/src/com/vaadin/tests/components/textfield/TextChangeEventsEternalLoop.html
+++ b/uitest/tb2/com/vaadin/tests/components/textfield/TextChangeEventsEternalLoop.html
diff --git a/uitest/src/com/vaadin/tests/components/textfield/TextChangeListenerChangingNonTextProperties.html b/uitest/tb2/com/vaadin/tests/components/textfield/TextChangeListenerChangingNonTextProperties.html
index dc4c0bba13..dc4c0bba13 100644
--- a/uitest/src/com/vaadin/tests/components/textfield/TextChangeListenerChangingNonTextProperties.html
+++ b/uitest/tb2/com/vaadin/tests/components/textfield/TextChangeListenerChangingNonTextProperties.html
diff --git a/uitest/src/com/vaadin/tests/components/textfield/TextChangeTimeoutAfterDetach.html b/uitest/tb2/com/vaadin/tests/components/textfield/TextChangeTimeoutAfterDetach.html
index 544cea9faa..544cea9faa 100644
--- a/uitest/src/com/vaadin/tests/components/textfield/TextChangeTimeoutAfterDetach.html
+++ b/uitest/tb2/com/vaadin/tests/components/textfield/TextChangeTimeoutAfterDetach.html
diff --git a/uitest/src/com/vaadin/tests/components/textfield/TextFieldBasicStates.html b/uitest/tb2/com/vaadin/tests/components/textfield/TextFieldBasicStates.html
index b38c24d7f5..b38c24d7f5 100644
--- a/uitest/src/com/vaadin/tests/components/textfield/TextFieldBasicStates.html
+++ b/uitest/tb2/com/vaadin/tests/components/textfield/TextFieldBasicStates.html
diff --git a/uitest/src/com/vaadin/tests/components/textfield/TextFieldEagerRepaint.html b/uitest/tb2/com/vaadin/tests/components/textfield/TextFieldEagerRepaint.html
index 177a2f85cf..177a2f85cf 100644
--- a/uitest/src/com/vaadin/tests/components/textfield/TextFieldEagerRepaint.html
+++ b/uitest/tb2/com/vaadin/tests/components/textfield/TextFieldEagerRepaint.html
diff --git a/uitest/src/com/vaadin/tests/components/textfield/TextFieldInLayoutInTable.html b/uitest/tb2/com/vaadin/tests/components/textfield/TextFieldInLayoutInTable.html
index e53e8ed601..e53e8ed601 100644
--- a/uitest/src/com/vaadin/tests/components/textfield/TextFieldInLayoutInTable.html
+++ b/uitest/tb2/com/vaadin/tests/components/textfield/TextFieldInLayoutInTable.html
diff --git a/uitest/src/com/vaadin/tests/components/textfield/TextFieldMaxLength.html b/uitest/tb2/com/vaadin/tests/components/textfield/TextFieldMaxLength.html
index a0163352cc..a0163352cc 100644
--- a/uitest/src/com/vaadin/tests/components/textfield/TextFieldMaxLength.html
+++ b/uitest/tb2/com/vaadin/tests/components/textfield/TextFieldMaxLength.html
diff --git a/uitest/src/com/vaadin/tests/components/textfield/TextFieldMaxLengthRemovedFromDOM.html b/uitest/tb2/com/vaadin/tests/components/textfield/TextFieldMaxLengthRemovedFromDOM.html
index 3086b66dfa..3086b66dfa 100644
--- a/uitest/src/com/vaadin/tests/components/textfield/TextFieldMaxLengthRemovedFromDOM.html
+++ b/uitest/tb2/com/vaadin/tests/components/textfield/TextFieldMaxLengthRemovedFromDOM.html
diff --git a/uitest/src/com/vaadin/tests/components/textfield/TextFieldNullRepresentation.html b/uitest/tb2/com/vaadin/tests/components/textfield/TextFieldNullRepresentation.html
index c4a887d764..c4a887d764 100644
--- a/uitest/src/com/vaadin/tests/components/textfield/TextFieldNullRepresentation.html
+++ b/uitest/tb2/com/vaadin/tests/components/textfield/TextFieldNullRepresentation.html
diff --git a/uitest/src/com/vaadin/tests/components/textfield/TextFieldNullRepresentationAndSelection.html b/uitest/tb2/com/vaadin/tests/components/textfield/TextFieldNullRepresentationAndSelection.html
index cfd397b4f2..cfd397b4f2 100644
--- a/uitest/src/com/vaadin/tests/components/textfield/TextFieldNullRepresentationAndSelection.html
+++ b/uitest/tb2/com/vaadin/tests/components/textfield/TextFieldNullRepresentationAndSelection.html
diff --git a/uitest/src/com/vaadin/tests/components/textfield/TextFieldTextChangeEvent.html b/uitest/tb2/com/vaadin/tests/components/textfield/TextFieldTextChangeEvent.html
index ad98d72ce8..ad98d72ce8 100644
--- a/uitest/src/com/vaadin/tests/components/textfield/TextFieldTextChangeEvent.html
+++ b/uitest/tb2/com/vaadin/tests/components/textfield/TextFieldTextChangeEvent.html
diff --git a/uitest/src/com/vaadin/tests/components/textfield/TextFieldWithDataSourceAndInputPrompt.html b/uitest/tb2/com/vaadin/tests/components/textfield/TextFieldWithDataSourceAndInputPrompt.html
index cf08d8923d..cf08d8923d 100644
--- a/uitest/src/com/vaadin/tests/components/textfield/TextFieldWithDataSourceAndInputPrompt.html
+++ b/uitest/tb2/com/vaadin/tests/components/textfield/TextFieldWithDataSourceAndInputPrompt.html
diff --git a/uitest/src/com/vaadin/tests/components/textfield/TextFieldWithProperty.html b/uitest/tb2/com/vaadin/tests/components/textfield/TextFieldWithProperty.html
index fd26e3613f..fd26e3613f 100644
--- a/uitest/src/com/vaadin/tests/components/textfield/TextFieldWithProperty.html
+++ b/uitest/tb2/com/vaadin/tests/components/textfield/TextFieldWithProperty.html
diff --git a/uitest/src/com/vaadin/tests/components/textfield/TextFieldWithPropertyFormatter.html b/uitest/tb2/com/vaadin/tests/components/textfield/TextFieldWithPropertyFormatter.html
index f6406af84b..f6406af84b 100644
--- a/uitest/src/com/vaadin/tests/components/textfield/TextFieldWithPropertyFormatter.html
+++ b/uitest/tb2/com/vaadin/tests/components/textfield/TextFieldWithPropertyFormatter.html
diff --git a/uitest/src/com/vaadin/tests/components/textfield/TextFields.html b/uitest/tb2/com/vaadin/tests/components/textfield/TextFields.html
index 3a13fdbdcf..3a13fdbdcf 100644
--- a/uitest/src/com/vaadin/tests/components/textfield/TextFields.html
+++ b/uitest/tb2/com/vaadin/tests/components/textfield/TextFields.html
diff --git a/uitest/src/com/vaadin/tests/components/tree/ActionsOnTreeBackground.html b/uitest/tb2/com/vaadin/tests/components/tree/ActionsOnTreeBackground.html
index 8b679208d0..8b679208d0 100644
--- a/uitest/src/com/vaadin/tests/components/tree/ActionsOnTreeBackground.html
+++ b/uitest/tb2/com/vaadin/tests/components/tree/ActionsOnTreeBackground.html
diff --git a/uitest/src/com/vaadin/tests/components/tree/ExpandCollapseTree.html b/uitest/tb2/com/vaadin/tests/components/tree/ExpandCollapseTree.html
index 8bb51204aa..8bb51204aa 100644
--- a/uitest/src/com/vaadin/tests/components/tree/ExpandCollapseTree.html
+++ b/uitest/tb2/com/vaadin/tests/components/tree/ExpandCollapseTree.html
diff --git a/uitest/src/com/vaadin/tests/components/tree/PreselectedTreeVisible.html b/uitest/tb2/com/vaadin/tests/components/tree/PreselectedTreeVisible.html
index 7f8bb408aa..7f8bb408aa 100644
--- a/uitest/src/com/vaadin/tests/components/tree/PreselectedTreeVisible.html
+++ b/uitest/tb2/com/vaadin/tests/components/tree/PreselectedTreeVisible.html
diff --git a/uitest/src/com/vaadin/tests/components/tree/SimpleTree.html b/uitest/tb2/com/vaadin/tests/components/tree/SimpleTree.html
index a446f67726..a446f67726 100644
--- a/uitest/src/com/vaadin/tests/components/tree/SimpleTree.html
+++ b/uitest/tb2/com/vaadin/tests/components/tree/SimpleTree.html
diff --git a/uitest/src/com/vaadin/tests/components/tree/TreeConnectors-base.html b/uitest/tb2/com/vaadin/tests/components/tree/TreeConnectors-base.html
index 8b9aaab2f7..8b9aaab2f7 100644
--- a/uitest/src/com/vaadin/tests/components/tree/TreeConnectors-base.html
+++ b/uitest/tb2/com/vaadin/tests/components/tree/TreeConnectors-base.html
diff --git a/uitest/src/com/vaadin/tests/components/tree/TreeConnectors-chameleon.html b/uitest/tb2/com/vaadin/tests/components/tree/TreeConnectors-chameleon.html
index 0200c31b4a..0200c31b4a 100644
--- a/uitest/src/com/vaadin/tests/components/tree/TreeConnectors-chameleon.html
+++ b/uitest/tb2/com/vaadin/tests/components/tree/TreeConnectors-chameleon.html
diff --git a/uitest/src/com/vaadin/tests/components/tree/TreeConnectors-reindeer.html b/uitest/tb2/com/vaadin/tests/components/tree/TreeConnectors-reindeer.html
index f69dde73e4..f69dde73e4 100644
--- a/uitest/src/com/vaadin/tests/components/tree/TreeConnectors-reindeer.html
+++ b/uitest/tb2/com/vaadin/tests/components/tree/TreeConnectors-reindeer.html
diff --git a/uitest/src/com/vaadin/tests/components/tree/TreeConnectors-runo.html b/uitest/tb2/com/vaadin/tests/components/tree/TreeConnectors-runo.html
index 46d12bfb9d..46d12bfb9d 100644
--- a/uitest/src/com/vaadin/tests/components/tree/TreeConnectors-runo.html
+++ b/uitest/tb2/com/vaadin/tests/components/tree/TreeConnectors-runo.html
diff --git a/uitest/src/com/vaadin/tests/components/tree/TreeContextMenuAndIcons.html b/uitest/tb2/com/vaadin/tests/components/tree/TreeContextMenuAndIcons.html
index 6f9b5e81c3..6f9b5e81c3 100644
--- a/uitest/src/com/vaadin/tests/components/tree/TreeContextMenuAndIcons.html
+++ b/uitest/tb2/com/vaadin/tests/components/tree/TreeContextMenuAndIcons.html
diff --git a/uitest/src/com/vaadin/tests/components/tree/TreeDragAndDropFromTable.html b/uitest/tb2/com/vaadin/tests/components/tree/TreeDragAndDropFromTable.html
index b093bd90d6..b093bd90d6 100644
--- a/uitest/src/com/vaadin/tests/components/tree/TreeDragAndDropFromTable.html
+++ b/uitest/tb2/com/vaadin/tests/components/tree/TreeDragAndDropFromTable.html
diff --git a/uitest/src/com/vaadin/tests/components/tree/TreeFiltering.html b/uitest/tb2/com/vaadin/tests/components/tree/TreeFiltering.html
index 2b08cdf865..2b08cdf865 100644
--- a/uitest/src/com/vaadin/tests/components/tree/TreeFiltering.html
+++ b/uitest/tb2/com/vaadin/tests/components/tree/TreeFiltering.html
diff --git a/uitest/src/com/vaadin/tests/components/tree/TreeFocusGaining.html b/uitest/tb2/com/vaadin/tests/components/tree/TreeFocusGaining.html
index 74a69ec203..74a69ec203 100644
--- a/uitest/src/com/vaadin/tests/components/tree/TreeFocusGaining.html
+++ b/uitest/tb2/com/vaadin/tests/components/tree/TreeFocusGaining.html
diff --git a/uitest/src/com/vaadin/tests/components/tree/TreeHorizontalResize.html b/uitest/tb2/com/vaadin/tests/components/tree/TreeHorizontalResize.html
index 8e882e215d..8e882e215d 100644
--- a/uitest/src/com/vaadin/tests/components/tree/TreeHorizontalResize.html
+++ b/uitest/tb2/com/vaadin/tests/components/tree/TreeHorizontalResize.html
diff --git a/uitest/src/com/vaadin/tests/components/tree/TreeIconUpdate.html b/uitest/tb2/com/vaadin/tests/components/tree/TreeIconUpdate.html
index d16d8fd79d..d16d8fd79d 100644
--- a/uitest/src/com/vaadin/tests/components/tree/TreeIconUpdate.html
+++ b/uitest/tb2/com/vaadin/tests/components/tree/TreeIconUpdate.html
diff --git a/uitest/src/com/vaadin/tests/components/tree/TreeItemClickAndValueChange.html b/uitest/tb2/com/vaadin/tests/components/tree/TreeItemClickAndValueChange.html
index 83508c9478..83508c9478 100644
--- a/uitest/src/com/vaadin/tests/components/tree/TreeItemClickAndValueChange.html
+++ b/uitest/tb2/com/vaadin/tests/components/tree/TreeItemClickAndValueChange.html
diff --git a/uitest/src/com/vaadin/tests/components/tree/TreeKeyboardNavigationScroll.html b/uitest/tb2/com/vaadin/tests/components/tree/TreeKeyboardNavigationScroll.html
index 0f0db2b71e..0f0db2b71e 100644
--- a/uitest/src/com/vaadin/tests/components/tree/TreeKeyboardNavigationScroll.html
+++ b/uitest/tb2/com/vaadin/tests/components/tree/TreeKeyboardNavigationScroll.html
diff --git a/uitest/src/com/vaadin/tests/components/tree/TreeKeyboardNavigationValidators.html b/uitest/tb2/com/vaadin/tests/components/tree/TreeKeyboardNavigationValidators.html
index 2439079d09..2439079d09 100644
--- a/uitest/src/com/vaadin/tests/components/tree/TreeKeyboardNavigationValidators.html
+++ b/uitest/tb2/com/vaadin/tests/components/tree/TreeKeyboardNavigationValidators.html
diff --git a/uitest/src/com/vaadin/tests/components/tree/TreeNodeCaptionWrapping.html b/uitest/tb2/com/vaadin/tests/components/tree/TreeNodeCaptionWrapping.html
index f98482f4c7..f98482f4c7 100644
--- a/uitest/src/com/vaadin/tests/components/tree/TreeNodeCaptionWrapping.html
+++ b/uitest/tb2/com/vaadin/tests/components/tree/TreeNodeCaptionWrapping.html
diff --git a/uitest/src/com/vaadin/tests/components/tree/TreeScrolling.html b/uitest/tb2/com/vaadin/tests/components/tree/TreeScrolling.html
index 880d52ed75..880d52ed75 100644
--- a/uitest/src/com/vaadin/tests/components/tree/TreeScrolling.html
+++ b/uitest/tb2/com/vaadin/tests/components/tree/TreeScrolling.html
diff --git a/uitest/src/com/vaadin/tests/components/tree/TreeScrollingOnSelection.html b/uitest/tb2/com/vaadin/tests/components/tree/TreeScrollingOnSelection.html
index bd8e944c32..bd8e944c32 100644
--- a/uitest/src/com/vaadin/tests/components/tree/TreeScrollingOnSelection.html
+++ b/uitest/tb2/com/vaadin/tests/components/tree/TreeScrollingOnSelection.html
diff --git a/uitest/src/com/vaadin/tests/components/tree/TreeShiftMultiSelectNodes.html b/uitest/tb2/com/vaadin/tests/components/tree/TreeShiftMultiSelectNodes.html
index 53709b2a64..53709b2a64 100644
--- a/uitest/src/com/vaadin/tests/components/tree/TreeShiftMultiSelectNodes.html
+++ b/uitest/tb2/com/vaadin/tests/components/tree/TreeShiftMultiSelectNodes.html
diff --git a/uitest/src/com/vaadin/tests/components/tree/TreeTooltip.html b/uitest/tb2/com/vaadin/tests/components/tree/TreeTooltip.html
index afebdaacd5..afebdaacd5 100644
--- a/uitest/src/com/vaadin/tests/components/tree/TreeTooltip.html
+++ b/uitest/tb2/com/vaadin/tests/components/tree/TreeTooltip.html
diff --git a/uitest/src/com/vaadin/tests/components/tree/TreeWithIcons.html b/uitest/tb2/com/vaadin/tests/components/tree/TreeWithIcons.html
index 0b01807054..0b01807054 100644
--- a/uitest/src/com/vaadin/tests/components/tree/TreeWithIcons.html
+++ b/uitest/tb2/com/vaadin/tests/components/tree/TreeWithIcons.html
diff --git a/uitest/src/com/vaadin/tests/components/treetable/AddItemToEmptyTreeTable.html b/uitest/tb2/com/vaadin/tests/components/treetable/AddItemToEmptyTreeTable.html
index 15dc0e074d..15dc0e074d 100755
--- a/uitest/src/com/vaadin/tests/components/treetable/AddItemToEmptyTreeTable.html
+++ b/uitest/tb2/com/vaadin/tests/components/treetable/AddItemToEmptyTreeTable.html
diff --git a/uitest/src/com/vaadin/tests/components/treetable/AddNodesOnExpand.html b/uitest/tb2/com/vaadin/tests/components/treetable/AddNodesOnExpand.html
index efcbded1d5..efcbded1d5 100644
--- a/uitest/src/com/vaadin/tests/components/treetable/AddNodesOnExpand.html
+++ b/uitest/tb2/com/vaadin/tests/components/treetable/AddNodesOnExpand.html
diff --git a/uitest/src/com/vaadin/tests/components/treetable/ChangeDataSourcePageLengthZero.html b/uitest/tb2/com/vaadin/tests/components/treetable/ChangeDataSourcePageLengthZero.html
index 8391ca186d..8391ca186d 100644
--- a/uitest/src/com/vaadin/tests/components/treetable/ChangeDataSourcePageLengthZero.html
+++ b/uitest/tb2/com/vaadin/tests/components/treetable/ChangeDataSourcePageLengthZero.html
diff --git a/uitest/src/com/vaadin/tests/components/treetable/ComponentsInTreeTable.html b/uitest/tb2/com/vaadin/tests/components/treetable/ComponentsInTreeTable.html
index 05c5986e6b..05c5986e6b 100644
--- a/uitest/src/com/vaadin/tests/components/treetable/ComponentsInTreeTable.html
+++ b/uitest/tb2/com/vaadin/tests/components/treetable/ComponentsInTreeTable.html
diff --git a/uitest/src/com/vaadin/tests/components/treetable/DynamicallyModified.html b/uitest/tb2/com/vaadin/tests/components/treetable/DynamicallyModified.html
index 01bbb75361..01bbb75361 100644
--- a/uitest/src/com/vaadin/tests/components/treetable/DynamicallyModified.html
+++ b/uitest/tb2/com/vaadin/tests/components/treetable/DynamicallyModified.html
diff --git a/uitest/src/com/vaadin/tests/components/treetable/EmptyingTreeTableTest.html b/uitest/tb2/com/vaadin/tests/components/treetable/EmptyingTreeTableTest.html
index 0c43d41aca..0c43d41aca 100644
--- a/uitest/src/com/vaadin/tests/components/treetable/EmptyingTreeTableTest.html
+++ b/uitest/tb2/com/vaadin/tests/components/treetable/EmptyingTreeTableTest.html
diff --git a/uitest/src/com/vaadin/tests/components/treetable/ExpandAndCollapseListeners.html b/uitest/tb2/com/vaadin/tests/components/treetable/ExpandAndCollapseListeners.html
index 81a62aaa50..81a62aaa50 100644
--- a/uitest/src/com/vaadin/tests/components/treetable/ExpandAndCollapseListeners.html
+++ b/uitest/tb2/com/vaadin/tests/components/treetable/ExpandAndCollapseListeners.html
diff --git a/uitest/src/com/vaadin/tests/components/treetable/KeepAllItemsVisible.html b/uitest/tb2/com/vaadin/tests/components/treetable/KeepAllItemsVisible.html
index 0d92deec16..0d92deec16 100644
--- a/uitest/src/com/vaadin/tests/components/treetable/KeepAllItemsVisible.html
+++ b/uitest/tb2/com/vaadin/tests/components/treetable/KeepAllItemsVisible.html
diff --git a/uitest/src/com/vaadin/tests/components/treetable/ProgrammaticCollapse.html b/uitest/tb2/com/vaadin/tests/components/treetable/ProgrammaticCollapse.html
index e06efe85d7..e06efe85d7 100644
--- a/uitest/src/com/vaadin/tests/components/treetable/ProgrammaticCollapse.html
+++ b/uitest/tb2/com/vaadin/tests/components/treetable/ProgrammaticCollapse.html
diff --git a/uitest/src/com/vaadin/tests/components/treetable/RemoveAllItemsRefresh.html b/uitest/tb2/com/vaadin/tests/components/treetable/RemoveAllItemsRefresh.html
index 1d4c65498b..1d4c65498b 100644
--- a/uitest/src/com/vaadin/tests/components/treetable/RemoveAllItemsRefresh.html
+++ b/uitest/tb2/com/vaadin/tests/components/treetable/RemoveAllItemsRefresh.html
diff --git a/uitest/src/com/vaadin/tests/components/treetable/RowAnimation.html b/uitest/tb2/com/vaadin/tests/components/treetable/RowAnimation.html
index 64ff061c13..64ff061c13 100644
--- a/uitest/src/com/vaadin/tests/components/treetable/RowAnimation.html
+++ b/uitest/tb2/com/vaadin/tests/components/treetable/RowAnimation.html
diff --git a/uitest/src/com/vaadin/tests/components/treetable/TreeTableExpandWithRowStyle.html b/uitest/tb2/com/vaadin/tests/components/treetable/TreeTableExpandWithRowStyle.html
index 2143de2607..2143de2607 100644
--- a/uitest/src/com/vaadin/tests/components/treetable/TreeTableExpandWithRowStyle.html
+++ b/uitest/tb2/com/vaadin/tests/components/treetable/TreeTableExpandWithRowStyle.html
diff --git a/uitest/src/com/vaadin/tests/components/treetable/TreeTableExtraScrollBarWithChildren.html b/uitest/tb2/com/vaadin/tests/components/treetable/TreeTableExtraScrollBarWithChildren.html
index 611e7a5994..611e7a5994 100644
--- a/uitest/src/com/vaadin/tests/components/treetable/TreeTableExtraScrollBarWithChildren.html
+++ b/uitest/tb2/com/vaadin/tests/components/treetable/TreeTableExtraScrollBarWithChildren.html
diff --git a/uitest/src/com/vaadin/tests/components/treetable/TreeTableExtraScrollbar.html b/uitest/tb2/com/vaadin/tests/components/treetable/TreeTableExtraScrollbar.html
index c499747232..c499747232 100644
--- a/uitest/src/com/vaadin/tests/components/treetable/TreeTableExtraScrollbar.html
+++ b/uitest/tb2/com/vaadin/tests/components/treetable/TreeTableExtraScrollbar.html
diff --git a/uitest/src/com/vaadin/tests/components/treetable/TreeTableGeneratedColumns.html b/uitest/tb2/com/vaadin/tests/components/treetable/TreeTableGeneratedColumns.html
index 52d2fd7b3f..52d2fd7b3f 100644
--- a/uitest/src/com/vaadin/tests/components/treetable/TreeTableGeneratedColumns.html
+++ b/uitest/tb2/com/vaadin/tests/components/treetable/TreeTableGeneratedColumns.html
diff --git a/uitest/src/com/vaadin/tests/components/treetable/TreeTableGeneratedRows.html b/uitest/tb2/com/vaadin/tests/components/treetable/TreeTableGeneratedRows.html
index 6419a8c251..6419a8c251 100644
--- a/uitest/src/com/vaadin/tests/components/treetable/TreeTableGeneratedRows.html
+++ b/uitest/tb2/com/vaadin/tests/components/treetable/TreeTableGeneratedRows.html
diff --git a/uitest/src/com/vaadin/tests/components/treetable/TreeTableInternalError.html b/uitest/tb2/com/vaadin/tests/components/treetable/TreeTableInternalError.html
index 1aa952d77e..1aa952d77e 100644
--- a/uitest/src/com/vaadin/tests/components/treetable/TreeTableInternalError.html
+++ b/uitest/tb2/com/vaadin/tests/components/treetable/TreeTableInternalError.html
diff --git a/uitest/src/com/vaadin/tests/components/treetable/TreeTableSetCollapsed.html b/uitest/tb2/com/vaadin/tests/components/treetable/TreeTableSetCollapsed.html
index 5c878dba42..5c878dba42 100644
--- a/uitest/src/com/vaadin/tests/components/treetable/TreeTableSetCollapsed.html
+++ b/uitest/tb2/com/vaadin/tests/components/treetable/TreeTableSetCollapsed.html
diff --git a/uitest/src/com/vaadin/tests/components/twincolselect/TwinColSelectParentDisabled.html b/uitest/tb2/com/vaadin/tests/components/twincolselect/TwinColSelectParentDisabled.html
index 266fef421d..266fef421d 100644
--- a/uitest/src/com/vaadin/tests/components/twincolselect/TwinColSelectParentDisabled.html
+++ b/uitest/tb2/com/vaadin/tests/components/twincolselect/TwinColSelectParentDisabled.html
diff --git a/uitest/src/com/vaadin/tests/components/twincolselect/TwinColSelectSelection.html b/uitest/tb2/com/vaadin/tests/components/twincolselect/TwinColSelectSelection.html
index 58187a37de..58187a37de 100644
--- a/uitest/src/com/vaadin/tests/components/twincolselect/TwinColSelectSelection.html
+++ b/uitest/tb2/com/vaadin/tests/components/twincolselect/TwinColSelectSelection.html
diff --git a/uitest/src/com/vaadin/tests/components/ui/ChangeFragmentOnServerToMatchClient.html b/uitest/tb2/com/vaadin/tests/components/ui/ChangeFragmentOnServerToMatchClient.html
index 8276f0fd89..8276f0fd89 100644
--- a/uitest/src/com/vaadin/tests/components/ui/ChangeFragmentOnServerToMatchClient.html
+++ b/uitest/tb2/com/vaadin/tests/components/ui/ChangeFragmentOnServerToMatchClient.html
diff --git a/uitest/src/com/vaadin/tests/components/ui/CurrentUiRetained.html b/uitest/tb2/com/vaadin/tests/components/ui/CurrentUiRetained.html
index fe030f2ea7..fe030f2ea7 100644
--- a/uitest/src/com/vaadin/tests/components/ui/CurrentUiRetained.html
+++ b/uitest/tb2/com/vaadin/tests/components/ui/CurrentUiRetained.html
diff --git a/uitest/src/com/vaadin/tests/components/ui/CustomUITest.html b/uitest/tb2/com/vaadin/tests/components/ui/CustomUITest.html
index 90f7df44d2..90f7df44d2 100644
--- a/uitest/src/com/vaadin/tests/components/ui/CustomUITest.html
+++ b/uitest/tb2/com/vaadin/tests/components/ui/CustomUITest.html
diff --git a/uitest/src/com/vaadin/tests/components/ui/EmptyWindow.html b/uitest/tb2/com/vaadin/tests/components/ui/EmptyWindow.html
index cc7b0751fc..cc7b0751fc 100644
--- a/uitest/src/com/vaadin/tests/components/ui/EmptyWindow.html
+++ b/uitest/tb2/com/vaadin/tests/components/ui/EmptyWindow.html
diff --git a/uitest/src/com/vaadin/tests/components/ui/FragmentChangeEvents.html b/uitest/tb2/com/vaadin/tests/components/ui/FragmentChangeEvents.html
index 972d3d6143..972d3d6143 100644
--- a/uitest/src/com/vaadin/tests/components/ui/FragmentChangeEvents.html
+++ b/uitest/tb2/com/vaadin/tests/components/ui/FragmentChangeEvents.html
diff --git a/uitest/src/com/vaadin/tests/components/ui/IdOverrideTest.html b/uitest/tb2/com/vaadin/tests/components/ui/IdOverrideTest.html
index 3a38712fb4..3a38712fb4 100644
--- a/uitest/src/com/vaadin/tests/components/ui/IdOverrideTest.html
+++ b/uitest/tb2/com/vaadin/tests/components/ui/IdOverrideTest.html
diff --git a/uitest/src/com/vaadin/tests/components/ui/InitiallyEmptyFragment.html b/uitest/tb2/com/vaadin/tests/components/ui/InitiallyEmptyFragment.html
index 933274eae6..933274eae6 100644
--- a/uitest/src/com/vaadin/tests/components/ui/InitiallyEmptyFragment.html
+++ b/uitest/tb2/com/vaadin/tests/components/ui/InitiallyEmptyFragment.html
diff --git a/uitest/src/com/vaadin/tests/components/ui/LazyInitUIs.html b/uitest/tb2/com/vaadin/tests/components/ui/LazyInitUIs.html
index f2650ce1c2..f2650ce1c2 100644
--- a/uitest/src/com/vaadin/tests/components/ui/LazyInitUIs.html
+++ b/uitest/tb2/com/vaadin/tests/components/ui/LazyInitUIs.html
diff --git a/uitest/src/com/vaadin/tests/components/ui/PollListenerTest.html b/uitest/tb2/com/vaadin/tests/components/ui/PollListenerTest.html
index ac39d1f03c..ac39d1f03c 100644
--- a/uitest/src/com/vaadin/tests/components/ui/PollListenerTest.html
+++ b/uitest/tb2/com/vaadin/tests/components/ui/PollListenerTest.html
diff --git a/uitest/src/com/vaadin/tests/components/ui/RpcInvocationHandlerToString.html b/uitest/tb2/com/vaadin/tests/components/ui/RpcInvocationHandlerToString.html
index c9d5aa303d..c9d5aa303d 100644
--- a/uitest/src/com/vaadin/tests/components/ui/RpcInvocationHandlerToString.html
+++ b/uitest/tb2/com/vaadin/tests/components/ui/RpcInvocationHandlerToString.html
diff --git a/uitest/src/com/vaadin/tests/components/ui/TestUITheme.html b/uitest/tb2/com/vaadin/tests/components/ui/TestUITheme.html
index ed2c0ec971..ed2c0ec971 100644
--- a/uitest/src/com/vaadin/tests/components/ui/TestUITheme.html
+++ b/uitest/tb2/com/vaadin/tests/components/ui/TestUITheme.html
diff --git a/uitest/src/com/vaadin/tests/components/ui/UIAccessExceptionHandling.html b/uitest/tb2/com/vaadin/tests/components/ui/UIAccessExceptionHandling.html
index 94d8aa2777..94d8aa2777 100644
--- a/uitest/src/com/vaadin/tests/components/ui/UIAccessExceptionHandling.html
+++ b/uitest/tb2/com/vaadin/tests/components/ui/UIAccessExceptionHandling.html
diff --git a/uitest/src/com/vaadin/tests/components/ui/UIInitBrowserDetails.html b/uitest/tb2/com/vaadin/tests/components/ui/UIInitBrowserDetails.html
index 3fd7a0d560..3fd7a0d560 100644
--- a/uitest/src/com/vaadin/tests/components/ui/UIInitBrowserDetails.html
+++ b/uitest/tb2/com/vaadin/tests/components/ui/UIInitBrowserDetails.html
diff --git a/uitest/src/com/vaadin/tests/components/ui/UIInitException.html b/uitest/tb2/com/vaadin/tests/components/ui/UIInitException.html
index 68b11e7942..68b11e7942 100644
--- a/uitest/src/com/vaadin/tests/components/ui/UIInitException.html
+++ b/uitest/tb2/com/vaadin/tests/components/ui/UIInitException.html
diff --git a/uitest/src/com/vaadin/tests/components/ui/UIPolling.html b/uitest/tb2/com/vaadin/tests/components/ui/UIPolling.html
index f770bae009..f770bae009 100644
--- a/uitest/src/com/vaadin/tests/components/ui/UIPolling.html
+++ b/uitest/tb2/com/vaadin/tests/components/ui/UIPolling.html
diff --git a/uitest/src/com/vaadin/tests/components/ui/UITabIndex.html b/uitest/tb2/com/vaadin/tests/components/ui/UITabIndex.html
index fa083f1489..fa083f1489 100644
--- a/uitest/src/com/vaadin/tests/components/ui/UITabIndex.html
+++ b/uitest/tb2/com/vaadin/tests/components/ui/UITabIndex.html
diff --git a/uitest/src/com/vaadin/tests/components/ui/UIsInMultipleTabs.html b/uitest/tb2/com/vaadin/tests/components/ui/UIsInMultipleTabs.html
index 08561588c4..08561588c4 100644
--- a/uitest/src/com/vaadin/tests/components/ui/UIsInMultipleTabs.html
+++ b/uitest/tb2/com/vaadin/tests/components/ui/UIsInMultipleTabs.html
diff --git a/uitest/src/com/vaadin/tests/components/uitest/base_theme_test.html b/uitest/tb2/com/vaadin/tests/components/uitest/base_theme_test.html
index cdbcf8bacc..cdbcf8bacc 100644
--- a/uitest/src/com/vaadin/tests/components/uitest/base_theme_test.html
+++ b/uitest/tb2/com/vaadin/tests/components/uitest/base_theme_test.html
diff --git a/uitest/src/com/vaadin/tests/components/uitest/chameleon_theme_test.html b/uitest/tb2/com/vaadin/tests/components/uitest/chameleon_theme_test.html
index d5d70a62d2..d5d70a62d2 100644
--- a/uitest/src/com/vaadin/tests/components/uitest/chameleon_theme_test.html
+++ b/uitest/tb2/com/vaadin/tests/components/uitest/chameleon_theme_test.html
diff --git a/uitest/src/com/vaadin/tests/components/uitest/liferay_theme_test.html b/uitest/tb2/com/vaadin/tests/components/uitest/liferay_theme_test.html
index 783784e993..783784e993 100644
--- a/uitest/src/com/vaadin/tests/components/uitest/liferay_theme_test.html
+++ b/uitest/tb2/com/vaadin/tests/components/uitest/liferay_theme_test.html
diff --git a/uitest/src/com/vaadin/tests/components/uitest/reindeer_theme_test.html b/uitest/tb2/com/vaadin/tests/components/uitest/reindeer_theme_test.html
index 175def94d3..175def94d3 100644
--- a/uitest/src/com/vaadin/tests/components/uitest/reindeer_theme_test.html
+++ b/uitest/tb2/com/vaadin/tests/components/uitest/reindeer_theme_test.html
diff --git a/uitest/src/com/vaadin/tests/components/uitest/runo_theme_test.html b/uitest/tb2/com/vaadin/tests/components/uitest/runo_theme_test.html
index 0db6614a9c..0db6614a9c 100644
--- a/uitest/src/com/vaadin/tests/components/uitest/runo_theme_test.html
+++ b/uitest/tb2/com/vaadin/tests/components/uitest/runo_theme_test.html
diff --git a/uitest/src/com/vaadin/tests/components/window/CenteredWindowWithUndefinedSize.html b/uitest/tb2/com/vaadin/tests/components/window/CenteredWindowWithUndefinedSize.html
index 2e15d8d645..2e15d8d645 100644
--- a/uitest/src/com/vaadin/tests/components/window/CenteredWindowWithUndefinedSize.html
+++ b/uitest/tb2/com/vaadin/tests/components/window/CenteredWindowWithUndefinedSize.html
diff --git a/uitest/src/com/vaadin/tests/components/window/CloseSubWindow.html b/uitest/tb2/com/vaadin/tests/components/window/CloseSubWindow.html
index ae77628bff..ae77628bff 100644
--- a/uitest/src/com/vaadin/tests/components/window/CloseSubWindow.html
+++ b/uitest/tb2/com/vaadin/tests/components/window/CloseSubWindow.html
diff --git a/uitest/src/com/vaadin/tests/components/window/EmbeddedInSubWindow.html b/uitest/tb2/com/vaadin/tests/components/window/EmbeddedInSubWindow.html
index d74e09dd6a..d74e09dd6a 100644
--- a/uitest/src/com/vaadin/tests/components/window/EmbeddedInSubWindow.html
+++ b/uitest/tb2/com/vaadin/tests/components/window/EmbeddedInSubWindow.html
diff --git a/uitest/src/com/vaadin/tests/components/window/ExtraLargeSubWindow.html b/uitest/tb2/com/vaadin/tests/components/window/ExtraLargeSubWindow.html
index 128e3c3583..128e3c3583 100644
--- a/uitest/src/com/vaadin/tests/components/window/ExtraLargeSubWindow.html
+++ b/uitest/tb2/com/vaadin/tests/components/window/ExtraLargeSubWindow.html
diff --git a/uitest/src/com/vaadin/tests/components/window/ExtraWindowShown.html b/uitest/tb2/com/vaadin/tests/components/window/ExtraWindowShown.html
index 65e8b0166b..65e8b0166b 100644
--- a/uitest/src/com/vaadin/tests/components/window/ExtraWindowShown.html
+++ b/uitest/tb2/com/vaadin/tests/components/window/ExtraWindowShown.html
diff --git a/uitest/src/com/vaadin/tests/components/window/RepaintWindowContents.html b/uitest/tb2/com/vaadin/tests/components/window/RepaintWindowContents.html
index 9cbcf1d5ea..9cbcf1d5ea 100644
--- a/uitest/src/com/vaadin/tests/components/window/RepaintWindowContents.html
+++ b/uitest/tb2/com/vaadin/tests/components/window/RepaintWindowContents.html
diff --git a/uitest/src/com/vaadin/tests/components/window/SubWindowOrder.html b/uitest/tb2/com/vaadin/tests/components/window/SubWindowOrder.html
index 6fd99caa19..6fd99caa19 100644
--- a/uitest/src/com/vaadin/tests/components/window/SubWindowOrder.html
+++ b/uitest/tb2/com/vaadin/tests/components/window/SubWindowOrder.html
diff --git a/uitest/src/com/vaadin/tests/components/window/SubWindows-runo.html b/uitest/tb2/com/vaadin/tests/components/window/SubWindows-runo.html
index 5cbd350174..5cbd350174 100644
--- a/uitest/src/com/vaadin/tests/components/window/SubWindows-runo.html
+++ b/uitest/tb2/com/vaadin/tests/components/window/SubWindows-runo.html
diff --git a/uitest/src/com/vaadin/tests/components/window/SubWindows.html b/uitest/tb2/com/vaadin/tests/components/window/SubWindows.html
index 3b2109e3f1..3b2109e3f1 100644
--- a/uitest/src/com/vaadin/tests/components/window/SubWindows.html
+++ b/uitest/tb2/com/vaadin/tests/components/window/SubWindows.html
diff --git a/uitest/src/com/vaadin/tests/components/window/UndefinedHeightSubWindowAndContent.html b/uitest/tb2/com/vaadin/tests/components/window/UndefinedHeightSubWindowAndContent.html
index a3b56cd12a..a3b56cd12a 100644
--- a/uitest/src/com/vaadin/tests/components/window/UndefinedHeightSubWindowAndContent.html
+++ b/uitest/tb2/com/vaadin/tests/components/window/UndefinedHeightSubWindowAndContent.html
diff --git a/uitest/src/com/vaadin/tests/components/window/WindowCaptionTest.html b/uitest/tb2/com/vaadin/tests/components/window/WindowCaptionTest.html
index 85ab67e4f6..85ab67e4f6 100644
--- a/uitest/src/com/vaadin/tests/components/window/WindowCaptionTest.html
+++ b/uitest/tb2/com/vaadin/tests/components/window/WindowCaptionTest.html
diff --git a/uitest/src/com/vaadin/tests/components/window/WindowClickEvents.html b/uitest/tb2/com/vaadin/tests/components/window/WindowClickEvents.html
index af5b9ec180..af5b9ec180 100644
--- a/uitest/src/com/vaadin/tests/components/window/WindowClickEvents.html
+++ b/uitest/tb2/com/vaadin/tests/components/window/WindowClickEvents.html
diff --git a/uitest/src/com/vaadin/tests/components/window/WindowMaximizeRestoreTest.html b/uitest/tb2/com/vaadin/tests/components/window/WindowMaximizeRestoreTest.html
index a27963a066..a27963a066 100644
--- a/uitest/src/com/vaadin/tests/components/window/WindowMaximizeRestoreTest.html
+++ b/uitest/tb2/com/vaadin/tests/components/window/WindowMaximizeRestoreTest.html
diff --git a/uitest/src/com/vaadin/tests/components/window/WindowShouldRemoveActionHandler.html b/uitest/tb2/com/vaadin/tests/components/window/WindowShouldRemoveActionHandler.html
index 4923bff58a..4923bff58a 100644
--- a/uitest/src/com/vaadin/tests/components/window/WindowShouldRemoveActionHandler.html
+++ b/uitest/tb2/com/vaadin/tests/components/window/WindowShouldRemoveActionHandler.html
diff --git a/uitest/src/com/vaadin/tests/components/window/WindowThemes.html b/uitest/tb2/com/vaadin/tests/components/window/WindowThemes.html
index 7e8d8af53d..7e8d8af53d 100644
--- a/uitest/src/com/vaadin/tests/components/window/WindowThemes.html
+++ b/uitest/tb2/com/vaadin/tests/components/window/WindowThemes.html
diff --git a/uitest/src/com/vaadin/tests/components/window/WindowWithInvalidCloseListener.html b/uitest/tb2/com/vaadin/tests/components/window/WindowWithInvalidCloseListener.html
index 3ea1f8f732..3ea1f8f732 100644
--- a/uitest/src/com/vaadin/tests/components/window/WindowWithInvalidCloseListener.html
+++ b/uitest/tb2/com/vaadin/tests/components/window/WindowWithInvalidCloseListener.html
diff --git a/uitest/src/com/vaadin/tests/containers/filesystemcontainer/FileSystemContainerInTreeTable.html b/uitest/tb2/com/vaadin/tests/containers/filesystemcontainer/FileSystemContainerInTreeTable.html
index b5ccd53df0..b5ccd53df0 100644
--- a/uitest/src/com/vaadin/tests/containers/filesystemcontainer/FileSystemContainerInTreeTable.html
+++ b/uitest/tb2/com/vaadin/tests/containers/filesystemcontainer/FileSystemContainerInTreeTable.html
diff --git a/uitest/src/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKey.html b/uitest/tb2/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKey.html
index 8b955ce17d..8b955ce17d 100644
--- a/uitest/src/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKey.html
+++ b/uitest/tb2/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKey.html
diff --git a/uitest/src/com/vaadin/tests/converter/ConverterThatEnforcesAFormat.html b/uitest/tb2/com/vaadin/tests/converter/ConverterThatEnforcesAFormat.html
index 0bb576d76c..0bb576d76c 100644
--- a/uitest/src/com/vaadin/tests/converter/ConverterThatEnforcesAFormat.html
+++ b/uitest/tb2/com/vaadin/tests/converter/ConverterThatEnforcesAFormat.html
diff --git a/uitest/src/com/vaadin/tests/dd/DnDOnSubtree.html b/uitest/tb2/com/vaadin/tests/dd/DnDOnSubtree.html
index 844636cb02..844636cb02 100644
--- a/uitest/src/com/vaadin/tests/dd/DnDOnSubtree.html
+++ b/uitest/tb2/com/vaadin/tests/dd/DnDOnSubtree.html
diff --git a/uitest/src/com/vaadin/tests/dd/NotPaintedAcceptSource.html b/uitest/tb2/com/vaadin/tests/dd/NotPaintedAcceptSource.html
index 2fcede8be9..2fcede8be9 100644
--- a/uitest/src/com/vaadin/tests/dd/NotPaintedAcceptSource.html
+++ b/uitest/tb2/com/vaadin/tests/dd/NotPaintedAcceptSource.html
diff --git a/uitest/src/com/vaadin/tests/debug/DebugWindowPresent.html b/uitest/tb2/com/vaadin/tests/debug/DebugWindowPresent.html
index ff5c731e5c..ff5c731e5c 100644
--- a/uitest/src/com/vaadin/tests/debug/DebugWindowPresent.html
+++ b/uitest/tb2/com/vaadin/tests/debug/DebugWindowPresent.html
diff --git a/uitest/src/com/vaadin/tests/extensions/BasicExtensionTest.html b/uitest/tb2/com/vaadin/tests/extensions/BasicExtensionTest.html
index 85a5900b74..85a5900b74 100644
--- a/uitest/src/com/vaadin/tests/extensions/BasicExtensionTest.html
+++ b/uitest/tb2/com/vaadin/tests/extensions/BasicExtensionTest.html
diff --git a/uitest/src/com/vaadin/tests/extensions/JavascriptManagerTest.html b/uitest/tb2/com/vaadin/tests/extensions/JavascriptManagerTest.html
index 7bdb8cd50f..7bdb8cd50f 100644
--- a/uitest/src/com/vaadin/tests/extensions/JavascriptManagerTest.html
+++ b/uitest/tb2/com/vaadin/tests/extensions/JavascriptManagerTest.html
diff --git a/uitest/src/com/vaadin/tests/fieldgroup/BooleanTextField.html b/uitest/tb2/com/vaadin/tests/fieldgroup/BooleanTextField.html
index 92c03e14f4..92c03e14f4 100644
--- a/uitest/src/com/vaadin/tests/fieldgroup/BooleanTextField.html
+++ b/uitest/tb2/com/vaadin/tests/fieldgroup/BooleanTextField.html
diff --git a/uitest/src/com/vaadin/tests/fieldgroup/CommitHandlerFailures.html b/uitest/tb2/com/vaadin/tests/fieldgroup/CommitHandlerFailures.html
index aaaa0a6625..aaaa0a6625 100644
--- a/uitest/src/com/vaadin/tests/fieldgroup/CommitHandlerFailures.html
+++ b/uitest/tb2/com/vaadin/tests/fieldgroup/CommitHandlerFailures.html
diff --git a/uitest/src/com/vaadin/tests/fieldgroup/CommitWithValidationOrConversionError.html b/uitest/tb2/com/vaadin/tests/fieldgroup/CommitWithValidationOrConversionError.html
index 8681c6485e..8681c6485e 100644
--- a/uitest/src/com/vaadin/tests/fieldgroup/CommitWithValidationOrConversionError.html
+++ b/uitest/tb2/com/vaadin/tests/fieldgroup/CommitWithValidationOrConversionError.html
diff --git a/uitest/src/com/vaadin/tests/fieldgroup/DateForm.html b/uitest/tb2/com/vaadin/tests/fieldgroup/DateForm.html
index f141091805..f141091805 100644
--- a/uitest/src/com/vaadin/tests/fieldgroup/DateForm.html
+++ b/uitest/tb2/com/vaadin/tests/fieldgroup/DateForm.html
diff --git a/uitest/src/com/vaadin/tests/fieldgroup/FieldGroupDiscard.html b/uitest/tb2/com/vaadin/tests/fieldgroup/FieldGroupDiscard.html
index a2ac1b748b..a2ac1b748b 100644
--- a/uitest/src/com/vaadin/tests/fieldgroup/FieldGroupDiscard.html
+++ b/uitest/tb2/com/vaadin/tests/fieldgroup/FieldGroupDiscard.html
diff --git a/uitest/src/com/vaadin/tests/fields/TabIndexes.html b/uitest/tb2/com/vaadin/tests/fields/TabIndexes.html
index a78be3045c..a78be3045c 100644
--- a/uitest/src/com/vaadin/tests/fields/TabIndexes.html
+++ b/uitest/tb2/com/vaadin/tests/fields/TabIndexes.html
diff --git a/uitest/src/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.html b/uitest/tb2/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.html
index 6dab84d718..6dab84d718 100644
--- a/uitest/src/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.html
+++ b/uitest/tb2/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.html
diff --git a/uitest/src/com/vaadin/tests/layouts/CssLayoutRemoveComponent.html b/uitest/tb2/com/vaadin/tests/layouts/CssLayoutRemoveComponent.html
index 0932be5d81..0932be5d81 100644
--- a/uitest/src/com/vaadin/tests/layouts/CssLayoutRemoveComponent.html
+++ b/uitest/tb2/com/vaadin/tests/layouts/CssLayoutRemoveComponent.html
diff --git a/uitest/src/com/vaadin/tests/layouts/GridLayoutSpanExpansion.html b/uitest/tb2/com/vaadin/tests/layouts/GridLayoutSpanExpansion.html
index 5237d5f49e..5237d5f49e 100644
--- a/uitest/src/com/vaadin/tests/layouts/GridLayoutSpanExpansion.html
+++ b/uitest/tb2/com/vaadin/tests/layouts/GridLayoutSpanExpansion.html
diff --git a/uitest/src/com/vaadin/tests/layouts/MarginWithExpandRatio.html b/uitest/tb2/com/vaadin/tests/layouts/MarginWithExpandRatio.html
index 3132bdd16d..3132bdd16d 100644
--- a/uitest/src/com/vaadin/tests/layouts/MarginWithExpandRatio.html
+++ b/uitest/tb2/com/vaadin/tests/layouts/MarginWithExpandRatio.html
diff --git a/uitest/src/com/vaadin/tests/layouts/MovingComponentsWhileOldParentInvisible.html b/uitest/tb2/com/vaadin/tests/layouts/MovingComponentsWhileOldParentInvisible.html
index e93332c0a5..e93332c0a5 100644
--- a/uitest/src/com/vaadin/tests/layouts/MovingComponentsWhileOldParentInvisible.html
+++ b/uitest/tb2/com/vaadin/tests/layouts/MovingComponentsWhileOldParentInvisible.html
diff --git a/uitest/src/com/vaadin/tests/layouts/MovingInvisibleField.html b/uitest/tb2/com/vaadin/tests/layouts/MovingInvisibleField.html
index a3f3f84dac..a3f3f84dac 100644
--- a/uitest/src/com/vaadin/tests/layouts/MovingInvisibleField.html
+++ b/uitest/tb2/com/vaadin/tests/layouts/MovingInvisibleField.html
diff --git a/uitest/src/com/vaadin/tests/layouts/TreeWithBordersInLayout.html b/uitest/tb2/com/vaadin/tests/layouts/TreeWithBordersInLayout.html
index e1034c2f0e..e1034c2f0e 100644
--- a/uitest/src/com/vaadin/tests/layouts/TreeWithBordersInLayout.html
+++ b/uitest/tb2/com/vaadin/tests/layouts/TreeWithBordersInLayout.html
diff --git a/uitest/src/com/vaadin/tests/layouts/VerticalLayoutSlotExpansionAndAlignment.html b/uitest/tb2/com/vaadin/tests/layouts/VerticalLayoutSlotExpansionAndAlignment.html
index e0b17ec8cf..e0b17ec8cf 100644
--- a/uitest/src/com/vaadin/tests/layouts/VerticalLayoutSlotExpansionAndAlignment.html
+++ b/uitest/tb2/com/vaadin/tests/layouts/VerticalLayoutSlotExpansionAndAlignment.html
diff --git a/uitest/src/com/vaadin/tests/navigator/NavigatorTest.html b/uitest/tb2/com/vaadin/tests/navigator/NavigatorTest.html
index 7eba02aa94..7eba02aa94 100644
--- a/uitest/src/com/vaadin/tests/navigator/NavigatorTest.html
+++ b/uitest/tb2/com/vaadin/tests/navigator/NavigatorTest.html
diff --git a/uitest/src/com/vaadin/tests/requesthandlers/AppResource404.html b/uitest/tb2/com/vaadin/tests/requesthandlers/AppResource404.html
index 543faa30dd..543faa30dd 100644
--- a/uitest/src/com/vaadin/tests/requesthandlers/AppResource404.html
+++ b/uitest/tb2/com/vaadin/tests/requesthandlers/AppResource404.html
diff --git a/uitest/src/com/vaadin/tests/serialization/ChangeStateWhenReattaching.html b/uitest/tb2/com/vaadin/tests/serialization/ChangeStateWhenReattaching.html
index 865f2bae0b..865f2bae0b 100644
--- a/uitest/src/com/vaadin/tests/serialization/ChangeStateWhenReattaching.html
+++ b/uitest/tb2/com/vaadin/tests/serialization/ChangeStateWhenReattaching.html
diff --git a/uitest/src/com/vaadin/tests/serialization/DelegateToWidgetTest.html b/uitest/tb2/com/vaadin/tests/serialization/DelegateToWidgetTest.html
index 12228eb9f0..12228eb9f0 100644
--- a/uitest/src/com/vaadin/tests/serialization/DelegateToWidgetTest.html
+++ b/uitest/tb2/com/vaadin/tests/serialization/DelegateToWidgetTest.html
diff --git a/uitest/src/com/vaadin/tests/serialization/DelegateWithoutStateClass.html b/uitest/tb2/com/vaadin/tests/serialization/DelegateWithoutStateClass.html
index 2ee77b2d9f..2ee77b2d9f 100644
--- a/uitest/src/com/vaadin/tests/serialization/DelegateWithoutStateClass.html
+++ b/uitest/tb2/com/vaadin/tests/serialization/DelegateWithoutStateClass.html
diff --git a/uitest/src/com/vaadin/tests/serialization/SerializerNamespaceTest.html b/uitest/tb2/com/vaadin/tests/serialization/SerializerNamespaceTest.html
index 70d0e905f5..70d0e905f5 100644
--- a/uitest/src/com/vaadin/tests/serialization/SerializerNamespaceTest.html
+++ b/uitest/tb2/com/vaadin/tests/serialization/SerializerNamespaceTest.html
diff --git a/uitest/src/com/vaadin/tests/themes/CSSInjectTest.html b/uitest/tb2/com/vaadin/tests/themes/CSSInjectTest.html
index 0c70d6f711..0c70d6f711 100644
--- a/uitest/src/com/vaadin/tests/themes/CSSInjectTest.html
+++ b/uitest/tb2/com/vaadin/tests/themes/CSSInjectTest.html
diff --git a/uitest/src/com/vaadin/tests/vaadincontext/BootstrapModifyUI.html b/uitest/tb2/com/vaadin/tests/vaadincontext/BootstrapModifyUI.html
index 83db83b5f7..83db83b5f7 100644
--- a/uitest/src/com/vaadin/tests/vaadincontext/BootstrapModifyUI.html
+++ b/uitest/tb2/com/vaadin/tests/vaadincontext/BootstrapModifyUI.html
diff --git a/uitest/src/com/vaadin/tests/validation/EmptyFieldErrorIndicators.html b/uitest/tb2/com/vaadin/tests/validation/EmptyFieldErrorIndicators.html
index c8fcb20411..c8fcb20411 100644
--- a/uitest/src/com/vaadin/tests/validation/EmptyFieldErrorIndicators.html
+++ b/uitest/tb2/com/vaadin/tests/validation/EmptyFieldErrorIndicators.html
diff --git a/uitest/src/com/vaadin/tests/validation/ValidationOfRequiredEmptyFields.html b/uitest/tb2/com/vaadin/tests/validation/ValidationOfRequiredEmptyFields.html
index 62d972e89f..62d972e89f 100644
--- a/uitest/src/com/vaadin/tests/validation/ValidationOfRequiredEmptyFields.html
+++ b/uitest/tb2/com/vaadin/tests/validation/ValidationOfRequiredEmptyFields.html
diff --git a/uitest/src/com/vaadin/tests/widgetset/server/ReplaceComponent.html b/uitest/tb2/com/vaadin/tests/widgetset/server/ReplaceComponent.html
index 79b231949c..79b231949c 100644
--- a/uitest/src/com/vaadin/tests/widgetset/server/ReplaceComponent.html
+++ b/uitest/tb2/com/vaadin/tests/widgetset/server/ReplaceComponent.html
diff --git a/uitest/test.xml b/uitest/test.xml
index 2ee655ecf6..496e115c18 100644
--- a/uitest/test.xml
+++ b/uitest/test.xml
@@ -38,7 +38,7 @@
<!-- fileset containing all TestBench tests to run -->
<fileset dir="${test.xml.dir}" id="html-test-files">
- <include name="src/**/*.html" />
+ <include name="tb2/**/*.html" />
<exclude name="integration-testscripts/**/*.html" />
</fileset>