Registration to remove state.registeredEventListeners (fixes #9634) (#10130)
This changes SharedState.registeredEventListeners to be a Map that keeps track of how many listeners of each type have been added, and handles unregistering of such listeners correctly.
Correct all tests that introspect classpath for Vaadin classes.
Fixes vaadin/framework8-issues#399
RemoveListenersDeprecatedTest test is fixed.
Corrections are made to make the test above passes.
Change-Id: I209a4693d241a1488b69b4742f48549dbf4bf0ac
This patch updates server side add*Listener methods to return
a registration object and deprecates their corresponding
remove*Listener methods.
Additionally this patch removes add/removeListener methods which were
deprecated in 7.0.
Change-Id: I26ac5f11882512288fbbf601c7cb2aaff653ec76
Reduces time spent in findStateType() for the "40 layouts" action in
BasicPerformanceTest from around 2 ms to around 0.2 ms. This improves
the total performance of the action by about 5%.
Change-Id: I4f979827b2da0d4db87e201fa78421e5551a4113
Make Vaadin component handling proxy-friendly (#14639)
Comparisons with the ==-operator between a proxy and it's underlying
instance fail, so we should use a custom equals method instead.
Change-Id: Iaa86ae830fecbedfb1f55636e25f5affebf5aba3
Avoid object creation in getAllChildrenIterable in most cases. (#14142)
API change from:
public static Iterable<ClientConnector> getAllChildrenIterable(final ClientConnector connector)
to
public static Iterable<? extends ClientConnector> getAllChildrenIterable(final ClientConnector connector)
avoids creating wrappers in case the component has either no subcomponents
or no extensions. This covers the vast majority of components.
Change-Id: I48ffd2f26f09c265fae6e1aaabdbaa655d52ffb8
Reading properties of components should not set state to dirty (#14060).
Many core vaadin components did incorrectly mark the state as dirty when
reading from them. This patch fixes the problem, which should reduce the
amount of server->client state updates significantly.
Change-Id: I342d74129e2985a7f407e9b53a802dc0146d9992
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
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)
Avoiding duplicate lookup of connector hierarchy when a component shall be
marked dirty. Optimized if statement to fail fast.
Change-Id: I3ac82d64b235ebfd1888a6076c595f351018d887
Fixed locking in RequestHandlers and documented that RequestHandlers are called without locking (#9945)
* Added SynchronizedRequestHandler which locks the session for the whole request
* Made request handlers which do not do do heavy IO implement SynchronizedRequestHandler
* Fixed locking for GlobalResourceHandler, ConnectorResourceHandler, PublishedFileHandler
Change-Id: I0e7b442a9392828f1930685f194dc4f898d0f525
Removed CommunicationManager and PortletCommunicationManager
* Moved AbstractCommunicationManager abstract methods
getThemeResourceAsStream and createBootstrapHandler to VaadinService
* Made ACM non-abstract and renamed to LegacyCommunicationManager
* Lifted anonymous inner BootstrapHandler subclasses into named public classes
Change-Id: I31739ce8a506d572e75ca8cd5509be215e01693d