The following worked in the 'Version v8.3p_2013-01-21/PowerEdition Deployment (2013-01-21)' build:
But got broken in the 2013-01-22 build:
Tested in dev mode with Firefox 18 on Windoze 7. Thoughts?
Code:
public void onModuleLoad() { DataSource ds = DataSource.get("Orders"); ds.fetchData(new Criteria("STATUS", "Shipped"), new DSCallback() { @Override public void execute(DSResponse response, Object rawData, DSRequest request) { RecordList list = response.getDataAsRecordList(); Record foo = new Record(); foo.setAttribute("COMMENTS", "foo"); list.add(foo); for (int i=0; i < list.getLength(); i++) { Record record = list.get(i); //boom Map m = record.toMap(); GWT.log(String.valueOf(m.get("COMMENTS"))); } } }); }
Code:
java.lang.IllegalArgumentException: convertToMap - unable to convert the passed JavaScript object to a Map. JavaScript is: {__ref: {GWT Java Obj}, COMMENTS: "foo"} at com.smartgwt.client.util.JSOHelper.convertToMap(JSOHelper.java:627) at com.smartgwt.client.util.JSOHelper.convertToMap(JSOHelper.java:639) at com.smartgwt.client.data.Record.toMap(Record.java:161) at com.isomorphic.smartgwt.examples.beans.client.BeansEntryPoint$1.execute(BeansEntryPoint.java:53) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:242) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364) at java.lang.Thread.run(Thread.java:662)
Comment