Announcement

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

    newbie question about where datasource file location in examples

    hi all, i am evaluating 2.5 for a project we are undertaking, basically we want
    to read an xml schema and allow the user to editing that tree structure via a web app. smartGWT seems like a good fit for this. they would be able to change values of existing nodes and even add/remove new nodes (hopefully have it validated somehow)

    so i downloaded LGPL version and got hello world up and running and now I want to move onto the Editing TreeGrid example.

    so I went to the showcase that is here
    http://www.smartclient.com/smartgwt/showcase/#tree_editing

    and tried to bring the
    1) TreeEditingSample.java
    2) EmployeeXmlDS.java
    3) employees.data.xml

    into my project and run it

    I am unsure where smartGWT expects to find employees.data.xml?

    i see that the EmployeeXmlDS.java tries to load the xml via
    setDataURL("ds/test_data/employees.data.xml");
    and it blows up in the places i put it, i guess it cannot find it
    although there is no "file not found message"

    I tried to place employees.data.xml in root above (client and server pkg)
    com.vzw.mytest.ds.test_data

    also tried other places but i get.

    12:47:20.076:XRP7:WARN:DataSource:employeesDS:one-time fetch failed with status: -90 and messsage: [object Object]. Initializing an empty Array as testData.
    com.smartgwt.client.core.JsObject$SGWT_WARN: 12:47:20.076:XRP7:WARN:DataSource:employeesDS:one-time fetch failed with status: -90 and messsage: [object Object]. Initializing an empty Array as testData.


    can someone please help me fix this, maybe with a few words of explanation

    thanks

    #2
    Start with the QuickStart Guide - everything in there applies when using XML Schema, the only difference is that it's typical to use DataSource.inheritsFrom to inherit from one of the DataSources that you can get from the SchemaSet object which loadXMLSchema() returns.

    Comment


      #3
      thanks Isomorphic, and i had printed the getting started guide had read up to chapter 5, which starts the Data Binding
      chapter, and will read through it tonight,

      in the mean time can you give me some guidence on
      how to get by this particular error i am having when trying
      to bring the editing treegrid example into my project, where
      can i put the .xml file in my project just to get it to be read
      without getting the error

      for right now i can just use this to show my managers and maybe get him to buy the pro version if he likes what he sees, i can hardcode
      a xml file full of data just to show him we can read an xml and edit it
      in a web browser

      thanks
      Last edited by rfwalker; 15 Aug 2011, 16:46.

      Comment


        #4
        Isomorphic, after reading chapter 5, i read

        "Save the XML as contacts.ds.xml in your project, under war/ds. This is the default location that the Smart GWT server framework looks for DataSource descriptors."

        so i am up and running

        I am still investigating all this as a viable choice for the project, really
        great components

        thxs

        Comment

        Working...