O'Reilly logo

Learning Ext JS 4 by Armando Gonzalez, Crysfel Villa

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Enhancing our application with drag and drop

Now that we know how drag and drop works in Ext JS we are going to use these capabilities in our invoices' application.

In the categories module, we are going to add drag and drop to the invoices' data view, so we can add our invoices to different categories using the drag-and-drop operation.

In the MyApp.view.invoices.Dataview class, we need to add the methods so when an invoice item is selected we can drag it to the categories tree panel:

/** * @classMyApp.view.invoices.Dataview * @extendsExt.view.View * @author Armando Gonzalez <iam@armando.mx> * This is the definition of the invoices data view component */ Ext.define('MyApp.view.invoices.Dataview', { extend : 'Ext.view.View', alias : 'widget.invoices.dataview', ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required