O'Reilly logo

Creating Mobile Apps with Sencha Touch 2 by Bryan P. Johnson, John Earl Clark

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

Creating the controller

The first thing we need to do in our controller is update our config section to add the new views, stores, and models for our application. We also need to add some new references and controls for these new components.

config: { stores: ['BookStore', 'NoteStore'], models: ['Book', 'Note'], views: ['bookEdit', 'noteEdit', 'noteList', 'bookList'], refs: { bookList: '#bookList', noteList: '#noteList', addBookButton: '#addBookButton', addNoteButton: '#addNoteButton', imageSelectButton: '#imageSelectButton', main: '#mainView' }, control: { addBookButton: { tap: 'onAddBookButtonTap' }, addNoteButton: { tap: 'onAddNoteButtonTap' }, imageSelectButton: { tap: 'onImageSelectButtonTap' }, bookList: { select: 'onBookSelect' }, noteList: ...

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