Announcement

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

    ListGrid Auto / Manual adding record

    Hi all,

    I use a ListGrid + RestDatasource JSON format data with automatic dialog with server side for fetch, add, remove and update operations. All this work fine but

    I'd like to add some records in my ListGrid on server side (with no action from the client side).

    How to do this ? Nor ListGrid.fetchData or ListGrid.RefreshFields is working.

    I add my records with SQL DataBase operations but no way to update ListGrid content.

    P.S : I read many member requests regarding server side code for handling SmartGWT datasource. For those who are interested, I can send you a complete project based on MySQL DataBase + TopLink persistence + JSON/XML broker servlet. Consider this as a starter.

    Regards

    #2
    good

    +1 for your share

    Comment


      #3
      You can call fetchData() again with different criteria to force a fetch.

      Note that normally in SmartClient you would call listGrid.data.invalidateCache() (as the docs say) but APIs for the ResultSet object from SmartClient haven't been fully exposed in SmartGWT yet.

      [EDIT: a new API listgrid.invalidateCache() has been added which allows manually invalidating the cache in SmartGWT]
      Last edited by Isomorphic; 15 Feb 2009, 08:51.

      Comment


        #4
        Thanks for your answer, I'll try this.

        Comment


          #5
          Originally posted by fplanel
          P.S : I read many member requests regarding server side code for handling SmartGWT datasource. For those who are interested, I can send you a complete project based on MySQL DataBase + TopLink persistence + JSON/XML broker servlet. Consider this as a starter.Regards
          Yep, there's no clear information I can find and they don't respond to questions about it - I guess that is because Isomorphic are trying to sell a pro version! I think TopLink is a Hibernate alternative. We are using grails/gwt stack, so have Hibernate via GORM. Your example might help alright, any chance you could zip it up and put it up on http://www.filedropper.com/ or something.

          Comment


            #6
            I would be interested too.

            As boardtc said, can you upload it, or post it here? That would be great!

            Comment


              #7
              Man, thats what i need.
              Im reading this forum for about 15 days and a lot of ppl asks for that, but theres no example anywhere. The examples of the showcase dont help when you need a server side integration, just help at client side.
              I would be very grate if you share your project with us.
              Tks a lot.

              Comment


                #8
                Are you not able to write server side code that returns data in the format illustrated in the RestDataSource example?
                Last edited by smartgwt.dev; 14 Feb 2009, 17:31.

                Comment


                  #9
                  Guys you don't see samples like this coming from Isomorphic because you'd need one for every combination of server / database / format that's out there, whereas we have a backlog of samples to create and most people can handle writing server code to generate specific XML or JSON responses. But we'd be happy to take a good user-created sample and give it prominent placement (eg sticky thread). Just email it to support@isomorphic.com.

                  Comment

                  Working...
                  X