Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 31st, 2012  |  syntax: None  |  size: 0.75 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Infinite scrolling grid and MVC
  2. Ext.define('AM.store.Users', {
  3.     extend: 'Ext.data.Store',
  4.     model: 'AM.model.User',
  5.     autoLoad: true,
  6.  
  7.     proxy: {
  8.         type: 'ajax',
  9.         url: 'data/users.json',
  10.         reader: {
  11.             type: 'json',
  12.             root: 'users',
  13.             successProperty: 'success'
  14.         }
  15.     }
  16. });
  17.        
  18. Ext.define('AM.store.Users', {
  19.     extend: 'Ext.data.Store',
  20.     model: 'AM.model.User',
  21.     autoLoad: true,
  22.     remoteSort: true,
  23.     buffered: true,
  24.     pageSize: 100,
  25.     proxy: {
  26.         type: 'ajax',
  27.         url: '/postdata/list',
  28.         limitParam: 'size',
  29.         startParam: undefined,
  30.         reader: {
  31.             type: 'json',
  32.             root: 'data',
  33.             successProperty: 'success'
  34.         }
  35.     }
  36. });