* Improve VMenuBar click handling logic
Backport to V7:
During `updateFromUIDL` inside MenuBarConnector we empty and re-instantiate the components of MenuBar. When we are modifying the Menubar from the BlurEventListener of another component, we ,by this, remove widgets, therefore clickEvent is not fired and the action of the MenuItem is not proceed as a result. (The BlurEvent is fired before the click event in the chain of events. )
To improve the situation, we catch onMouseDown event , which is fired before BlurEvent,by assigning mouseDown flag to true. Then if no click event has yet happened, we delay the execution of update inside `updateFromUIDL` by default 500 ms. Then if click event occurs, it proceeds normally. The time can be increased/decreased using setter.
There is no delay, if we are clicking on the MenuBar as usual or no Blur listener is set.
This change allows setting descriptions preserving the action from the MenuItem
(cherry picked from commit 22cc85c76f)
* Improve VMenuBar click handling logic
Add missing files from the first commit
Backported to V7:
(cherry picked from commit 22cc85c)
Fix Combo Box filtered on Property not showing results when page length is zero (#11247)
* Fix #11246
Take zero pageLength into account when calculating filtered ComboBox contents.
* Create ComboboxPageLengthZeroFilterTest.java
* add UI tests for fix
Add fallback resolvers for CurrentInstance (#10974)
* Add fallback resolvers for CurrentInstance
This allow applications to inject custom default instances when the
current instances cannot be found by regular means.
For example, when VaadinServlet.getCurrent() would return null, a
fallback resolver could be invoked to properly create the servlet and
return it.
* Make the setting of CurrentInstanceFallbackResolvers protected
* Remove the default constructor. Improve test.
* Made setFallbackResolver public again
* Rename the method to defineFallbackResolver, and make it throw when a
type is used twice
* Make the method thread-safe
* Make the method thread-safe in a Java 6 way
* Thread safety with ConcurrentHashMap API instead of just Map
* Improve test with fake classes.
* Clear the test state after it has been run.
Open methods to allow custom static file serving logic (#10910)
* Open methods to allow custom static file serving logic
The methods serveStaticResources and serveStaticResourcesInVAADIN have
been changed from private to protected to allow subclasses to change how
static files are served.
Use separate identifier for push connections (#9150)
By using a separate id we can avoid sending the sessions
CSRF token as a GET parameter when initializing a push connection.
Cherry-picked from #8700 to the 7.7 branch.
Fix occasional empty rows in Table and TreeTable (#9551)
There's an intermittently happening issue with both Table and TreeTable, which results in row data disappearing.
This change removes a method which is probably a vestigial one from over five years ago and other changes are handling the things the method used to perform. Currently the method removes rows deemed unnecessary from the row buffer. The problem is, those rows are visible to the user and removing causes row contents to be lost.
Also included are manually runnable test cases which demonstrate that this removal actually prevents the issue from happening.
Fixes #7964
Fixes #5030
Do full connector tracker cleanup when the session lock is released (#9707) (#9730)
As there is no "request end" call after invoking UI.access() from a background thread,
the connector map was not earlier properly cleaned afterwards. If you toggled visibility of a
component from the background thread, the tracker state became inconsistent.
If this becomes a performance problem, it could probably be optimized to that cleanup
is done in request end and only at the end of access if not inside a request.
Backported from master
Fixes #9693
Remove unnecessary full classnames and parenthesis from code (#8681)
This change aims to reduce the number of false positives when comparing Vaadin 7 compatibility package in Vaadin 8 and actual Vaadin 7.7 branch. Conflicting parts are moved to imports as much as possible. Files have been formatted with same Eclipse version.
Call "destroy" instead of "destory" in JavaScriptRenders (#8263)
* Call "destroy" instead of "destory" in JavaScriptRenders
For backwards compatibility, calls "destory" if no "destroy" exists
Fixes #8162
* Merge branch '7.7' into _js-renderer-destory
* Merge branch '7.7' into _js-renderer-destory
* Merge branch '7.7' into _js-renderer-destory
* Merge branch '7.7' into _js-renderer-destory
* Merge branch '7.7' into _js-renderer-destory
* Improve Grid extendability (#8342).
Find GridState field type using getField() instead of getDeclaredField() so that the field could be found in superclass as well.
Change-Id: I33996f45e848575d11bb206c6a1d30d19e514968
Remove tracking of unregistered connectors (#8153)
* Remove tracking of unregistered connectors
* Merge branch '7.7' into 8111-remove-unregistered-connector-tracking
* Merge branch '7.7' into 8111-remove-unregistered-connector-tracking
* Add tests that verify markAsDirty is called on old parent
* Merge branch '7.7' into 8111-remove-unregistered-connector-tracking
Make AtmospherePushConnection methods public (#7973)
There is no sensible way to use a custom version of APC, so protected
access does not help in any way to access the underlying resource and/or
connected UI.
Enable changing the backing bean for BeanItem (#4302) (#77)
When storing a bean to the database, you typically get a new and updated
bean instance back. By allowing to change the bean instance, we make it
possible to just update the single BeanItem instance which can be used
in many places.