PDA

View Full Version : Can an ExtJS App Drag/Drop with other PC apps?



JoyfulBobHome
6 May 2010, 7:56 AM
I searched the forums and couldn't tell if an ExtJS app can handle drag n drop from/to other PC apps, like Word or Windows Explorer. Say dragging a Windows Explorer file into a ExtJS tree node, or Word text into an form's input field?

Boxcopter
6 May 2010, 11:00 AM
Don't take me as an official on this subject or anything, but dragging and dropping from another application requires some sort of hook to the actual operating system i.e. some application running on your machine like flash or a java app. You don't want javascript to actually do this sort of thing, although some browsers allow this, but most don't react as expected (as in simply move plain text instead of an intermediate format). You will need to rely on an alternate method. No javascript framework I have seen does this without employing some browser plugin wizardry nor do I think it is reasonable to expect it.

After saying that, there are ways to implement this within just about any javascript library although you are going to need an actual application framework as an intermediary like Adobe Flex, Java applets, etc.

Nesta
6 May 2010, 9:10 PM
There is a UserExtension that enabled DD from Excel to ExtJs Grids:
http://www.extjs.com/forum/showthread.php?79511-Ext.ux.grid.DataDrop

Never tried it so i can not tell you how (good) it works.

Droping files from Explorer is a complete other thing.
Google has enabled this feature a month ago (only for Chrome and FF (with addon))
http://gmailblog.blogspot.com/2010/04/drag-and-drop-attachments-onto-messages.html

maybe html5 makes some improvements here don't know

Boxcopter
7 May 2010, 4:51 AM
There is a UserExtension that enabled DD from Excel to ExtJs Grids:
http://www.extjs.com/forum/showthread.php?79511-Ext.ux.grid.DataDrop

Never tried it so i can not tell you how (good) it works.

Droping files from Explorer is a complete other thing.
Google has enabled this feature a month ago (only for Chrome and FF (with addon))
http://gmailblog.blogspot.com/2010/04/drag-and-drop-attachments-onto-messages.html

maybe html5 makes some improvements here don't know
Excel works because it actually interprets tables, but they need to be non css styled with attributes in the tag. Chrome adds it using its Gears add-on, but it is still a plug-in. If there was a straight forward method to doing this I would love to see it because it would simplify parts of my job substantially. HTML 5 is slightly improved by providing even stricter standards for media and layouts, but I doubt it improves anything too much too soon. Microsoft would have to adopt it completely and so would its products. Commercial products have an easier time with this as they can adopt many strategies to get this to work.

Try the gears approach with GXT. It sounds like it might be what you are looking for since it is made by the same company.

JoyfulBobHome
7 May 2010, 5:24 AM
Thanks for your replies! I appreciate it! =D> It gives us a starting point for further investigation.