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

      0  

    Default Answered: Store.findRecord by id

    Answered: Store.findRecord by id


    I import some data from the server into my store. The model for that data has an ‘id’ field which contains the id of that element as received from the server. So, for instance, here’s an item with the id 28. The question is, why does it respond when I call an item with the id 2?

    wrongId.png

    The same item shows up when I call it as findRecord('id', 28)

    2 is not the index of this item either.

  2. Ext.data.Store.findRecord(String fieldName, String/RegExp value, [Number startIndex], [Boolean anyMatch], [Boolean caseSensitive], Boolean exactMatch)
    By default, the value is not exact matched in this method. In the frist step, the value is converted into a String, even if it is a Number, and in your exapmle here, 2 becomes '2',so the returned item is accidental, say the first match one is '28'.
    To achieve exact match, use getById instead, or findRecord('id', '2', 0, false, true, true)

  3. #2
    Sencha User
    Join Date
    Jun 2008
    Posts
    10
    Answers
    1
    Vote Rating
    0
    fbchen is on a distinguished road

      0  

    Default


    Ext.data.Store.findRecord(String fieldName, String/RegExp value, [Number startIndex], [Boolean anyMatch], [Boolean caseSensitive], Boolean exactMatch)
    By default, the value is not exact matched in this method. In the frist step, the value is converted into a String, even if it is a Number, and in your exapmle here, 2 becomes '2',so the returned item is accidental, say the first match one is '28'.
    To achieve exact match, use getById instead, or findRecord('id', '2', 0, false, true, true)

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