Announcement

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

    SmartGWTEE: DataSource accessing MySQL DB

    Hi all,

    I am desperate; for the last two days I tried to get my small evaluation setup done but nothing works out.


    What I want to do.
    I have a sample MySQL DB and want to build a GUI to manipulate the data with as less as possible effort. That is why I came to SmartGWT and their Datasource mechanism.
    Within the MySQL I have the database 'simpledialog' and within this I have one table 'persons'.
    Best approach would be to have a datasource that uses hibernate to access my table.

    What have I tried? / Where do I stand?
    SmartGWTEE seems working as I tried some SC.say(). Additionally I got something to work within the VisualBuilder. There I created a SQL database and I am able to see the table data in a Grid. (but only in VisualBuilder)

    Then I took the example 'HibernateDS' and the one from here
    http://www.smartclient.com/smartgwtee/showcase/#doc_getting_started_gridview
    as references. So I copied the WEB-INF folder from 'HibernateDS' and the mapping files from the documentation example.

    But with this setup I get all sorts of errors. From missing Messaging Servlets to missing DAO classes ... and I do not know which of these errors I can avoid by removing unnecessary files.

    Could someone guide me so that in the end I have a simple grid that accesses the mysql table data? What files do I need? (Datasource definition xml, hibernate mappings, webx.xml) And how must the configuration be done to complete this task?

    I would be very thankful for some tips and some guidance!
    Chris

    #2
    The simplest approach by far is to use the SQLDataSource, not Hibernate. Note that the intro docs steer you to this solution unless you have a pre-existing commitment to Hibernate.

    So, start over, grab the EE eval, import the built-in-ds sample into Eclipse and you have a running SQL project. Use the Admin Console to switch to MySQL and the DataSource Wizard to derive a DataSource from your existing table, and your done.

    These steps are all covered in the read me in the sample directory, and the FAQ item on how to use the DataSource wizards.

    Comment


      #3
      Hi,
      Thank-you for the quick response. I will try to start over from the sample. Am I right that the admin console you are mentioning must be accessed from the running sample itself?

      Comment


        #4
        There are a few ways to do it, but this FAQ item provides a predictable approach involving launching from within the sample itself.

        Comment

        Working...
        X