-
Notifications
You must be signed in to change notification settings - Fork 730
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
Enhanced control flow: Component level control for enabling and disabling events #396
Comments
Originally by Jani Laakso I think this is a bug in TK5, for some reason when I got a big table with one ValueChangeEventListener in my view, I get a hundred calls to my ValueChangeEventListener if I
SUMMARY: |
Originally by Jani Laakso Better (but more time consuming) solution for "enhanced control flow" would be to create more (finer grained) events. e.g. ValueChangeEvent is too abstract, we should have "ValueChangeEventOnServerSide" and "ValueChangeEventOnClientSide" styled events. |
Originally by @jojule Proposed KISS method of disabling events might be better. One problem is that sometimes we do not know of all the listeners and should not disable events for them. One possible solution would be to collect all unique events in a queue while events are "disabled" and in the end send the queued events. This way all the listeners are guaranteed to be notified, but the performance problem is alleviated. One possibility would be to implement both the above methods: Also, enable disable API should probably count the number of disables in order to prevent intermediate sending in disable-disable-enable-disable-enable-enable case. |
Hello there! It looks like this issue hasn't progressed lately. There are so many issues that we just can't deal them all within a reasonable timeframe. There are a couple of things you could help to get things rolling on this issue (this is an automated message, so expect that some of these are already in use):
Thanks again for your contributions! Even though we haven't been able to get this issue fixed, we hope you to report your findings and enhancement ideas in the future too! |
The issue was automatically closed due to inactivity. If you found some new details to it or started working on it, comment on the issue so that maintainers can re-open it. |
Originally by Jani Laakso
I feel that we need component wide disable events / enable events to our framework, just like other frameworks have.
It is needed for cases when you got listeners registered on your server-side code mainly taking care of receiving events of what client-side is doing (user clicks etc.) and you are doing large updates for your components' data containers on the server-side that have nothing to do with client-side events. In these cases I do not want to receive zillions of events.
Example:
=> ISSUE: this results 100 000 calls to V.ValueChangeEventListener method which is very silly
I cannot override API in such way that I could myself add "ignoreEvents, allowEvents" methods per each component easily.
Perhaps adding this functionality would give users better control of what they are doing. I wonder if this kind of method is fundamentally too wrong? Either way, it's useful for many cases.
Typical pattern woudl be to:
Imported from https://dev.vaadin.com/ issue #1290
The text was updated successfully, but these errors were encountered: