Drag&Drop Grid Demo

Hello community!

I started using Vaadin this week. For my project I need something like the
DragDropGridLayoutDemo.

So I created a new Mavenproject and added the DragDropLayouts addon. Then I created a new class and copied the democode into my class and added the DragDropLayoutDemo-Component to my UI.
When I start my application now the design is equal to the example preview, but I can not drag&drop the buttons.

Please can somebody tell me the steps I have to do to implement this example into my project.

I am using Vaadin 7.0.4 and Maven.

Thanks a lot!

Eike

Have you
compiled the widgetset
after you added the addon?

It works! Thank you!

I have another question concerning this addon. I use two different components in the grid - labels and buttons. Only the labels are dragable. Now my problem is, when I drag a label and drop it on another label or button I want, that the components switch their position. So that it is impossible, that I have an empty field in the grid.

Is that possible with the addon or is it neccessary to adapt it?

Thanks in advance!!!

I found a solution by myself. I replaced the DefaultGridLayoutDropHandler with my own one.

It works!

Please let me know, if there is a better way!

Yes, that is the way you should do it.

You could of course also extend DefaultGridLayoutDropHandler if you do not want to write the whole DropHandler yourself depending on what modifications you need.

Hello again!

Thanks for your answer. Good to heard that I made it right.
Now I have another question. I am trying to add a border around the grid cells. I red something about this, but it does not work. Can you help me again, please?

Thanks in advance!