Guest User

Untitled

a guest
Jan 22nd, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. Ext.define("Test.view.Main", {
  2. extend: 'Ext.tab.Panel',
  3. config: {
  4. tabBarPosition: 'bottom',
  5.  
  6. items: [ ]
  7. },
  8.  
  9. constructor : function(){
  10. this.callParent(arguments);
  11. var store = Ext.create('Ext.data.Store',{
  12. data :[
  13. {title : 'One'},
  14. {title : 'Two'},
  15. {title : 'Three'}
  16. ]
  17. }),
  18. firstList = Ext.create('Ext.List',{
  19. title : 'tab1',
  20. store : store,
  21. itemTpl : '{title}',
  22. onItemDisclosure : function(){
  23. store.add({title : 'Four'});
  24. }
  25. }),
  26.  
  27. secondList = Ext.create('Ext.List',{
  28. title : 'tab2' ,
  29. store : store,
  30. itemTpl : '{title}'
  31.  
  32. }),
  33.  
  34. thirdList = Ext.create('Ext.List',{
  35. title : 'tab3',
  36. store : store,
  37. itemTpl : '{title}'
  38.  
  39. });
  40.  
  41. this.add([
  42. firstList,
  43. secondList,
  44. thirdList
  45. ]) ;
  46. }
  47. });
  48.  
  49. storeEventHooks: {
  50. beforeload: 'onBeforeLoad',
  51. load: 'onLoad',
  52. refresh: 'refresh',
  53. addrecords: 'onStoreAdd',
  54. removerecords: 'onStoreRemove',
  55. updaterecord: 'onStoreUpdate'
  56. }
Add Comment
Please, Sign In to add comment