-
12 Dec 2011 12:32 PM #1
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:
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.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() },
Regards,
Harald
-
13 Dec 2011 11:36 AM #2
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?
-
13 Dec 2011 1:24 PM #3
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;
Maybe this approach would work for you as well?Code:var gridDataStore = Ext.getStore('GridDataStore'); var extraParams = gridDataStore.getProxy().extraParams; extraParams.param1 = 'value1' extraParams.param2 = someFunction(); gridDataStore.load();
-
13 Dec 2011 1:27 PM #4
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.
-
13 Dec 2011 3:50 PM #5
The extraParams configuration currently only supports you putting raw objects in there with simple type values. (no variables or functions)
Will work fine, but you cannot invoke methods and/or pass variables.Code:{ a: 'aasf', b: true }Aaron Conran
@aconran
Sencha Architect Development Team
-
15 Dec 2011 11:49 AM #6
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
-
10 Apr 2012 8:25 AM #7
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
-
10 Apr 2012 9:40 AM #8
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/#!/guideAaron Conran
@aconran
Sencha Architect Development Team
-
10 Apr 2012 9:42 AM #9
-
10 Apr 2012 2:38 PM #10
thank you, good hint, is there somewhere a simple example for such an override ?


Reply With Quote