1. #1
    Ext User
    Join Date
    Aug 2008
    Posts
    1
    Vote Rating
    0
    brayan is on a distinguished road

      0  

    Default XMLReader and Grids; read and xml string and populate grid

    XMLReader and Grids; read and xml string and populate grid


    Hi,

    1) I was unable to read from the documentation how to read a XML string with the XMLReader. The XML string I stored in a JS Variable. The grid doesn't load the data - however, firebug doesn't capture any JS errors neither. The grid seems okay, I can easily add records. No problem with that.

    2) Since I managed to add records to the grid, how can I export the data using the xmlData Property from the XMLReader? (I need to add the xml to an input field, so I can submit the data to the target page - along with other input fields)

    Anybody experienced local XMLReader loading ANDxmlData extraction with EXTJS 1.1?

    Thanks heaps

    Code:
     
    var xmlData = "<?xml?><vehicles><vehicle><ID>1001</ID><brand>Citroen</brand><model>Saxo</model><type>XXX Edition</type></vehicle></vehicles>";
    var ds = new Ext.data.Store({
      proxy: new Ext.data.MemoryProxy(xmlData),
         // the return will be XML, so lets set up a reader
         reader: new Ext.data.XmlReader({
              // records will have an "T4" tag
              record: 'vehicle',
              id: 'ID',
              totalRecords: "recCount"
         }, [
      'brand', 'model', 'type'
      ])
    });
     
    var cm = new Ext.grid.ColumnModel([{
     id: 'ID',
     header: "Marke",
     dataIndex: 'brand',
     width: 120
         },{
     header: "Modell",
     dataIndex: 'model',
     width: 120
     },{
     header: "Type",
     dataIndex: 'type',
     width: 40
         }
    ]);
    // by default columns are sortable
    cm.defaultSortable = true;
    grid = new Ext.grid.Grid('divGrid', {
         ds: ds,
         cm: cm
    });
    grid.render();
    ds.load();

  2. #2
    Ext User
    Join Date
    Jul 2008
    Posts
    23
    Vote Rating
    0
    luckyxx is on a distinguished road

      0  

    Default


    u may use this:
    proxy: new Ext.data.HttpProxy({url: 'new.xml'}),


  3. #3
    Sencha User
    Join Date
    Nov 2008
    Posts
    50
    Vote Rating
    0
    dtondo is on a distinguished road

      0  

    Default


    Quote Originally Posted by luckyxx View Post
    u may use this:
    proxy: new Ext.data.HttpProxy({url: 'new.xml'}),

    it does not answer the question... im looking that too

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