1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    47
    Answers
    3
    Vote Rating
    0
    romulus2012 is on a distinguished road

      0  

    Default Answered: How to update a store?

    Answered: How to update a store?


    HI,

    I want update a store using my form but i don't know what function do i have to use.

    Code:
    var offlineStore = Ext.getStore('ProspectsOffline');
    var r = offlineStore.findRecord('id',this.getFiche().getValues().id); 
    ????
    offlineStore.sync();
    Using my code i'm able to find the record that i want to updated in my store.
    Please need help.

  2. Hi,
    do you mean that you want to update the record you've found?
    If so, you just need to call

    Code:
    r.set('<YOUR_FIELD_NAME>','<YOUR_VALUE>');
    If this is not what you are trying to achieve, could you please provide more informations?

    Hope this helps.

  3. #2
    Sencha - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Posts
    1,394
    Answers
    148
    Vote Rating
    22
    AndreaCammarata has a spectacular aura about AndreaCammarata has a spectacular aura about

      0  

    Default


    Hi,
    do you mean that you want to update the record you've found?
    If so, you just need to call

    Code:
    r.set('<YOUR_FIELD_NAME>','<YOUR_VALUE>');
    If this is not what you are trying to achieve, could you please provide more informations?

    Hope this helps.
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    CEO at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    http://www.tux-components.com/


  4. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    47
    Answers
    3
    Vote Rating
    0
    romulus2012 is on a distinguished road

      0  

    Default


    Quote Originally Posted by AndreaCammarata View Post
    Hi,
    do you mean that you want to update the record you've found?
    If so, you just need to call

    Code:
    r.set('<YOUR_FIELD_NAME>','<YOUR_VALUE'>);
    If this is not what you are trying to achieve, could you please provide more informations?

    Hope this helps.
    Yes, that's exactly what i'm trying to do. THanks.

    Do i have to use store.sync() after r.set() ???

  5. #4
    Sencha - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Posts
    1,394
    Answers
    148
    Vote Rating
    22
    AndreaCammarata has a spectacular aura about AndreaCammarata has a spectacular aura about

      0  

    Default


    If the proxy has been set on your store yes, otherwise, if is set on your model you can call the model "save()" function.
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    CEO at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    http://www.tux-components.com/


  6. #5
    Sencha User
    Join Date
    Mar 2012
    Posts
    47
    Answers
    3
    Vote Rating
    0
    romulus2012 is on a distinguished road

      0  

    Default


    Quote Originally Posted by AndreaCammarata View Post
    If the proxy has been set on your store yes, otherwise, if is set on your model you can call the model "save()" function.
    Thank you vey much for your help i used sync and it works now.

  7. #6
    Sencha - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Posts
    1,394
    Answers
    148
    Vote Rating
    22
    AndreaCammarata has a spectacular aura about AndreaCammarata has a spectacular aura about

      0  

    Default


    Quote Originally Posted by romulus2012 View Post
    Thank you vey much for your help i used sync and it works now.
    Glad it helped you
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    CEO at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    http://www.tux-components.com/


Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi