Mar 09, 2011, 12:24 PM
Get baseParams from Store in Javascript
Dear,
I'm migrating from Coolite 0.8 to Ext.Net 1.0. During this I encounter some problems. In 0.8 I used to be able to get the baseParams of my store in javascript via store.baseParams['query'] or store.lastOptions['query']. In 1.0 both collections are empty. Anyone knows a way of how to do this in 1.0?
Also when I change the query parameter in javascript via store.setBaseParam['query'] = 'newvalue' then the query parameter doesn't get updated in the webservice call unless i add Ext.apply(options.params, this.baseParams, options.params); at the BeforeLoad Listener as shown below and as told at following thread : http://forums.ext.net/showthread.php...oad+baseparams
Below you see my store
I'm migrating from Coolite 0.8 to Ext.Net 1.0. During this I encounter some problems. In 0.8 I used to be able to get the baseParams of my store in javascript via store.baseParams['query'] or store.lastOptions['query']. In 1.0 both collections are empty. Anyone knows a way of how to do this in 1.0?
Also when I change the query parameter in javascript via store.setBaseParam['query'] = 'newvalue' then the query parameter doesn't get updated in the webservice call unless i add Ext.apply(options.params, this.baseParams, options.params); at the BeforeLoad Listener as shown below and as told at following thread : http://forums.ext.net/showthread.php...oad+baseparams
Below you see my store
<ext:Store ID="stoResults" runat="server" RemotePaging="True" RemoteSort="True" AutoLoad="true">
<Proxy>
<ext:HttpProxy Json="true" Method="POST" Url="someUrl" />
</Proxy>
<Reader>
<ext:JsonReader IDProperty="Id" Root="d.Results" TotalProperty="d.TotalResults">
<Fields>
<ext:RecordField Name="Id" />
</Fields>
</ext:JsonReader>
</Reader>
<BaseParams>
<ext:Parameter Name="start" Mode="Raw" Value="0"></ext:Parameter>
<ext:Parameter Name="limit" Mode="Raw" Value="0"></ext:Parameter>
<ext:Parameter Name="query" Mode="Raw" Value="'testvalue'"></ext:Parameter>
</BaseParams>
<Listeners>
<BeforeLoad Handler="Ext.apply(options.params, this.baseParams, options.params);" />
</Listeners>
</ext:Store>