3.0 beta 2

set data from string array

Hi,

I want to set the items of a list control from a string array. I am using jsp to attempt to accomplish this:

<%
// Pretend this string array has text in it.
String[] s = new String(3);
%>

<script>
obj.setItemText(s);
</script>

Everytime I run this the list shows up empty. But I can print out the contents of the array and there are definitely values in there. What must I change?

Thanks
markw
March 12,
In this part s (I guess) is a java array on the server

String[] s = new String(3);

But here it should be a javascript array on the client

obj.setItemText(s);

To make it work you should serialize java array into javascript (JSON) format and sent it to the browser together with the rest of the page/script code.
Alex (ActiveWidgets)
March 13,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.