Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best way to implement a Drag and Drop List in GWT

Tags:

java

gwt

I'm looking to implement a simple list with Drag n Drop to reorder the list. However, I may want to add more DnD features in my CMS in the future too.

I've come across 3 options in my searches

  • Drag-and-Drop Library for Google-Web-Toolkit (GWT) - http://code.google.com/p/gwt-dnd/
  • Repository for GwtQuery plugins - http://code.google.com/p/gwtquery-plugins/
  • a GWT2.4 mechanism Drag and Drop in GWT 2.4

Since GWT has evolved over the years, and I've found lots of old articles covering the topic of implementing DnD, I was wondering what the current best way is of implementing DnD in GWT (2.5)

like image 957
Bruce Lowe Avatar asked Oct 06 '22 19:10

Bruce Lowe


2 Answers

If you can use the 'native' support implemented in GWT i recommend stick with this.

Advantages:

  • speed , no extra library requirements

Problems

  • somewhat limited functionality (limited by HTML5 native features)
  • browser support limited ( make sure you have Internet Explorer support- if you need)

I used gwt-dnd for a complex UI with lots of Floating windows/panels (similar to desktop environment). I recommend it if you are constrained by HTML5 features or browser support.

like image 54
MihaiS Avatar answered Oct 10 '22 02:10

MihaiS


You can keep it simple by sticking to GWT 2.4 feature support if it clears your checklist for now.

1) It will definitely be faster than any other third party stuff.

2) You can always easily update to latest GWT if you come across a bug rather than wait on the third party update.

3) If you really need some additonal feature then you can try out other two options. They are well maintained and have evolved along with GWT. You just need to ensure that performance profiling is done to cover your use cases.

like image 27
appbootup Avatar answered Oct 10 '22 01:10

appbootup