Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    May 2010
    Location
    Sapiranga, Rio Grande do Sul, Brazil
    Posts
    77
    Vote Rating
    1
    sergiomichels is on a distinguished road

      0  

    Default Define Store as an Object instead of picking from list.

    Define Store as an Object instead of picking from list.


    I defined a singleton object with my domains that will be used as values for ComboBox, example:

    Code:
    Ext.define('MyApp.ux.Lang', {  singleton: true,  DOMAINS: {    'YES_NO': [{value: "S", meaning: "Sim"},{value: "N", meaning: "Não"}]  }
    });
    To minimize server calls, my idea is to load all domains in this class in the first load of my application (one single page app). To be as dynamic as possible, I tried this declaring an inline store inside my combo:
    Code:
    // Simple ComboBox using the data store    var simpleCombo = Ext.create('Ext.form.field.ComboBox', {        fieldLabel: 'My Sample Combo',        renderTo: Ext.getBody(),        displayField: 'meaning',        width: 320,        labelWidth: 130,        store: {          data: MyApp.ux.Lang.DOMAINS['YES_NO'],
              fields: ['abrev','meaning','value']        },        queryMode: 'local',        typeAhead: true    });
    It works well in my hand test, but not inside Architect, since I'm unable to declare the store as an Object (just Store or Array). Is there any way to achieve this inside Architect?

  2. #2
    Sencha User
    Join Date
    May 2010
    Location
    Sapiranga, Rio Grande do Sul, Brazil
    Posts
    77
    Vote Rating
    1
    sergiomichels is on a distinguished road

      0  

    Default


    By now I'm able to change the store in the controller:

    Code:
    
    element.clearValue();
    		
    element.bindStore(Ext.create('Ext.data.Store',{
        data: InsoftExtUi.ux.Lang.DOMAINS[domainName],
        fields: ['abrev','value','meaning']
    }));
    
    element.displayField = displayField || 'meaning';
    
    
    element.valueField = valueField || 'value';
    
    element.displayTpl = new Ext.XTemplate(
    		          '<tpl for=".">' +
    		              '{[typeof values === "string" ? values : values["' + element.displayField + '"]]}' +
    		              '<tpl if="xindex < xcount">' + element.delimiter + '</tpl>' +
    		          '</tpl>'
    		      );
    
    element.picker = null;

Tags for this Thread