Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Help with Datasource

    Hi,

    I have this example , which is not working as I hoped,

    isc.DataSource.create({
    ID: "someID",
    dataFormat: "xml",
    dataURL: "/someXML.xml",
    recordXPath:"//xpathName",
    fields: [
    {name:"name", defaultValue:"xxx"},
    {name:"id"}
    ]
    });

    docPropDS.fetchData(null, function(dsResponse,data){
    alert("objectq "+ data);

    });
    I get undefined in FF. when I am expecting an object . I also tried alerting data[0] and data[0].propName ( not getting data in it, though the xml file has data in it. is it required to give field names or they are auto populated...

    Also when does the data gets fetched in the Datasource, ... when a widget like list,treeGrid accesses it or ....?
    Help! Thanks
    Last edited by Stem; 27 Sep 2007, 13:07.

    #2
    Hi Stem,

    At the moment, your call to fetchData() is to a different DataSource than the one you show inline (your call is to "docPropsDS"). Overall, you should take a look at the Debugging topic for advice on how to solve your issue.

    Comment

    Working...
    X