1. #1
    Ext JS Premium Member
    Join Date
    May 2011
    Posts
    55
    Vote Rating
    1
    h.koch is on a distinguished road

      0  

    Question extraParams for JSON store

    extraParams for JSON store


    Hi,

    I'm happily using Ext Designer 1.2.2 build 48 for building up my GUI. At the moment I'm stuck with the neccessarity of using extraParams in a store definition: I need to pass the values of some other components which I need for the dynamic store logic. In a manually built app, I added the following definition to the store:
    Code:
                    extraParams: { 
                    'sessionId': Ext.state.Manager.get('sessionId'),
                    'searchName': Ext.ComponentManager.get('searchFullname').getValue(),
                    'searchDepartment': Ext.ComponentManager.get('searchDepartment').getValue(),
                    'searchLocation': Ext.ComponentManager.get('searchLocation').getValue(),
                    'searchCompany': Ext.ComponentManager.get('searchCompany').getValue()
                    },
    Since Ext Designer supports the extraParams definition as an "[object]" definition and I cannot check out how the formatting of this is: how to paste the above code snippet into the "extraParams" field for my store without messing the syntax? It seems that every singletick will be escaped by a backslash. Any hints are welcome.

    Regards,
    Harald

  2. #2
    Sencha User
    Join Date
    Oct 2011
    Posts
    45
    Vote Rating
    1
    thantous is on a distinguished road

      0  

    Default Same issue

    Same issue


    The extraParams field appears to be a bit flaky. For example, entering in the following works correctly;

    {a: 'b'}

    However, entering this does not

    {
    a: 'b',
    b: someVar
    }

    I am unsure as to why, anybody have any thoughts?

  3. #3
    Sencha User
    Join Date
    Oct 2011
    Posts
    45
    Vote Rating
    1
    thantous is on a distinguished road

      0  

    Default


    I found a potential work around.

    Steps:
    1. Set your store to autoLoad: false;
    2. In your application js, the following code sets extra params by hand;

    Code:
    var gridDataStore = Ext.getStore('GridDataStore');
    var extraParams = gridDataStore.getProxy().extraParams;
    extraParams.param1 = 'value1'
    extraParams.param2 = someFunction();
    gridDataStore.load();
    Maybe this approach would work for you as well?

  4. #4
    Ext JS Premium Member
    Join Date
    May 2011
    Posts
    55
    Vote Rating
    1
    h.koch is on a distinguished road

      0  

    Default


    This sounds for an approach I can live with (until the designer will be able to better handle these addition parameters). Thanks for the great input.

  5. #5
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,176
    Vote Rating
    119
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    The extraParams configuration currently only supports you putting raw objects in there with simple type values. (no variables or functions)

    Code:
    {
       a: 'aasf',
       b: true
    }
    Will work fine, but you cannot invoke methods and/or pass variables.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  6. #6
    Sencha User
    Join Date
    Oct 2011
    Posts
    45
    Vote Rating
    1
    thantous is on a distinguished road

      0  

    Default


    Quote Originally Posted by aconran View Post
    The extraParams configuration currently only supports you putting raw objects in there with simple type values. (no variables or functions)

    Code:
    {
       a: 'aasf',
       b: true
    }
    Will work fine, but you cannot invoke methods and/or pass variables.
    Thanks Aaron,

    Any chance of getting this information added to the docs? I'm not seeing it in the overlay help in the Designer or here: http://docs.sencha.com/ext-js/4-0/#!...fg-extraParams

  7. #7
    Sencha User
    Join Date
    Nov 2011
    Posts
    28
    Vote Rating
    0
    michabbb is on a distinguished road

      0  

    Default


    hi,

    is there already a workarround for this ? today i have tested the designer 2 and got the same problem,
    only raw data is accepted ;-(( i would like to use functions wherevery the parameters accept objects or arrays.
    any news about this ?

    thank you,
    micha

  8. #8
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,176
    Vote Rating
    119
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Quote Originally Posted by thantous View Post
    Any chance of getting this information added to the docs? I'm not seeing it in the overlay help in the Designer or here: http://docs.sencha.com/ext-js/4-0/#!...fg-extraParams
    Those are the SDK docs. We are working on the Designer docs which will be available when we GA the product. Information about adding custom properties is already in there.
    http://docs.sencha.com/designer/2-0/#!/guide
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  9. #9
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,176
    Vote Rating
    119
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Quote Originally Posted by michabbb View Post
    is there already a workarround for this ? today i have tested the designer 2 and got the same problem,
    only raw data is accepted ;-(( i would like to use functions wherevery the parameters accept objects or arrays.
    any news about this ?
    You can implement an override for the class you are working with.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  10. #10
    Sencha User
    Join Date
    Nov 2011
    Posts
    28
    Vote Rating
    0
    michabbb is on a distinguished road

      0  

    Default


    thank you, good hint, is there somewhere a simple example for such an override ?

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