Skip to content
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

Invisible components break grid editor #12527

Open
pwilkin opened this issue Mar 7, 2022 · 3 comments
Open

Invisible components break grid editor #12527

pwilkin opened this issue Mar 7, 2022 · 3 comments
Labels

Comments

@pwilkin
Copy link
Contributor

pwilkin commented Mar 7, 2022

In Vaadin Framework 8.4.13, when you are registering a component to be used as a grid editor for a column, if that component happens to be invisible, it completely breaks the grid. Reason: CustomEditorHandler's getWidget() method tries to get the editor component by its connector ID. Now, if the connector ID is null, then it correctly renders an empty editor. However, if the connector ID is not null (as is the case with an existing, but invisible component), an attempt is made to retrieve the connector from the id-to-connector map, but the connector is not there (because the server-side code didn't push it as a dirty, but invisible connector), causing a client-side null pointer.

Steps to reproduce: create a editable Grid, register a field as a custom editor for any column, set that field to invisible, try to activate the editor.

Easiest fix is probably splitting EditorConnector::getWidget on line 146 to do a null check on the return of the getConnector() method.

@TatuLund TatuLund added the bug label Mar 8, 2022
@TatuLund
Copy link
Contributor

TatuLund commented Mar 8, 2022

The free support of Vaadin 8 has ended February 22, 2022. We are continuing offering commercial Extended Maintenance of Vaadin 8. If you are interested to get this fix, you need to have Vaadin Prime or Enterprise subscription with Extended Maintenance option included. See more at: https://vaadin.com/pricing

@pwilkin
Copy link
Contributor Author

pwilkin commented Mar 9, 2022

Does this mean you're not accepting pull requests into the project as well? I could contribute the fix if it's permitted.

@TatuLund
Copy link
Contributor

@pwilkin It does not make much sense, since we will not be building the future releases from this repo. We will keep the issue tracker open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants