Jul 23, 2013, 2:13 PM
[CLOSED] Store problem with jsonp proxy when insert, update,delete
Hello, in the code example i have a store with setup for server calls with proxy jsonp.
The problem is that when the sync command executes the server calls executed ok but the header params are not in array but it is different param every field.
I made the same example with extjs and when jsonwriter has the encode=true the fields come in server inside array.
Some help please ?
UserActive false
UserDateCreated 2008-01-01T00:00:00
UserDeleted false
UserDomain SLG
UserEMail test
UserFirstName test
UserFirstNameGR
UserLastName test
UserLastNameGR ΑΒΓΔΕΖΗΘ
UserLoginName test
UserPersonName test test
_dc 1374587993320
action destroy
callback Ext.data.JsonP.callback2
records UserId=57CE6801E1DF08408026640E71405CDA
and the correct with extjs for destroy is:
_dc 1374588593034
callback Ext.data.JsonP.callback2
data {"UserId":"57CE6801E1DF08408026640E71405CDA"}
The problem is that when the sync command executes the server calls executed ok but the header params are not in array but it is different param every field.
I made the same example with extjs and when jsonwriter has the encode=true the fields come in server inside array.
Some help please ?
<ext:Store ID="store_users" runat="server" AutoSync="false" RemoteSort="true" RemoteFilter="true" PageSize="20" >
<Model>
<ext:Model ID="model_users" runat="server" IDProperty="UserId">
<Fields>
<ext:ModelField Name="UserId" Type="String" />
<ext:ModelField Name="UserLoginName" Type="String" />
<ext:ModelField Name="UserLastName" Type="String" />
<ext:ModelField Name="UserFirstName" Type="String" />
<ext:ModelField Name="UserPersonName" Type="String" />
<ext:ModelField Name="UserEMail" Type="String" />
<ext:ModelField Name="UserActive" Type="Boolean" />
<ext:ModelField Name="UserDeleted" Type="Boolean" />
<ext:ModelField Name="UserDomain" Type="String" />
<ext:ModelField Name="UserLastNameGR" Type="String" />
<ext:ModelField Name="UserFirstNameGR" Type="String" />
<ext:ModelField Name="UserDateCreated" Type="Date" />
</Fields>
<Proxy>
<ext:JsonPProxy >
<API Read="users.ashx" Create="users.ashx" Update="users.ashx" Destroy="users.ashx"></API>
<Reader>
<ext:JsonReader Root="data" SuccessProperty="success" MessageProperty="message" TotalProperty="total" />
</Reader>
<Writer>
<ext:JsonWriter Encode="true" WriteAllFields="false" Root="data" />
</Writer>
</ext:JsonPProxy>
</Proxy>
</ext:Model>
</Model>
</ext:Store>
this is the firebug params for the destroy callUserActive false
UserDateCreated 2008-01-01T00:00:00
UserDeleted false
UserDomain SLG
UserEMail test
UserFirstName test
UserFirstNameGR
UserLastName test
UserLastNameGR ΑΒΓΔΕΖΗΘ
UserLoginName test
UserPersonName test test
_dc 1374587993320
action destroy
callback Ext.data.JsonP.callback2
records UserId=57CE6801E1DF08408026640E71405CDA
and the correct with extjs for destroy is:
_dc 1374588593034
callback Ext.data.JsonP.callback2
data {"UserId":"57CE6801E1DF08408026640E71405CDA"}
Last edited by Daniil; Jul 25, 2013 at 7:32 AM.
Reason: [CLOSED]