Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Dec 2010
    Posts
    81
    Vote Rating
    0
    babar.sajjad is on a distinguished road

      0  

    Question Exception handling in Sencha Touch Stores

    Exception handling in Sencha Touch Stores


    I called to a resource and i get this "Failed to load resource: the server responded with a status of 403 (Forbidden)" and this "Uncaught TypeError: Cannot read property 'length' of undefined", how can i handle exception handling, the scenario in which i am working is that i call a web service and passes username,passwords and if they are authenticated i get the status code 200 otherwise i get 403 code, how should i handle this in my store.load function.

  2. #2
    Ext Premium Member
    Join Date
    Dec 2010
    Posts
    10
    Vote Rating
    0
    stefan_k is on a distinguished road

      0  

    Question


    Hi,

    I'm interested in the same thing. In Ext JS, there is the DataProxy class, to which I can attach event-listeners to centralize my application's error-handling. Is there anything similar in Sencha Touch that I can use?
    Last edited by stefan_k; 21 Mar 2011 at 1:22 AM. Reason: Typo

  3. #3
    Ext Premium Member
    Join Date
    Dec 2010
    Posts
    10
    Vote Rating
    0
    stefan_k is on a distinguished road

      0  

    Question


    Sorry for double-posting
    Last edited by stefan_k; 21 Mar 2011 at 1:22 AM. Reason: Double-Post

  4. #4
    Sencha User
    Join Date
    Jan 2011
    Posts
    26
    Vote Rating
    1
    danmux is on a distinguished road

      1  

    Default


    Per store you can attach an exception event listener to the proxy object....

    Code:
       var remoteStore = new Ext.data.Store({
            model: 'AccountModel',
            proxy: {
                type: 'rest',
                url: myDodgyNotAllowedURL,
                model: 'AccountModel'
            }
        });
    
       remoteStore.proxy.addListener('exception', function (proxy, response, operation) {
          console.log(response.status);
          console.log(response.responseText);
          alert('Doh....');
        });
    (TODO: must check if i need both model: lines)

Similar Threads

  1. Replies: 10
    Last Post: 20 Jan 2012, 10:10 AM
  2. Best way to use stores in sencha touch.
    By babar.sajjad in forum Sencha Touch 1.x: Discussion
    Replies: 13
    Last Post: 24 Jan 2011, 6:40 AM
  3. Sencha Touch on iPhone v1 / iPod touch v1 ?
    By palnap in forum Sencha Touch 1.x: Discussion
    Replies: 4
    Last Post: 28 Oct 2010, 5:30 PM
  4. Error Handling With Data Stores
    By garytaylor in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 9 Jul 2009, 8:32 AM

Thread Participants: 2

Tags for this Thread