I get this error when a multi-value datasource field is empty/null/missing.
LogDefinitionDataSource.java:83:
If 'tags' exist (this is an xml datasource (SOAP)) they look like this:
<record>
<tag>a</tag>
<tag>b</tag>
</record>
SmartGWT 2.4 GPL.
Code:
java.lang.ClassCastException: java.lang.String cannot be cast to com.google.gwt.core.client.JavaScriptObject at com.smartgwt.client.util.JSOHelper.getAttributeAsJavaScriptObject(JSOHelper.java) at com.smartgwt.client.util.JSOHelper.getAttributeAsStringArray(JSOHelper.java:310) at com.smartgwt.client.core.DataClass.getAttributeAsStringArray(DataClass.java:115) at com.logalyze.admin.web.client.data.LogDefinitionDataSource.transformResponse(LogDefinitionDataSource.java:83)
Code:
String value[] = record.getAttributeAsStringArray("tag");
<record>
<tag>a</tag>
<tag>b</tag>
</record>
SmartGWT 2.4 GPL.
Comment