Responding to the user action

So far, we have seen how to create DataView, bind it to an XTemplate and a 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.

How to do it...

Carry out the following steps:

  1. Create and open a new file named ch04_06.js and paste the following code into it:
    Ext.setup({ onReady: function() { var data = [{ album:'rose', url:'http://www.pictures.vg/vgflowers/400x300/flowers_pics_4870.jpg', title:'Rose 1', about:'Peach'}, … … ,{ album:'hibiscus', url:'http://www.pictures.vg/vgflowers/400x300/cflowers3224.jpg', ...

Get Sencha Touch Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.