Results 1 to 4 of 4

Thread: REST Proxy issue

    You found a bug! We've classified it as DSGNR-7302 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium Member
    Join Date
    Sep 2012
    Location
    Singapore
    Posts
    54

    Question REST Proxy issue

    Hi,

    SA version: 4.0.1.190
    channel: 4.0-stable
    platform: 1.2.3.16 - darwin x64
    cmd: 6.2.0.103 framework:
    Ext JS 6.2.x Classic

    I notice the when I did a store sync after an update, the url generated when I use a REST proxy looks like this. And the web service could not recognise the call.
    http://10.34.118.250/ePackMgrSvc/api/ControlFile/MyApp.model.Control_File-102?_dc=1474614246749

    Using AJAX Proxy, a store sync the url generated is correct
    http://10.34.118.250/ePackMgrSvc/api/ControlFile?_dc=1474614595525

    Is this a bug?

  2. #2
    Sencha User
    Join Date
    Jun 2016
    Posts
    12

    Default

    Hello and thanks for report!

    We unfortunately cannot reproduce this problem. Could you provide us additional info? Code of affected model could be useful.

    Best regards
    Jan Turon

  3. #3
    Sencha User
    Join Date
    Feb 2013
    Location
    NZ
    Posts
    150

    Default

    Exact same problem I am facing too. The version of SA and ExtJS is exactly as mentioned by OP. Although I havent tried using AJAX proxy yet, but definitely can confirm that using REST proxy I am facing this problem on store.sync.

    To give some more background:

    I have a grid with a checkbox selection model and a check column "Approved". Checking/Unchecking the column triggers a PUT request to the server with value being True or False. This was working in previous version of SA (this project has been upgraded from SA3.2 and Extjs 4.1).

    However on clicking checkbox, I am now getting this:

    PUT /<service>/<app>/<param1>/event/<eventId>/<Appname>.model.<ModelName>.AllocItem-29?_dc=1476659512548 HTTP/1.1

    Below is code for store:
    Code:
    Ext.define('MyApp.store.MyAppStore.AllocItem', {    extend: 'Ext.data.Store',
    
    
        requires: [
            'MyApp.model.BuyingPromo.AllocItem',
            'Ext.data.proxy.Rest',
            'Ext.data.reader.Json',
            'Ext.data.writer.Json'
        ],
    
    
        constructor: function(cfg) {
            var me = this;
            cfg = cfg || {};
            me.callParent([Ext.apply({
                storeId: 'MyApp.AllocItem',
                autoLoad: false,
                model: 'MyApp.model.MyAppStore.AllocItem',
                proxy: {
                    type: 'rest',
                    timeout: 620000,
                    headers: {
                        Accept: 'application/json',
                        'Content-Type': 'application/json; charset=utf-8'
                    },
                    reader: {
                        type: 'json'
                    },
                    writer: {
                        type: 'json'
                    }
                }
            }, cfg)]);
        }
    
    });


    Below is code for model. I have removed most fields and kept only 2.
    Code:
    Ext.define('AdvanceWebHO.model.BuyingPromo.AllocItem', {
        extend: 'Ext.data.Model',
    
    
        requires: [
            'Ext.data.field.String',
            'Ext.data.field.Number',
            'Ext.data.field.Boolean'
        ],
    fields: [
            {
                type: 'string',
                name: 'allocId'
            },
           {            type: 'boolean',
                name: 'isApproved'
            },
    ]
    });

  4. #4
    Sencha User
    Join Date
    Jun 2016
    Posts
    12

    Default

    Thanks for the extension of report! I have opened a bug in our bug tracker.

Similar Threads

  1. Replies: 3
    Last Post: 8 Jun 2016, 6:05 AM
  2. Why is it called REST proxy if it isn't really REST?
    By littlefyr in forum Ext: Discussion
    Replies: 5
    Last Post: 3 Jan 2016, 10:52 PM
  3. Replies: 2
    Last Post: 5 Sep 2012, 7:29 AM
  4. REST API Proxy
    By jochen.schoellig in forum Sencha Touch 2.x: Q&A
    Replies: 2
    Last Post: 30 Dec 2011, 10:02 AM

Posting Permissions

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