Created
April 7, 2015 14:17
-
-
Save trozdol/7de1184e2cd6ac7b3a39 to your computer and use it in GitHub Desktop.
Sencha Touch Controller Refs Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Sencha Touch Controller Refs Example | |
| * Author: Shayne Trosdahl - @Trozdol | |
| * Description: Here's some ref examples. It's not all or the only ways to this. | |
| */ | |
| Ext.define(AppName.controller.ControllerName, { | |
| extend: 'Ext.app.Controller', | |
| config: { | |
| refs: { | |
| /* | |
| * REF BY ITEMID | |
| * | |
| * { | |
| * xtype: 'panel', | |
| * itemId: 'some-itemid', | |
| * } | |
| */ | |
| someComponent: 'panel[itemId=some-itemid]', | |
| /* | |
| * REF BY CLASS | |
| * | |
| * { | |
| * xtype: 'panel', | |
| * cls: 'x-panel some-class-name another-class', | |
| * } | |
| */ | |
| someComponent: 'panel[cls~=some-class-name]', | |
| /* | |
| * REF BY XTYPE | |
| * | |
| * { | |
| * xtype: 'mypanel', | |
| * } | |
| */ | |
| myPanel: 'mypanel' | |
| }, | |
| }, | |
| init: function() { } | |
| launch: function() { } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment