View Full Version : [CLOSED] Store migration from 1.0 to 2.0

Oct 09, 2012, 8:45 AM

I have tried to migrate a store from 1.0 to 2.0. I am not sure about the Parameters, there is no more <BaseParams> in 2.0. I have tried a few things but the parameters wont be passed, only params that are passed are the paging params.

This is my old 1.0 code:

<ext:Store ID="ResultsStore" runat="server" AutoLoad="false">
<ext:PageProxy />
<ext:RecordField Name="Id" Type="Int" />
<ext:RecordField Name="SortDate" Type="Date" />
<ext:RecordField Name="CustomerTourNumber" Type="String" />
<ext:RecordField Name="VehicleName" Type="String" />
<ext:RecordField Name="Tourtype" Type="String" />
<ext:RecordField Name="Extension" Type="String" />
<ext:RecordField Name="ReportName" Type="String" />
<ext:Parameter Name="ReportName" Value="#{ReportName}.getValue()" Mode="Raw" />
<ext:Parameter Name="ReportExtension" Value="#{ReportExtensions}.getValue()" Mode="Raw" />
<ext:Parameter Name="FromDate" Value="#{DateFieldFrom}.getValue()" Mode="Raw" />
<ext:Parameter Name="ToDate" Value="#{DateFieldTo}.getValue()" Mode="Raw" />
<DirectEventConfig IsUpload="true" />

The search:

<ext:Button ID="ButtonSearch" runat="server" Icon="Magnifier" Text="Search">
<Click Handler="#{ResultsStore}.load();" />

Oct 09, 2012, 11:17 AM
Hi @blueworld,

Please use the Parameters collection instead of BaseParams, and use StoreParameter instead of Parameter.

Oct 09, 2012, 11:26 AM
Hi Daniil,

thank you. Now I have found it in the docs as well, I did not find it before because there is a typo:

31. Store .BasePrams has been renamed to .Parameters
Parameter has been renamed to StoreParameter

Its BasePrams instead of BaseParams.

Nevertheless, I am still struggling with another 1.0 store implementation, its a combox:


<ext:Store ID="ReportNameStore" runat="server" AutoLoad="true">
<ext:PageProxy />
<ext:Model runat="server">
<ext:ModelField Name="Name" />


<ext:ComboBox ID="ReportName" runat="server" Editable="true" TypeAhead="true" QueryMode="Local"
StoreID="ReportNameStore" TriggerAction="All" SelectOnFocus="true" DisplayField="Name"
AllowBlank="true" ValueField="Name" EmptyText="Bericht" AnchorHorizontal="100%"
<ext:FieldTrigger Icon="Clear" HideTrigger="true" />
<Select Handler="this.getTrigger[0].show();" />
<BeforeQuery Handler="this.getTrigger[0][ this.getRawValue().toString().length == 0 ? 'hide' : 'show']();" />
<TriggerClick Handler="if (index == 0) { this.clearValue(); this.getTrigger[0].hide(); }" />

Serverside signature:

Protected Sub ReportNameStore_RefreshData(ByVal sender As Object, ByVal e As Ext.Net.StoreReadDataEventArgs) Handles ReportNameStore.ReadData

* Query * ....
Dim store As Store = sender
store.DataSource = queryResult
End Sub

Well, this combobox does not get filled, and if I try to open the combobox the browser debugger tells me
Uncaught TypeError: Cannot call method 'hide' of undefined

Oct 09, 2012, 11:32 AM
thank you. Now I have found it in the docs as well, I did not find it before because there is a typo:

Its BasePrams instead of BaseParams.

Oh, I was unable to find because of this reason as well:) But I believed it should be there. Thank you for pointing it out!

Please start a new forum thread for another issue.

Oct 09, 2012, 11:34 AM
Ok thank you, then close this thread please.