1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    45
    Vote Rating
    0
    maxkliver is on a distinguished road

      0  

    Default How to make store with several records?

    How to make store with several records?


    I want to create Ext.data.store with several data sets. Using store like this:

    Code:
    store_form = new Ext.data.Stor
          url: url_servlet+"kadastr_zemform.jsp?ss="+<%=str%>,
          reader: new Ext.data.XmlReader({
          totalProperty: "results", 
          record: "zem", 
          fields: [
             {name: 'cadastr', mapping:'parcel/preview/cadastr'},
             {name: 'address', mapping:'parcel/preview/address'},
    
             {name:'res', mapping:'really/preview/res'},
             {name:'zem_kod', mapping:'really/preview/zem_kod'},
    
             {name: 'right_type_docs', mapping:'doc/preview/right_type_docs'},
             {name: 'doc_docs', mapping:'doc/preview/doc_docs'},
    
          ];
    This store used by 3 FormPanels: 1 for parsel, 2 for really, 3 for doc. And, for example, if on one parcel exists several real estate i want show one by one. i mean i show first then click button and show next.
    Questions:

    1. For this i need XML with several `zem` records?
    2. How to create this XML? Now i can create XML with only one record couse:

    Code:
    out.print(<zem>);
             Statement st1=<query to parcel table>;
             while(ResultSet.next()){
             out.print(<parcel>);
               out.print(<parcel table fields>);
             out.print(</parcel>);
             }
             st1.close();
             Statement st2=<query to really table>;
             while(ResultSet.next()){
             out.print(<really>);
               out.print(<really table fields>);
             out.print(</really>);
             }
             st2.close();
            Statement st3= <query to docs table>;
             while(ResultSet.next()){
             out.print(<doc>);
               out.print(<doc table fields>);
             out.print(</doc>);
             }
             st3.close();
           out.print(</zem>);

  2. #2
    Sencha User
    Join Date
    Mar 2011
    Posts
    63
    Vote Rating
    0
    jorgeluislay is an unknown quantity at this point

      0  

    Default


    can you give more code ?

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    45
    Vote Rating
    0
    maxkliver is on a distinguished road

      0  

    Default


    Now its converted in another question: How to take data from store?
    I can take record from store: var record = store.getAt(i);
    But if i want to take fileds which have a same name from record i get only first field value. For example if i have XML with:

    Code:
    <zem>
      <parcel>
        ....
      <parcel>
      <really>
        <price>555.555<price>
      </really>
      <really>
        <price>666.666<price>
      </really>
    </zem>
    And using record.get("price") i can get only 555.555 value.
    Its possible to get values of all fields of <really>? Or array of all <price> fields?

  4. #4
    Sencha User
    Join Date
    Jan 2011
    Posts
    544
    Vote Rating
    52
    willigogs is a jewel in the rough willigogs is a jewel in the rough willigogs is a jewel in the rough

      1  

  5. #5
    Sencha User
    Join Date
    Jul 2012
    Posts
    45
    Vote Rating
    0
    maxkliver is on a distinguished road

      0  

    Default


    Thank you. Its look like what i need.

Thread Participants: 2

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