Artur [Thu, 2 Feb 2017 07:28:33 +0000 (09:28 +0200)]
Make it easy to invoke ServerRpc methods as part of unit tests (#8346)
Executing RPC methods is useful when testing component interaction with
the server. Not only inside the framework but also when creating add-ons
and applications.
* Integration tests moved from uitest to separate test modules
* Run TB4 tests with maven profile
* Remove old ant/ivy build scripts from uitest
* Add 'needs-ssh' test category for reconnection test
* Add default values for testing and validation builds
* Add placeholder build.xml with instructions to run Maven
Leif Åstrand [Wed, 1 Feb 2017 09:09:04 +0000 (11:09 +0200)]
Add a maven plugin for formatting according to Eclipse settings
Running formatter:format will format all files in a submodule using an
embedded Eclipse compiler (based on Neon SR1)
according to the regular formatting settings file.
Add APIs to inform components of stale objects in DataProvider (#8271)
* Add DataProvider refreshItem for single item update
* Add 'id' concept for DataProviders
This patch also adds a simplified data provider that can replace items
based on their id. This can be used to simulate stale objects from an actual
backend.
* Add refresh logic to Grid SelectionModels
* Remove broken equals and hashCode
* Refresh KeyMapper, clean up some methods
* Fix UI.access in test
* Fix tests and Grid single selection model
* Do clean up before replacing data provider
* Check correct variable for null value
* Fix other selects, add generic tests
* Code style fixes, removed assert
* Merge remote-tracking branch 'origin/master' into 286_refresh_items
* Fix documentation for refreshing an item
* Improve introduction chapter, minor clarifications
* Merge remote-tracking branch 'origin/master' into 287_refresh_items
Artur [Wed, 25 Jan 2017 09:27:49 +0000 (11:27 +0200)]
Support loading of HTML imports using @HtmlImport (#8301)
Note that not all browsers yet support HTML imports. If a polyfill
is needed to load HTML imports, it must be loaded before HTML Imports
can be loaded. There is no automatic loading of any polyfills.
Leif Åstrand [Wed, 25 Jan 2017 07:44:16 +0000 (09:44 +0200)]
Refactor how DataCommunicator passes filters to its DataProvider (#8309)
The immediate benefit of this change is that ComboBox doesn't have to do
any wrapping when a ListDataProvider is set. A secondary benefit is that
a bunch of redundant type parameters and unsafe casts can be removed.
Leif Åstrand [Wed, 25 Jan 2017 06:36:25 +0000 (08:36 +0200)]
Add static helpers for creating callback data providers (#8314)
Cannot overload the same create method for this purpose since it
conflicts with T... overload. Each case is instead given its own
descriptive but still discoverable method name.
Leif Åstrand [Tue, 24 Jan 2017 08:38:57 +0000 (10:38 +0200)]
Unify container wrapping (#8312)
* Method names unified to withXyzFilter
* withConfigurableFilter moved to DataProvider
* Remove DataProviderWrapper.convert since it does the same as
DataProvider.withConvertedFilter
* Make javadocs slightly more consistent
* Make type parameters consistent
Changing from relative to defined size leaves the component positioned wrong,
also changing from defined size to relative size leaves the component in the
wrong position with the wrong size.
Change makes the wrapper rerun setChildWidgetPosition() that adds/removes
necessary css definitions to/from the cssPosition String.
Leif Åstrand [Mon, 23 Jan 2017 12:11:39 +0000 (14:11 +0200)]
Remove outdated filtering concepts (#8289)
* Remove outdated filtering concepts
withFilter is removed since filters are supposed to be set as state in
the data provider instead of by wrapping.
AppendabileFilterDataProvider is removed since the data provider is
supposed to do any appending when updating its own state instead of
through wrapping.
Leif Åstrand [Thu, 19 Jan 2017 07:12:24 +0000 (09:12 +0200)]
Change BackEndDataProvider into an interface (#8268)
* Change BackEndDataProvider into an interface
BackEndDataProvider is now an interface with methods for setting
sorting options based on SortOrder instances.
AbstractBackEndDataProvider stores sorting options, combines them with
the sorting provided in the query and invokes its own abstract fetch and
size methods.
CallbackDataProvider implements a BackEndDataProvider based on two
lambdas.
Sami Ekblad [Wed, 18 Jan 2017 07:09:54 +0000 (09:09 +0200)]
Better instructions in widgetset optimization view in the debug window. (#8261)
* Better instructions in widgetset optimization view in the debug window.
The generated example code is ok, but steps to use them are not obvious.
Added more details to debug window instructions to make it clear what steps are
needed to optimize the widgetset.
Leif Åstrand [Mon, 16 Jan 2017 08:43:57 +0000 (10:43 +0200)]
Inherit settings from parent pom (#8240)
Without this, maven.compiler.source will not be set to 1.8 which
sometimes seems to make Eclipse think it should use Java 5 compiler
settings for the project, causing various issues.
Leif Åstrand [Fri, 13 Jan 2017 08:08:01 +0000 (10:08 +0200)]
Replace Listing with HasDataProvider and HasFilterableDataProvider (#8122)
* Replace Listing with HasDataProvider and HasFilterableDataProvider
The type parameters of the Listing interface does in practice mean that
it isn't useful for anything. This patch replaces that interface with
separate types for components that require filterable data providers and
components that support any kind of data provider.
The setItem methods are extracted to a common interface that is also
directly implemented by AbstractListing.