store sync with rest proxy batch operation

  1. #1

    store sync with rest proxy batch operation

    Code bellow represent store configured to use rest proxy.Everything works just fine when store has one dirty record.When store has multiple records to be updated it does not send them as batch. I have tried many options of JsonWriter properties but with no luck.Is RestProxy designed only for one Record???
     <ext:Store runat="server" AutoSync ="false"  ID ="storeCrud"   >
                                    <ext:RestProxy Url="~/api/crud/getData" >
                                            <ext:JsonReader Root="data" TotalProperty="total"></ext:JsonReader>
                                            <ext:JsonWriter   WriteAllFields ="true"/>
                                            <ext:Parameter Name="Accept" Value="application/json"></ext:Parameter>
                                        <API Update="~/api/crud/saveData"></API>
                                        <API Create ="~/api/crud/createData"></API>
                                    <ext:Model runat="server">
                                            <ext:ModelField Name="companyId" Type="Int" />
                                            <ext:ModelField Name="company" />
                                            <ext:ModelField Name="price" Type="Float" />
                                            <ext:ModelField Name="change" Type="Float" />
                                            <ext:ModelField Name="pctChange" Type="Float" />
                                            <ext:ModelField Name="lastChange" Type="Date" DateFormat="M/d hh:mmtt" />
                                   <BeforeSync Handler ="console.log('before sync')" ></BeforeSync>
                                   <Write Handler ="console.log('complete')"></Write>
  2. #2

    Rest Proxy BatchAction Property

    There is a property to be set on RestProxy
    <ext:RestProxy Url="~/api/crud/getData" BatchActions ="true"  >

Similar Threads

  1. Replies: 3
    Last Post: May 06, 2013, 12:52 PM
  2. Store batch order
    By Pulkownik in forum 2.x Help
    Replies: 2
    Last Post: Mar 04, 2013, 11:59 AM
  3. [CLOSED] REST store sync callback
    By thesvr in forum 2.x Legacy Premium Help
    Replies: 7
    Last Post: Nov 08, 2012, 1:57 PM
  4. [CLOSED] Rest proxy load and autoload
    By Akpenob in forum 2.x Legacy Premium Help
    Replies: 6
    Last Post: Nov 06, 2012, 9:08 AM
  5. [CLOSED] [1.0] Store and REST
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Feb 28, 2010, 5:19 AM

Posting Permissions