Managing a list of data using List

Say, in your application, there is a data set that needs to be presented to users in the form of a list, where users can scroll through the list and make their selection, for example, a list of contacts, list of places, list of matching words, and so on. Sencha Touch provides a List component to handle any list-related needs. This recipe shows how to use it to present the contact list to the user.

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 ch06_04.js and paste the following code in it:
    Ext.setup({ onReady: function() { Ext.regModel('Contact', { fields: ['firstName', ...

Get Sencha Touch Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.