Book Image

Sencha Touch Cookbook

By : Ajit Kumar
Book Image

Sencha Touch Cookbook

By: Ajit Kumar

Overview of this book

Sencha touch is a versatile HTML5-based framework for developing mobile web apps that look and feel native on touch screen devices, and with it you can write your code once and deploy it to both iOS and Android saving you both time and money. The Sencha touch cookbook has a comprehensive selection of recipes covering everything from installation right through to HTML5 geo location. The Sencha Touch Cookbook really is your one stop resource for cross platform HTML5 application development. It covers the basics such as setting up an iOS and Android development environment right through to much more complex development issues such as touch gestures, animation, rich media and geo location. Every recipe is practically focused. Maximum action. Minimum theory.
Table of Contents (17 chapters)
Sencha Touch Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Designing a custom view using DataView


Template and XTemplate provide a way to create elements using the template, placeholders, and the data. There is one thing which is not really straightforward and this is the support for events. For example, if you want to handle the click on a rose to show a bigger picture of it, this is not very straightforward. We will have to work with elements and register handlers for the different DOM events that we may be interested in. In addition, there is no way to leverage the store. Store is covered in more detail in the next chapter. For now, we can say that a store is a data structure, which can hold a collection of records and can be associated with components, such as DataView, to provide it the required data to render their view. Sencha Touch provides a convenient way to create views by using XTemplate and link it with a data store and also provides events that we can handle to respond to the user action—using DataView.

This recipe describes the steps...