Solved it.
The problem was in: tempList = query.getResultList();
The result list returned from the query is a List<Object[][]> which
couldn't be converted to List<BrowserDetailItem>.
This meant that the return method instead of returning a
List<BrowserDetailItem> which is a ValueProxy, returned a List<Object[]
[]> which can't be sent to the server.
The solution was to iterate though the List<Object[][]> and create a
new BrowserDetailItem in each pass:
Query query = entityManager
.createQuery("SELECT s.name,s.id FROM Song s,
Playlist p, Composer c WHERE s.id_playlist = p.id AND c.id =
p.id_composer ");
List results = query.getResultList(); // Fetches list
containing
arrays of object
Iterator it = results.iterator();
while (it.hasNext()) {
Object[] result = (Object[]) it.next(); //
Iterating through the
array object
tempList.add(new BrowserDetailItem ((String)
result[0], (Integer)
result[1]));
}
tempList.size();
return tempList;
Hope it helps.
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.