Threaded View

  1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    107
    Answers
    4
    Vote Rating
    -1
    sencha.user is an unknown quantity at this point

      0  

    Default Answered: Sending parameter to js

    Answered: Sending parameter to js


    Hi,

    I have a varialble in Controller like,

    Code:
    Ext.define('MyApp.controller.MyController', {
        extend: 'Ext.app.Controller',
        onFieldButtonClick: function(button, e, options) {
        var groupChecked = Ext.getCmp('groupgrid').getSelectionModel().getSelection();
            var arrayValues = [];
            Ext.each(groupChecked, function(rec, index) {
                arrayValues.push(rec.get('colName'));
            });
        var MyGrid = Ext.ComponentQuery.query('MyGrid')[0];
                        MyGrid.getStore().reload({
                            params:{
                                singleton: true,
                                param1: [arrayValues]
                            }
                        });
    ...
    I want to use this arrayValues in another js in another location, I am doing,
    Code:
    groupField: MyApp.controller.MyController.param1
    But I am not getting the value there, how should I do to get the selected value?

  2. Hi,

    It worked like this,
    Code:
    Ext.define('MySharedData', {
        singleton: true,
    
        foo: 'bar',
        meh: 42
    });
    Can then access using MySharedData.foo, for instance.

    Found in,
    http://www.sencha.com/forum/showthre...ble-in-Extjs-4

    Didn't try it correctly initially, now works good, it doesn't do grouping like expected anyway .

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi