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...