-
Notifications
You must be signed in to change notification settings - Fork 18
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
When editing an updating Grid, I get exception.. #6
Comments
I believe that Grid requires all rows to be unique; or rather they have an unique ID that identifies every row without any doubt. The exception would support this belief, but Vaadin's Anyways, I'll continue by assuming that the Grid requires all rows to be unique. By default the I thus believe that there might be more than one |
Yes, i was also thinking that it requires them to be unique. But if the Grid uses the hashCode, it should be different, when the variables inside an objects are different. Or did I misunderstood that? And if the keys are the same, wouldn't the same problem arise when getting in to the view, that lists the objects in Grid? So this problem basically happens only after editing something. And it does not matter if you edit it so that it's unique. And in that test there is only two objects. And It happens even if I edit them so that they really are unique. I also tested this by not using the DataProvider. I just assigner this person -list to the grid, and still the same thing.. Did you make a bug report to vaadin already, or will I make it? |
Ah, I haven't realized that this only happens in the edit mode - I'm sorry. Well, then you are way more skilled in this area than me ;) Can you please open the bug report? I think you will be more capable of providing all necessary details than I can. Assigning a person list to the Grid will actually create a |
Also, if I understand correctly, you're migrating your project to Vaadin 8 and Kotlin? I would be thrilled to learn of the project and how the migration went; also I believe that Vaadin marketing guys would love to hear that, you should drop a mail to all of us - in Finnish, of course :-) |
Yeap, I'm basically rewriting an old JAva and Vaadin 7.7 based project to use Kotlin and Vaadin.. But The whole backend is now rewritten with kotlin, but I'm only struggling with this UI now :) And it seems like the documentation in Vaadin is not the clearest one regarding the Grid component. Btw. is there any major issues, if I try to use Vaadin 8.0.6 in vaadin-on-kotlin? Is there any features that will not work with older vaadin version? |
Just open a bug report at https://vaadin.com/bug while Vaadin 8.1 is still in RC1. I think that guys will want to learn of the docu shortcomings and will be able to fix it until the 8.1 final is out. I believe you should be able to use Vaadin 8.0.6 just fine with Vaadin-on-Kotlin. I'm personally using 8.1 RC1 because of ComponentRenderer support added in 8.1, and it's working quite nicely: aedict-online.eu , also https://martin.app.fi/karibudsl/ |
Please, when you do open a bug, just link it from here so that I can be notified when it's fixed upstream - thanks! |
Here's the link to the bug: vaadin/framework#9678 |
I have hit similar but not identical symptoms -- may or may not be the same. NOTE: the object in question came from vok-db , where "id" is a special property that's required for data binding and DB access. For a while I was confused that this was what was being used by DataProvider. |
I've been trying to figure out, what is wrong in my code. When I go to edit some of the data in grid, I get this exception..
And here is the code I'm using:
Even if I leave the whole ListDataProvider out of it, I still get the same duplicate key error.
So I'm starting to wonder, is this a bug in Vaadin, or am I just doing something wrong? Is the problem with ListDataProvider, or with the Binder? I'm just not getting it how to use this properly through the docs..
The text was updated successfully, but these errors were encountered: