Advertisement
Guest User

Untitled

a guest
Apr 21st, 2014
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.37 KB | None | 0 0
  1. var wardName = Ext.create('Ext.data.Store', {
  2. id : 'visittype',
  3.  
  4. fields : [
  5. {
  6. name : 'id',
  7. type : 'integer',
  8. },
  9. {
  10. name : 'wardName',
  11.  
  12. }
  13. ],
  14.  
  15. remoteGroup : true,
  16. remoteSort : true,
  17. proxy : {
  18. type : 'rest',
  19. url : 'pmsRest/wards',
  20.  
  21.  
  22. reader : {
  23.  
  24. root : "wardMaster",
  25. idProperty : 'id'
  26. }
  27.  
  28. },
  29. autoLoad : true,
  30.  
  31. });
  32.  
  33.  
  34. {
  35. xtype : 'combo',
  36. name : 'wardName',
  37. labelStyle : 'color:black;font-weight:bold;width:250px;padding:10;',
  38. labelSeparator : "",
  39.  
  40. id : 'wardName',
  41. width:'33%',
  42. fieldLabel : 'Ward',
  43. triggerAction : 'all',
  44. store : wardName,
  45. displayField : 'wardName',
  46. valueField : 'id',
  47. multiSelect : false,
  48. typeAhead : true,
  49. //disabled: true,
  50. listeners : {
  51. change : function(combo) {
  52. Ext.getCmp('bedName').bindStore(loadBedName());
  53. }
  54.  
  55. },
  56. allowBlank : false,
  57. //enableKeyEvents : true,
  58.  
  59. },
  60.  
  61. listeners: {
  62. load: function(){
  63. this.add({
  64. id: 0,
  65. name: 'All'
  66. });
  67. }
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement