javascript - Kendo UI Datasource Limitation -
I am having a problem with getting values of an array within the keyndo ui data source object, I have several things Searched and tried, but in 3 weeks the solution was not found. Actually I want to get the value of the array named 'base64img' which is assigned as a field in the Candido UI datasource, but I am unable to access the array value data. Here are all my statistics: (If there are errors in the response, please note, as I have modified for security purposes) XML response -
& lt ;? Xml version = "1.0" encoding = "UTF-8" & gt; & Lt; Soapenv: envelope xmlns: soap = "http://schemas.xmlsoap.org/soap/envelope/" & gt; & Lt; Soapenv: body & gt; & Lt; Retrieve unit response xmlns = "http://lal.lala.com/lala/messages/" & gt; & Lt; IncidentStructure & gt; & Lt; GeoLoc & gt; LALA1 & lt; / GeoLoc & gt; & Lt; Accountant & gt; Party & lt; / Eclipse & gt; & Lt; IncidentStatus & gt; Open & lt; / IncidentStatus & gt; & Lt; IncidentCompltnDate & gt; 2012-01-02 & lt; / IncidentCompltnDate & gt; & Lt; / IncidentStructure & gt; & Lt; ImageURI & gt; IMAG0001.jpg & lt; / ImageURI & gt; & Lt; ImageURI & gt; IMAG0002.jpg & lt; / ImageURI & gt; & Lt; ImageURI & gt; IMAG0003.jpg & lt; / ImageURI & gt; & Lt; ImageURI & gt; IMAG0004.jpg & lt; / ImageURI & gt; & Lt; ImageURI & gt; IMAG0005.jpg & lt; / ImageURI & gt; & Lt; ImageBase64 & gt; / 9j / 4AAQSkZJRgABAQAAAQABAAD & lt; / ImageBase64 & gt; & Lt; ImageBase64 & gt; / 2wBDAAUDBAQEAwUEBAQFBQUGBwwIBwcHBw8LCwkM & lt; / ImageBase64 & gt; & Lt; ImageBase64 & gt; EQ8SEhEPERETFhwXExQaFRERGCEYGh0dHx8fExciJC & lt; / ImageeBase64 & gt; & Lt; ImageBase64 & gt; IeJBweHx7 / 2wBDAQUFBQcbw4ICA4eFBEUHh4eHh4eHh4eHh4eHh4eH & lt; / ImageBase64 & gt;
Cando data source code:
var parser = new DOMParser (); Var xmlDoc = parser.parseFromString (soapXMLResponse, "app / xml"); Var dsIncPictures = new kendo.data.DataSource ({error: function (e) {console.log ("ds error:" + e.status);}, data: xmldoc, schema: {type: "xml", data: "Sopenv: Envelope / Sopenve: Body / Recover Incandesponse", Model: {Field: {imageURI: "Imagery", ImageBase 64: "ImageBase64"}, is Children: True}}, Pages System: 50}); My attempts to get the values: / * $ drt.globalEditIncWPics.fetch (function () {$ drt.globalEditIncWPics._data (0) .imageBase64 (0) .val; $ drt.globalEditIncWPics.get ("imageURI [0] ] "; Var field = $ drt.globalEditIncWPics.get (" imageURI [0] "). ImageURI [0]. Length, console.log ($ drt.globalEditIncWPics.get (.) ImageURI (0)); var field = $ Drt.globalEditIncWPics.at (0); console.log ("VALUE:" "+ Field.text +" ''); Soaproom .Append (bind.soapRequestMessageFields (field.FieldName, field.value))}) ; * / / * $ Drt.globalEditIncWPics.fetch (); (Var idx = 0; idx & lt; = $ drt.globalEditIncWPics.length; idx ++) {$ drt.globalEditIncWPics.data [0] .imageBase64 [0] .value; } * /
The results of this object are Google Developer Tools: I was not told anything that my reputation was not enough to post a picture. The code pasting the developer tool (sometimes takes up too much space): Basically _prestineData has two arrays called one imageBase64 and imageURI 0. 1 array is in place and values of each hair array location (0,1, 2,3, etc.). After having a look at your source, it is a fetch function that looks for work,
dsIncPictures.fetch (function () {var data = dsIncPictures.data (); for (var rowIndex = 0; Row Indax & lt; data.length; rowIndex ++) {var imageBase64 = Data [rowIndex] for .imageBase64; (var imageIndex = 0; imageIndex & lt; imageBase64.length; imageIndex ++) {console.log (ImageBase64 [imageIndex] ['#text']);}}});
The absolute path to the first image of the first line is data [0] .imageBase64 [0] ['# text']
.
Comments
Post a Comment