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.

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    6
    Vote Rating
    1
    jroets is on a distinguished road

      1  

    Default Model not mapped correctly to wire when saving to remote resource

    Model not mapped correctly to wire when saving to remote resource


    Using Sencha Touch's data classes, I have set up a Model and a Store. I have retrieved a collection into the store from a REST service. Next thing I want to do is sync changes back to the service, but the Sencha Touch Writer class and Field class don't seem to support this very well. For example, given the following model:

    Code:
    Ext.regModel('News', {
        fields: [
            {name: 'id', type: 'int'},
            {name: 'newsId',  mapping: 'iid', type: 'string'},
            {name: 'source', mapping: 'source', type:'string'},
            {name: 'title', mapping: 'stitle', type: 'string'},
            {name: 'dateModified', mapping: 'tmodified', type: 'date', convert: toDateFromJSON}
        ]
    });
    When I sync the store to the service, I get something like this on the wire (using json writer):

    Code:
    {"d.results": [
      {
        "id":0,
        "newsId":"40224",
        "source":"TWITTER",
        "title":"People will do as they are told by someone who outranks them, but...",
        "dateModified": "2010-09-28T12:28:38.323Z"
      }]
    }
    The service doesn't know anything about "newsId", "source", etc.; so it will fail to accept the request. Notice when I defined my model I mapped the service field names to model field names (e.g. "iid" gets mapped to "newsId").

    So I went looking for a way to tell the writer to use the mapped names. Nothing. And I went looking for a way to indicate which fields on my model should be excluded from being persisted. Nothing.

    BUT... Interestingly, ExtJS 4's data package does support these concepts. So I know I'm not crazy and someone at Sencha knows these are important. I.e. See ExtJS Writer nameProperty. And see ExtJS Field persist property.

    These seem like pretty hefty pieces of missing functionality from Sencha Touch. I.e. Try to go beyond anything very simple with respect to syncing a store and you're screwed. What are my options?

  2. #2
    Sencha User
    Join Date
    Jun 2011
    Location
    Paris
    Posts
    29
    Vote Rating
    4
    ronan quillevere is on a distinguished road

      0  

    Default


    Did you find any solution to your problem ? I am facing the same issue.

  3. #3
    Sencha User
    Join Date
    Sep 2011
    Posts
    6
    Vote Rating
    1
    jroets is on a distinguished road

      0  

    Default


    Nope. At some point I was going to look at Sencha 2's data layer and see if the support is better.

  4. #4
    Sencha User
    Join Date
    Jun 2011
    Location
    Paris
    Posts
    29
    Vote Rating
    4
    ronan quillevere is on a distinguished road

      0  

    Default


    Code:
    nameProperty
    is working in ST 2.0.1 do not know if it will in futur versions. Anyway it is not powerfull enough for me but for your usecase it should be sufficient.

    I will be overriding the
    Code:
    getRecordData
    in a new writer.

Thread Participants: 1