Did this ever get fixed or an acceptable response as I am running into the 
same issue. A very non-descriptive error: undefined... That is when i try 
and serialize and send the results of ListDataProvider.getList() which I 
thought was a list of my data objects.

On Thursday, July 14, 2011 4:45:07 AM UTC-4, gwernol wrote:
>
> I'm using the ListDataProvider. I can write code like: 
>
> public class MyListPanel extends VerticalPanel { 
>         private TextCell textCell = new TextCell(); 
>         private CellList<String> cellList = new 
> CellList<String>(textCell); 
>         private ListDataProvider<String> dataProvider = new 
> ListDataProvider<String>(); 
>
>         private void createUI() { 
>                 ScrollPanel scrollPanel = new ScrollPanel(); 
>                 scrollPanel.setSize("100%", "5em"); 
>
>                 dataProvider.addDataDisplay(cellList); 
>
>                 scrollPanel.setWidget(cellList); 
>                 add(scrollPanel); 
>         } 
>
>         public List<String> getList() { 
>                 return dataProvider.getList(); 
>         } 
>
>         public addToList(String item) { 
>                 System.out.println("addToList: item=" + item); 
>                 dataProvider.getList().add(item); 
>                 System.out.println("item is now " 
> +dataProvider.getList()); 
>         } 
> } 
>
> If I call myListPanel.addToList("dan"), then the list is updated as 
> expected, but, the System output is something like: 
>
> addToList: item=dan 
> addToList: list is now com.google.gwt.view.client.ListDataProvider 
> $ListWrapper@7755c16a 
>
> Note that dataProvider.getList() is returning a ListWrapper not a 
> List<String>. 
>
> Elsewhere my code calls myListPanel.getList() and puts the returned 
> "array" into a List<String> field an object that I pass back to the 
> server. This of course results in a Serialization Exception, as the 
> object should contain a List<String> but actually contains a 
> ListWrapper. 
>
> The JavaDoc says that: 
>
> public java.util.List<T> getList() 
> Get the list that backs this model. Changes to the list will be 
> reflected in the model. 
>
> This is clearly not true. Is this bug going to be fixed? At the very 
> least the documentation should be updated asap as its misleading right 
> now. 
>
> Thanks, 
>
> Dan

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to