1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    3
    Vote Rating
    0
    managedfollowup is on a distinguished road

      0  

    Default Answered: Store or Model Proxy?

    Answered: Store or Model Proxy?


    Hi,

    Imagine a login page, user sends up a email and password, and registration details get sent back, so:

    I am using a model proxy to a RESTful service at the moment. I can send data up and get the new data, but different json back. It's in the "raw" property but no luck using "set" with this data on the model, like:
    model.save({
    scope: this,
    success: function (data, operation) {
    var model2 = this.getRegisterModelModel().create();
    model2.set(data.raw);
    },
    failure: function (records, operation) {
    Ext.Msg.alert('Failure', 'Failed to login.');
    }
    });

    Or should I use a store to do it, if so using the syc method or?
    Is there a way to call a url just like you can in JQuery? guess this is a custome Proxy?
    Please advice with a little code to help me along please, I am finding the Model and Store proxy confusing! cheers. Paul.

  2. Have a look at Ext.Ajax.

  3. #2
    Ext JS Premium Member twaindev's Avatar
    Join Date
    Sep 2009
    Posts
    223
    Answers
    15
    Vote Rating
    3
    twaindev is on a distinguished road

      0  

    Default Ext.Ajax

    Ext.Ajax


    Have a look at Ext.Ajax.

  4. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    3
    Vote Rating
    0
    managedfollowup is on a distinguished road

      0  

    Default


    Cheers @twaindev. For others, this is what you do to call a RESTful service passing Json up and DIFFERENT Json back

    Ext.Ajax.request({
    url: 'UserService/Login',
    method: "POST",
    jsonData: Ext.JSON.encode(model),
    scope: this,
    success: function (response) {
    var responseData = Ext.JSON.decode(response.responseText);
    }
    });

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar