This patch removes DataProviderKeyMapper which was mostly dead code
already. Uses a regular KeyMapper instead.
Change-Id: Ic97d1dc827d45fde65bcddc0414bfe711032620c
Fix DataSource NPE under when dataChangeHandler is not set (#16590)
AbstractRemoteDataSource no longer asserts that data change handler
exists. Changing the DataSource in Grid is now safe even during data
source backend requests.
Change-Id: I57fb1cb6c7fd2aa7b8365a9b283a80a162349af1
Fixes a bug when scrolling a Grid with details open (#16644)
If the a row with an open details row was pushed out of the active row range,
the component would be removed from the connector hierarchy on the server
side but not on the client side. Vaadin gave a warning for this. This patch
makes sure that the widget is properly deregistered when it gets outside
of the active range pre-emptively.
Change-Id: I2145e82a990ded31e4426e85e59edad9d4d4194f
This change makes it easier to create custom data sources. The
implementations in provided implementations are retained as a
convenience.
Change-Id: If34bfb378eec75a37f28af78e512210ed9d7c304
Fix cache updating in AbstractRemoteDataSource on row remove (#13334)
Also contains a minor performance tweak for row adding in start of the
cache and updates to cell focus logic.
Change-Id: Ia64e43dd5ae8777014885b5e7dd05cb31b54eae2
Make AbstractRemoteDataSource easier to use (#13334)
- Adds a callback to requestRows so implementors know what to do when
receiving data
- Guestimate the initial amount of available rows so an initial request
can be made before the actual size is known
Change-Id: Iba44eab1695e3ff9947a4e7ed16eee55af98fec4
Avoid eager cache refresh after insert and remove (#13334)
By doing the cache coverage check lazily, multiple inserts or removes
happening "at the same time" can be taken into account when deciding
which rows to fetch.
Change-Id: I25c8248a1ec4cae76484c959efd474c9a880d329
Fix RpcDataSource to use RPC for row pins/unpins (#13334)
This patch removes the temprarilyPinnedRows workaround from
AbstractRemoteDataSource and refactors the whole feature to be part of
RpcDataSource where it should be.
Change-Id: Id55020dd11dda3dcf54dfe3c1b41af8e495c1c0c
Fix AbstractRemoteDataSource always inform data availability (#13334)
Call to ensureAvailability will now always call DataChangeHandler
dataAvailable function even if rows are not fetched from remote.
Change-Id: Id498de41abf0a1cb886cd033198f64d5c39c3abd
There's no setting of size, but it's inferred instead. Also, you can't
set the size, only ask for a size.
Change-Id: Ibec5ecc5008b3fc38e5942c25e1b8ff8a1b7e402
Move ActiveRowHandler to the data provider extension (#13334)
This makes GridConnector include information about what rows are cached
when more data is requested instead of the previous way of synchronizing
this separately every time a scroll event occurs. This new approach
makes it possible to have rows cached even if they are not in view. It
also improves performance since there's no need to do an RPC every time
scrolling changes what is visible.
Change-Id: Ibfe8a69586dfc397591f56efa8ef351e274f0116