Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
8.1 - Using a TreeGrid as a PropertyGrid
I realize that my previous post was not as clear as I wanted it to be and I will give it one more try.
I wish to implement PropertyGrids in Vaadin to behave like http://www.devcomponents.com/kb2/wp-content/uploads/2011/04/property-grid-image.png Trees are needed, and TreeGrid looks close to being done, so that's great.
However, these grids behave differently from normal grids because each row can have a different type of editor in the value column, where the normal way is setting an editor for the whole column. Thus, the way the current (Tree)Grid editor works does not work for me.
I have tried using a ComponentRenderer that would be an editor, but it's a little awkward... I cannot change the dimensions to fit the underlying cell (Any hints?)
Also, I have tried using the normal editor configured with a TextField component on the value column, and buffering turned off. I can see that the component is painted over the row and allows editing right where I want it to be. But the "property name" column is obscured by the row editor. So I'm left wondering if the Grid Editor could be forced into a smaller shape, corresponding to the selected editable cell ?
Finally, could the Column editor field be changed dynamically when the current selection changes? Thus the value cell could be edited with an appropriate editor for the data type.
I'm just pitching some ideas. Any comment or suggestion is welcome.
I managed to make it look the way I want, with CustomRenderer. I had to modify certain styles for it work nicely but I'm happy with how it behaves. I have another problem with focus for which I will start a new conversation.
I'm kind of interested, do you mind sharing a screenshot?
Sure ! You will see that I have managed to make the edition really clean.
Yeah, that looks pretty nice :)
There are a bunch of things needed in the API to make it work 100% reliably enough to make it a published addon, but that's what I would like to do :)
Sounds good! Always nice to get new add-ons.