O'Reilly logo

Sencha Touch Cookbook - Second Edition by Ajit Kumar

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

Responding to user actions

So far, we have seen how to create DataView, bind it to XTemplate and store, and apply certain filtering on the data. In this recipe, we will see how to handle the events generated as part of the user action, for example, when a user selects an item in the view.

Getting ready

Make sure that you have set up your development environment by following the recipes outlined in Chapter 1, Gear Up for the Journey.

Make sure that you have the ch04 folder created inside the www folder.

How to do it...

Carry out the following steps:

  1. Create and open a new file, ch04_06.js, and paste the following code into it:
    Ext.application({ name : 'MyApp', launch : function() { var data = [{ album:'rose', url:'http://images.flowers.vg/250x300/rdroses01.jpg', ...

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