Developer/Designer Notes

Java Dynamic Arrays

Posted by Kiran Mova on March 8, 2007

Every now and then, I get into this situation where I have to use an dynamic array. I am working on passing some values from Java to Javascript using DWR. The easiest way out for me is to create an ArrayList and just before returning, convert it to an Array. However, the conversion is non-trivial. Here is an interesting read on how to do this: solution to toArray()

I am yet to try the option of passing an ArrayList as a parameter from Java to JavaScript.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: