Guest User

Untitled

a guest
Jul 22nd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. var content_type_store = new Ext.data.Store({
  2. proxy: new Ext.data.HttpProxy({
  3. url: BASE_URL+'questions/content_pie',
  4. method:'POST',
  5. params :{hi:''}
  6.  
  7. }),
  8. reader: new Ext.data.JsonReader({
  9. root: 'results'
  10. }, [
  11. 'qtype',
  12. 'qval'
  13. ])
  14. });
  15.  
  16. var content_type_store = new Ext.data.Store({
  17. proxy: {
  18. type: 'ajax',
  19. url: BASE_URL+'questions/content_pie',
  20. extraParams :{hi:''},
  21. // Here Magic comes
  22. getMethod: function(request){ return 'POST'; }
  23.  
  24. },
  25. reader: {
  26. type: 'json',
  27. root: 'results'
  28. }
  29. });
  30.  
  31. // ...
  32. proxy: {
  33. type: 'ajax',
  34. url: BASE_URL+'questions/content_pie',
  35. extraParams :{hi:''},
  36. // Here Magic comes
  37. actionMethods: {
  38. create : 'POST',
  39. read : 'POST',
  40. update : 'POST',
  41. destroy: 'POST'
  42. }
  43. },
  44. // ...
  45.  
  46. Ext.define('content_type_model',{
  47. extend : 'Ext.data.Model',
  48. proxy : {
  49. type : 'ajax',
  50. url : BASE_URL+'questions/content_pie'
  51. reader : {
  52. type : 'json',
  53. root : 'results'
  54. }
  55. },
  56. fields : [{
  57. name:'qtype', mapping:'qval'}]
  58. });
  59.  
  60. var content_type_store = Ext.create('Ext.data.Store',{
  61. model : 'content_type_model'
  62. });
  63.  
  64. grid.store.load({
  65. params : {
  66. hi :''
  67. }
  68. });
Add Comment
Please, Sign In to add comment