Announcement

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

    Smart methode to push data in a JSON string into a DataSource for a ColumnTree ?

    Hello together,

    I'm just wondering, if there exists a smart way to get the data from a JSONvalue in a DataSource object which I use for a ColumnView.

    In the moment I convert the JSONvalue in a string, then in a javascript object and at last in a Record array with the following code line (where 'data' is the JSONvalue):

    Code:
    final Record[] records = 
         Record.convertToRecordArray(JSON.decode(data.toString()));
    Then I push the Record array into the DataSource object with the setTestData methode :

    Code:
     datasource.setTestData(records);
    Seems to work fine, but I have two questions:

    First, do any restrictions exists on the setTestData methode, like length of the array ?

    And second, exists there a smarter way to do this ?

    Thx in advance,
    Zed

    #2
    Yes, there exist multiple, much smarter ways to do this. Start by reading the QuickStart Guide, specifically, the chapter on Data Integration.

    Comment


      #3
      You might also like to take a look at this project:

      CRMdipity -> http://code.google.com/p/crmdipity/ and this blog -> http://www.uptick.com.au/blog

      Also, this post which discusses both Gilead and Dozer -> http://code.google.com/webtoolkit/articles/using_gwt_with_hibernate.html

      - Mark

      Comment

      Working...
      X