Removes double spacing from gridLayout which has empty rows or columns (#8855)
If row has no elements or only invisible elements, its size will be set to zero.
When row expand ratio was set, its size will be assigned to the value according to an expand ratio.
If component takes several rows of the gridLayout, these rows are considered as non-empty and won't be removed.
Change-Id: I10ddd22a6c9535b9978769bab7b496e11a28b78a
JsonCodec#encode() is a frequently called (hot) method. However in its
current form it is too long to be inlined.
This review reduces the length of the method from 454 bytes instructions
to 311 and optimises flow of common calls.
It however has a behaviour change for esoteric edge cases where the
order would matter. Like a custom collection which extends JSONArray and
implements collection. Previously it would have been handled by the
collection case, now its the JSONArray case. However it can be assumed
that the result: serialized to valid JSON is the same.
Change-Id: Ia552eec6322d0760581336b8b038fa03761c1d69
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
The UI.pushConnection field is transient no longer; instead PushConnection
implementations must take care of serialization internally. When a session
is serialized, the client should notice that push was disconnected and
try to reconnect. A deserialized PushConnection should be in a "disconnected"
state so the eventual client reconnection works correctly.
Change-Id: I38cfc5a5cdbd3643311f830f8d580458dcd85c56
cleanConnectorMap is a hot method.
This change improves multiple code paths:
1) The global resource handler is no longer get()ed from the session for
each connector (was in two loops).
2) The ConnectorTracker is no longer get()ed from the UI for each
connector (was in one loop).
3) values() iterator for ClientConnectors replaces
keySet() iterator + get(key) call
4) use getUI() from ClientConnector instead manual method.
5) moved removeUnregisteredConnectors to ease inlining and readability.
Change-Id: I25ff5bc32d27d30ecd8d354922ec6e4a02b05921
getAllChildrenIterable() is invoked frequently, its used by
attach/detach and markAsDirty.
Because of the implementation detail in CombinedIterator, on every call
all iterators are checked. This means that on every component which has
multiple childs, each next() call will first check the extension
iterator, before advancing in the child iterator.
By having the childs first, this overhead is reduced. If no extensions
are existing (which is quite common) the iterator is not added at all.
(creating an iterator on an empty UnmodifiableCollection is waste of
time and memory)
Change-Id: I23bb91464052ad4282963ec4b5be8a52c6847d4f
Allow editing colorpicker values in colorpicker in textfield #13469
This fix adds support for typing in color values according to
http://www.w3schools.com/cssref/css_colors_legal.asp into the
colorpicker popup input textfield.
Change-Id: If14ead791725c3052c05aa31e12e237e90c32348
Fix improper merge of 3d0ff32b from 7.1 to master (#13620)
Correctly call PushConnection.disconnect instead of setting to null.
Also remove the obsolete PushHandler.disconnectCallback.
Change-Id: Ied055d489a269b016318947cd89cf0b46003c596
Added ItemSetAddEvent and ItemSetRemoveEvent (#2794)
The events inherits the ItemSetChangedEvent and they contain more information about the added/removed items. These events are fired
from AbstractInMemoryContainer.
Change-Id: I0a7ddfd38fd01fa385479efc953ab444d1ecdf4c
Fix findUI throwing NullPointerException when extending Vaadin (#13556)
findUI sometimes threw a NPE when the session wasn't set but the UI ID
was. Doesn't occur in normal use, just when doing custom things with
requestStart/requestEnd or runPendingAccessTasks
Change-Id: Id7733567923fa30dcab4946c43b73200c2a0fac2
Add caching support for PublishedFileHandler (#13574)
Add caching support for PublishedFileHandler similar to VaadinServlet.
Testing is done manually as browser caching is difficult to develop
tests for.
Change-Id: I314745766c9feb60758547dba77eb9e13976ce91
Clean Table.propertyValueConverters if the property is removed (#8168)
Clean Table.propertyValueConverters if the property it attached to
is removed, or if the container is changed and the new container does
not contain a property with that identifier with a matching type.
Change-Id: I894ee6462ea7b9c1f9138a24fcb84db829165c7d
Clarify lock check assert message if another session is locked (#13473)
Picking this to the 7.2 branch since the other part of the ticket was already included in 7.2.
Change-Id: I1120ad5acd553e22db95e3635fffbd453fd26310
(cherry picked from commit 134c3bb96b)
ContainerEventProvider returns style names from container. Fixes #10718
ContainerEventProvider doesn't actually return
style names from container in certain situations
(copy-pasted code). This patch fixes the problem.
Change-Id: I512ea260f34a6db0572b614db393699da152fa8d
(cherry picked from commit 4709b75bb4)
ContainerEventProvider returns style names from container. Fixes #10718
ContainerEventProvider doesn't actually return
style names from container in certain situations
(copy-pasted code). This patch fixes the problem.
Change-Id: I512ea260f34a6db0572b614db393699da152fa8d
Also let through some other formatting changes that Eclipse insisted on
when saving the touched files.
Change-Id: I319de35c4862555b010d6da6d4a5e096619e2c34