1. #1
    Sencha Premium Member
    Join Date
    Feb 2011
    Posts
    75
    Answers
    2
    Vote Rating
    1
    ShaneTex is on a distinguished road

      0  

    Default Answered: batchActions on Rest Proxy with single record

    Answered: batchActions on Rest Proxy with single record


    I have batch actions set on a rest proxy and it works great. The problem I have is that if I update 2 records I get the json that looks like this on Post:

    [{"Lat":"33.19884520","Lng":"-96.61870223","Address":"405 W Hunt St, McKinney, TX 75069, USA","Notes":"","Status":1,"Date":"2012-11-20T15:27:23"},{"Lat":"33.19812698","Lng":"-96.62106257","Address":"201 N College St, McKinney, TX 75069, USA","Notes":"","Status":2,"Date":"2012-11-20T15:27:25"}]

    If I only have one record, I get this:
    {"Lat":33.19755241,"Lng":-96.62536483,"Address":"1002 W Louisiana St, McKinney, TX 75069, USA","Notes":"","Status":1,"Date":"2012-11-20T15:21:50"}

    Is there any way to force it to be a collection with just 1 item. My Rest api is giving me fits, and I can't see an easy way to test if I have 1 update record, or many.

  2. You can set allowSingle to false in the writer. That will always send an array.

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,795
    Answers
    3467
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    You can set allowSingle to false in the writer. That will always send an array.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha Premium Member
    Join Date
    Feb 2011
    Posts
    75
    Answers
    2
    Vote Rating
    1
    ShaneTex is on a distinguished road

      0  

    Default


    gotcha, what comes back as part of the delete, just the id's?

  5. #4
    Sencha Premium Member
    Join Date
    Feb 2011
    Posts
    75
    Answers
    2
    Vote Rating
    1
    ShaneTex is on a distinguished road

      0  

    Default


    Also, for all methods, Post, Put, Delete, what is the bare minimum I need? Do I just need the ID' from the ClientIDProperty and I am good?

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi