TextField valueChangeEvent from server?

Hello everybody. I have new error. Spent some time but still got it. I don’t even know how to ask google about it.

I have Grid and update block that opens when you select a row. For some reason I got NPE when view is opened (before selecting a row).

may it be ServerRpcHandler?

Thanks for attention!
NPE.log (12.9 KB)

Should be mentioned that I’m using vaadin 23 right now. I hadn’t such problem on v14

Hard to say without code. You should be able to debug why the binder is now called, it’s highly possible the grid change listener is called with null once you call setItems from tge grid to nullify the current selection.

In that case why stacktrace doesn’t have grid.setItems() call?

“hard to say without code”

Hi! What is in the UserForm.java line 119?

What validators does UserForm have? Maybe your error is in the validator. You try to check a null String’s length or something that, or converting a null String to number. But It’s really hard to say. I guess the problem is not in your grid, but rather in the form or its validators.

at line 119 i have this.user.getName() call but since i haven’t choose anyone in grid its null

then call this block of code only when the user != null
this line is in a validator?

Maybe in v23 the converter works different, then worked in V14, i dunno

I would start the app in debug mode and place a breakpoint somewhere in the grid and the userform would initialize.

I’ve found that the cause of validation are username and password fields. somehow login view sends value to fields in another view when I open it… probably i have a bad security config.

Hmm, i don’t get it. The SecurityService.getAuthenticatedUser() return null is the source of the problem?
Could you share the UserForm.java?


I’ll try to delete unimportant things and will share it


Neither of those seems to be UserForm.java

In the picture you selected with red border the return (UserDetails) pincipal; returns the user details if you logged in, other way it returns null ( that’s what I wanted to point out.)

Could please you search where and how do you use the withValidator method?

Do you mean i use it in a wrong way?