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
    Oct 2012
    Location
    Poland
    Posts
    70
    Answers
    4
    Vote Rating
    5
    szimek is on a distinguished road

      0  

    Default Answered: How to properly update instance of a model in a store using data from server?

    Answered: How to properly update instance of a model in a store using data from server?


    I've got a model and a store. The main view submits all changes via store and its REST proxy using:

    Code:
    record.set({field: value})
    store.sync();
    However, I've got another view (form.Panel) and it does non-REST request using simply form.submit(). In this case server responds with JSON representation of the record (just like for REST requests). I'd like to update the instance of the record in the store with the received data and trigger all store events that would be called if it was received by the store (e.g. some views listen to "write" event to update its record). How to do it?

    Using record.set(data) marks it as dirty. Using record.setData(data) doesn't mark record as dirty, but then if I use view.setRecord(record), its updateRecord method is not called.

  2. Maybe:
    record.set(data);
    record.commit();

  3. #2
    Sencha User
    Join Date
    Nov 2012
    Location
    Netherlands
    Posts
    50
    Answers
    6
    Vote Rating
    1
    eastlander is on a distinguished road

      0  

    Default


    Maybe:
    record.set(data);
    record.commit();

  4. #3
    Sencha User
    Join Date
    Oct 2012
    Location
    Poland
    Posts
    70
    Answers
    4
    Vote Rating
    5
    szimek is on a distinguished road

      0  

    Default


    Thanks! Somehow I overlooked it when looking through API docs.

Thread Participants: 1

Tags for this Thread