Results 1 to 2 of 2

Thread: ListStore with List<String> ?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Jun 2012
    Posts
    10
    Vote Rating
    0
      0  

    Default ListStore with List<String> ?

    Hello,

    is it possible to fill a ListStore with a plain List<String> received via Json?

    I could not find any examples and so far I get


    Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to com.google.gwt.core.client.JavaScriptObject
    when trying to access the list in a combo box.

    Any help would be appreciated.

    kind regards
    /anja

  2. #2
    Ext GWT Premium Member icfantv's Avatar
    Join Date
    Sep 2011
    Location
    Superior, CO
    Posts
    413
    Vote Rating
    21
      0  

    Default

    I've never used autobeans or the reader, but take a look at JsonReader. It is responsible for converting JSON in to beans which you can then load into your list store.

    Unless you want this behavior, the list store will fire an event each time an item is added so you may want to construct them all first and then add them (which will also fire an event, just one though, instead of n?.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •