Threaded View

  1. #1
    Ext JS Premium Member
    Join Date
    Jun 2011
    Location
    Ottawa, Ontario, Canada
    Posts
    123
    Vote Rating
    1
    whalethewise is on a distinguished road

      0  

    Default Namespace and Ext.define problem

    Namespace and Ext.define problem


    Hi

    Are there any changes for using Ext.namespace and Ext.define in 4.1? Could Ext.data.Store be extended?

    As it worked for me in 4.0.7, now I have issues with 4.1 finding the class in predefined namespace.
    What could be wrong in my following code in 4.1 prospective?

    Code:
    Ext.namespace('com.myclass.store'); 
    Ext.namespace('com.myclass.model'); 
    
    Ext.define('com.myclass.store.KeyValueListStore', {
       extend: 'Ext.data.Store',
       constructor: function(config) {
          config = config || {};
          config.fields = ['key','value', 'selected'];
          if (config.autoLoad == undefined)
          {
             config.autoLoad = true;
          }
          config.clearOnLoad = true;
          config.proxy = {
             type: 'ajax',
             reader: {
                type: 'json',
                root: 'kvlist'
             },
             listeners: {
                exception: function(proxy, exception, operation) {
                   alert('1');
                }
    
    
             }
          };
          config.sorters = [
             {
                property: 'value',
                direction: 'ASC',
                transform: ignoreCaseSort
             }
          ];
          config.proxy.url = myurl + 'kvlist/' + config.proxyUrl;
          this.callParent([config]);
       },
       setProxyUrl: function(urlName) {
          this.proxy.url = contentlibraryUrl + 'kvlist/' + urlName;
       }
    });
    
    var mystore = Ext.create('com.myclass.store.KeyValueListStore', {
        proxyUrl: 'test'
    });
    Last edited by skirtle; 30 Jan 2012 at 9:59 PM. Reason: Added CODE tags

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar