Hello there,
I am using DWR to convert an array of objects (called Rhasset.java) from JavaScript to the back-end. Simple arrays of Strings work, the individual Rhasset object also works but when I send an array of Rhasset objects than the element data looks as follows:
[{name:reference:c0-e2, value:reference:c0-e3}]
The 'name' and 'value' are the actual keys for the objects entries but the values are not readable.
Here is my code:
JavaScript:
DWR.XML:Code:var testArray = [{ name : 'TestName', value: 'TestValue'}]; rhassetServices.invokeMessage(testArray);
Java Controller:Code:<convert converter="bean" match="com.qas.newmedia.internet.rhasset.model.Rhasset" />
Java Object:Code:public List<Rhasset> invokeMessage(List<Rhasset> list) { return list; }
As you can see this is pretty straightforward stuff. In fact I can remove the Rhasset stuff and just read back arrays of string objects and still get the same issue.Code:public class Rhasset { public String name; public String value; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } }
I have tried messing around with signatures and converters and a number of other things but have not been able to get anywhere - and as far as I know this set-up should be supported as standard.
Can someone suggest as to what I might be doing wrong or suggest any other avenues to investigate?
Many thanks in advance,
Greg


Reply With Quote
