New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refresh data provider on hidden grid and set grid visible throws client side exceptions #4444
Comments
Some additional notes:
|
The problem is in the JS execution order. I moved the JS execution requested from the server side in the very end of browser event loop. The bug is caused two factors in the current design:
Such situation never happens for element which initially has been visible regardless of its current state. |
* Execute JS in the very end of the message processing event loop Fixes #4444 * Move JS execution via post flush listener after all listeners
* Execute JS in the very end of the message processing event loop Fixes #4444 * Move JS execution via post flush listener after all listeners
* Execute JS in the very end of the message processing event loop Fixes #4444 * Move JS execution via post flush listener after all listeners
Consider that Grid is initially setVisible(false);
Then for example search text field attempts to populate data provider with values and calls setVisible(true). Result is that (with Chrome at least) client side exception ensues.
Uncaught TypeError: Cannot read property 'updateSize' of undefined at Object.eval (eval at ft (client-BF4676DDAFDA5E40AE93EFEB692AAAD5.cache.js:971), <anonymous>:3:15) at ft (client-BF4676DDAFDA5E40AE93EFEB692AAAD5.cache.js:971) at et (client-BF4676DDAFDA5E40AE93EFEB692AAAD5.cache.js:926) at ct (client-BF4676DDAFDA5E40AE93EFEB692AAAD5.cache.js:555) at Mq (client-BF4676DDAFDA5E40AE93EFEB692AAAD5.cache.js:475) at fr.gr [as W] (client-BF4676DDAFDA5E40AE93EFEB692AAAD5.cache.js:978) at Yz (client-BF4676DDAFDA5E40AE93EFEB692AAAD5.cache.js:861)
Attached example project that demonstrates this. Based on starter project and Vaadin 10.0.2. See CategoriesList.java
gridfail.zip
The text was updated successfully, but these errors were encountered: