Have you tried using Javascript Overlays? See this page - http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsOverlay.html It allows you to pass objects back and forth, including JsArray. It has an example of JsArray<Customer> that you could peruse.
--Sri On 3 May 2010 12:09, rjcarr <rjc...@gmail.com> wrote: > I've recently began using a javascript library that is based on > (requires) jquery so I'll be needing to write a lot more JSNI than I > have in the past. > > I've actually got jquery working with jsni without too much trouble, > but now I'm having problems with data types. > > I struggled quite a bit getting a data structure passed into a JSNI > method, i.e., a list of String. The only thing I could get to work > was to write a JSNI method to create an array and return it as a > JavaScriptObject (e.g, return []), then write another JSNI method to > put something in the array (e.g, jso.push(string)), and then finally > pass this built-up array into the expected JSNI method (with the > jquery I need). > > Is this the only way to do it? It seems this could be easier if the > JsArrayString (and others similar) could be instantiated in Java, and > then usable in the JSNI, but that isn't possible. Am I missing > something? > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to google-web-tool...@googlegroups.com. > To unsubscribe from this group, send email to > google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.