Announcement

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

    Transitioning from SmartClient to SmartGWT

    I've been learning SmartClient using the full download and have successfully connected to a pre-existing MySQL database. I've now downloaded SmartGWT and would like to use some of the same data sources that I have been using with SmartClient. I have the SmartClient server running and have developed a sample app with SmartGWT but using DataSource.getDataSource("datasourcename") results in null. I need step by step instructions on how to transition from SmartClient and still use the existing server side code (i.e. data sources) that I've developed.

    #2
    Copy the .ds.xml files over and well as WEB-INF/classes/server.properties (has your SQL settings). Use a <script src=> reference to the DataSourceLoader servlet in your .html host file to load the DataSources, as shown in any SmartGWT Pro example that uses DataSources.

    Comment


      #3
      where do I put the .ds.cml files?

      Comment


        #4
        Corresponding directory ([webroot]/shared/ds by default).

        Comment


          #5
          Sorry if I'm being dense, but I'm a newbie ... in case you haven't noticed. I added this line to my html

          <script src="sc/DataSourceLoader?dataSource=MyDataSource"></script>

          ... and copied the MyDataSource.ds.xml to [webroot]/shared/ds but I'm getting an error "WARNING: No file found for: /sc/DataSourceLoader" when running the app.

          Comment


            #6
            Have you figured this out yet? Looks like a relative path issue (just match the samples) or possibly you're using a web.xml different from the one that comes with the starter projects and you don't have the DataSourceLoader servlet.

            Comment


              #7
              Yes. I've got it working now. Just typical newbie confusion. Thanks for the help.

              Comment

              Working...
              X