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
    May 2012
    Posts
    2
    Vote Rating
    1
    Escher73 is on a distinguished road

      1  

    Default Cars example: how to write back to the cars.json

    Cars example: how to write back to the cars.json


    Hi guys, pretty new here, and trialling Sencha Architect at the moment. Having lots of fun but would appreciate some pointing in the right direction.
    You're probably all familiar with the Cars example that's provided by Sencha. When opening the resulting app, the cars.json data file is read automatically from disk. I got the app to allow me to edit the various rows of data, and now I would like to update the original cars.json data file (or write a copy) on disk.
    How would I go about that?

    I've read the forums, looked at examples, but all I can find is JsonWriters that talk to some webservice. I was thinking that whatever the JsonReader does at the start of the app (or on a load), can the JsonWriter do something similar?

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,064
    Vote Rating
    113
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Yes, if you add a JsonWriter to your store it will write back any changes to the store when you sync them.

    If you want it to be auto synchronized set the autoSync configuration on the store. The above example is using the sibling configuration autoLoad.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Sencha User
    Join Date
    May 2012
    Posts
    2
    Vote Rating
    1
    Escher73 is on a distinguished road

      0  

    Default


    Thanks for your reply.
    You confirm that the jsonwriter will update the 'store' when being synced. But the 'store' is not the same as the json file on disk - is that correct?
    As far as I can see the store in memory gets updated, but the car.json on disk never changes.

    Is it correct to assume that to actually update the car.json on disk, there does need to be a webservice on the web server to take care of writing the store to disk?
    Or have I just not configured the jsonwriter / store correctly?

  4. #4
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,064
    Vote Rating
    113
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Quote Originally Posted by Escher73 View Post
    Is it correct to assume that to actually update the car.json on disk, there does need to be a webservice on the web server to take care of writing the store to disk?
    Yes, the server-side must write the changes to disk.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  5. #5
    Sencha Premium Member
    Join Date
    Jun 2012
    Posts
    9
    Vote Rating
    0
    bmsencha is on a distinguished road

      0  

    Default


    I've been searching all over on how to update a Json file tied to a store, but it sounds like it must be done outside of Sencha Architect. For those of us that are new to this, do you have any links or examples on how this would be done in the web server? For example, how is the store data sent to the web server.

    Thanks.

  6. #6
    Sencha User
    Join Date
    Oct 2011
    Location
    Germany
    Posts
    10
    Vote Rating
    0
    espi is on a distinguished road

      0  

    Default


    Hi,
    did You ever get a solution to this problem?
    I have the same problem.

    Thanks a lot,
    Frederic

  7. #7
    Sencha Premium Member
    Join Date
    Jun 2012
    Posts
    9
    Vote Rating
    0
    bmsencha is on a distinguished road

      0  

    Default


    No, I never got a response. I couldn't find any information that said this was possible or any good examples of how to do it if it was.

  8. #8
    Sencha User
    Join Date
    Oct 2011
    Location
    Germany
    Posts
    10
    Vote Rating
    0
    espi is on a distinguished road

      0  

    Default


    Thanks for Your answer, so I was not that stupid.

    You gave it up?
    There has to be something easy to store things in a file or database...
    I will continue to search for a solution.

    Frederic

  9. #9
    Sencha User
    Join Date
    Jan 2013
    Posts
    2
    Vote Rating
    0
    magg is on a distinguished road

      0  

    Default


    Hi Guys,
    i came up with exactly the same problem here. Sencha is a great framework, for sure but i really can't understand the poor documentation when you going a little bit into deep. For example writing a store with proxy json and ajax. It should be easy than the other way(reading) but it is not. Two possibilities, i am to stupid or it is not that easy than poor docs make believe. When i find a solution, i will post it here.

  10. #10
    Sencha User
    Join Date
    Jan 2013
    Posts
    2
    Vote Rating
    0
    magg is on a distinguished road

      0  

    Default


    Dame, this was quick : http://stackoverflow.com/questions/2...data-on-a-disk
    This is the reason but really not the solution.