1. #1
    Ext User
    Join Date
    Dec 2007
    Posts
    4
    Vote Rating
    0
    ebald is on a distinguished road

      0  

    Question Ext.data.Store with composite Primary Key

    Ext.data.Store with composite Primary Key


    Two questions.

    How could I define a JsonReader with a composite primary key:

    The primary key is composite by two fields:
    • dot_id_document_type
    • cli_tx_document_number

    The JsonReader definition:

    var reader = new Ext.data.JsonReader({
    root : "rows",
    totalProperty : "results",
    id: ???
    }, Client);

    2. How could I rescue the row from the grid?

    record = ds.getById(The component espects an String here, and so?);

    Thank you, but I

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    86
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Use:

    Code:
    var reader = new Ext.data.JsonReader({
      root: "rows",
      totalProperty: "results",
      id: 'dot_id_document_type + "-" + obj.cli_tx_document_number'
    }, Client);
    and

    Code:
    record = ds.getById(dot_id_document_type + '-' + cli_tx_document_number);

  3. #3
    Ext User
    Join Date
    Dec 2007
    Posts
    4
    Vote Rating
    0
    ebald is on a distinguished road

      0  

    Question Thank you Condor, but it doesn

    Thank you Condor, but it doesn


    I like that solution, but is there any possibility that the JsonReader doesn

  4. #4
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    86
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    It's:
    Code:
    id: 'dot_id_document_type + "-" + obj.cli_tx_document_number'
    getJsonAccessor creates the following function for your id:
    Code:
    new Function("obj", "return obj." + id)

  5. #5
    Ext User
    Join Date
    Dec 2007
    Posts
    4
    Vote Rating
    0
    ebald is on a distinguished road

      0  

    Default It Works!!!

    It Works!!!


    Thank you very much!!

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