Results 1 to 2 of 2

Thread: How to load single model without having id appended to the url?

  1. #1
    Sencha Premium User
    Join Date
    Feb 2011
    Location
    Cambridge, MA
    Posts
    1,295
    Answers
    16

    Default How to load single model without having id appended to the url?

    When you using following Fiddle:



    We can see in the network tab this url: https://fiddle.sencha.com/local/8ee64ca75457a25144bcb809fdb948520c729251/address.json?_dc=1481575019314&id=Fiddle.model.Address-1

    I don't want to see the part "
    id=Fiddle.model.Address-1", I tried to use "appendId : false" but didn't work.

  2. #2
    Sencha User
    Join Date
    Jan 2016
    Posts
    462
    Answers
    60

    Default

    Code:
    Ext.define('MyPatches.data.proxy.Rest', {
        override: 'Ext.data.proxy.Ajax',
        buildUrl: function (request) {
            delete request.getParams().id;
            return this.callParent([request]);
        }
    });
    Only the REST proxy has the appendId config.

Similar Threads

  1. Load single database entry into a model.
    By incutonez in forum Ext: Q&A
    Replies: 2
    Last Post: 3 Jan 2014, 5:01 PM
  2. Replies: 2
    Last Post: 10 Oct 2012, 9:41 AM
  3. Convert function in model called multiple times for a single record load.
    By bweiler in forum Sencha Touch 2.x: Discussion
    Replies: 1
    Last Post: 17 May 2012, 7:40 PM
  4. Replies: 4
    Last Post: 4 Apr 2012, 8:05 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •