Results 1 to 8 of 8

Thread: JsonPProxy exception event not working on 404

  1. #1
    Touch Premium Member hotdp's Avatar
    Join Date
    Nov 2010
    Location
    Denmark
    Posts
    604
    Vote Rating
    14
      0  

    Default JsonPProxy exception event not working on 404

    Hi,
    I have added af JsonPProxy exception event. But if I get a 404 error from the server, the event is not triggered?

  2. #2
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,487
    Vote Rating
    145
      0  

    Default

    Touch or Ext JS? There is a bug in Touch atm that won't generate the relevant listeners code.
    Aaron Conran
    @aconran

  3. #3
    Touch Premium Member hotdp's Avatar
    Join Date
    Nov 2010
    Location
    Denmark
    Posts
    604
    Vote Rating
    14
      0  

    Default

    Sorry, it is for Senca Touch?

  4. #4
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,487
    Vote Rating
    145
      0  

    Default

    Yea, if you look at the source code generated you'll see that it does create the function to run but it never creates an event listener.
    Aaron Conran
    @aconran

  5. #5
    Touch Premium Member hotdp's Avatar
    Join Date
    Nov 2010
    Location
    Denmark
    Posts
    604
    Vote Rating
    14
      0  

    Default

    Quote Originally Posted by aconran View Post
    Yea, if you look at the source code generated you'll see that it does create the function to run but it never creates an event listener.
    Yes I know, thought there might be something magical going on :-) But great you are all ready on it.

  6. #6
    Sencha User
    Join Date
    Jun 2012
    Posts
    15
    Vote Rating
    0
      0  

    Default bump

    any news on this?

  7. #7
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,487
    Vote Rating
    145
      0  

    Default

    This has been fixed for some time. The current production build (442) generates the following code as desired.

    Code:
    Ext.define('MyApp.store.MyJsonPStore', {
        extend: 'Ext.data.Store',
    
        config: {
            storeId: 'MyJsonPStore',
            proxy: {
                type: 'jsonp',
                reader: {
                    type: 'json'
                }
            }
        },
    
        constructor: function() {
            var me = this;
            me.callParent(arguments);
            me.getProxy().on([{
                fn: 'onJsonpproxyException',
                event: 'exception',
                scope: me
            }]);
        },
    
        onJsonpproxyException: function(server, response, operation, options) {
    
        }
    
    });
    Aaron Conran
    @aconran

  8. #8
    Sencha User
    Join Date
    Jun 2012
    Posts
    15
    Vote Rating
    0
      0  

    Default thanks

    i will try this.

Posting Permissions

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