Hi,
Smart GWT EE (latest nightly build) + internet explorer
I'm working with my own custom objects for which I have created simple types; implemented the necessary editors and formatters.
My serverobject implements the CRUD operations (following the DMI example).
Fetch works fine and values are displayed nicely in the grid or form.
However, when editing and performing the update I don't get my custom object back but just the formatted value?
I was expecting to get my custom object back (or a javascript object from which I could reconstruct my custom object) but all I got is the formatted value?
Ofcourse calling the DataTools.setProperties(record, existingRecord) fails because I don't have a setter-method on my custom object that takes a string iso the object itself.
I have included some screenshots, so you can see what I mean.
The strange thing is that the "old" values do contain my custom objects (I guess).
Output from the RPC window (I removed some of the other fields from the old values as they are not relevant for now):
Exception thrown by the setDataTools (internal exception is thrown by our back end because we expect our own datatype):
Thanx
Smart GWT EE (latest nightly build) + internet explorer
I'm working with my own custom objects for which I have created simple types; implemented the necessary editors and formatters.
My serverobject implements the CRUD operations (following the DMI example).
Fetch works fine and values are displayed nicely in the grid or form.
However, when editing and performing the update I don't get my custom object back but just the formatted value?
I was expecting to get my custom object back (or a javascript object from which I could reconstruct my custom object) but all I got is the formatted value?
Ofcourse calling the DataTools.setProperties(record, existingRecord) fails because I don't have a setter-method on my custom object that takes a string iso the object itself.
I have included some screenshots, so you can see what I mean.
The strange thing is that the "old" values do contain my custom objects (I guess).
Output from the RPC window (I removed some of the other fields from the old values as they are not relevant for now):
Code:
"actionURL":"http://127.0.0.1:8888/silkroad/sc/IDACall", "showPrompt":false, "transport":"xmlHttpRequest", "promptStyle":"dialog", "bypassCache":true, "data":{ "criteria":{ "billingitem_id":506146 }, "values":{ "billingitem_id":506146, "billingitemtype_enumid":"458", "amount":"500 EUR" }, "operationConfig":{ "dataSource":"238", "repo":null, "operationType":"update" }, "componentId":"isc_SilkListGrid_0", "appID":"builtinApplication", "operation":"238_update", "oldValues":{ "amount":{ "curAmount":1.401298464324817e-45, "currencyId":-2147483648, "data":{ }, "dataType":7, "defaultObject":209.35, "defaultValue":"209.35", "fieldNames":[ "value", "mcId", "curValue" ], "null":false, "numeric":true, "refAmount":209.35, "zero":false }, "billingitem_id":506146, "billingitemtype_enumid":{ "attributeType":382, "dataType":9, "defaultObject":450, "defaultValue":"450", "enum_id":450, "fieldNames":[ "value" ], "null":false, "numeric":true, "sofEnumId":450 }, "correctiondate":"1900-01-01 00:00:00", "creationdate":"2005-09-15 13:53:39", } }
Exception thrown by the setDataTools (internal exception is thrown by our back end because we expect our own datatype):
Code:
outpost.dto.ISilkDTO server.stores.SilkAncestorStore.update(java.util.Map) throws java.lang.Exception with arg types: org.apache.commons.collections.map.LinkedMap Miles 5.16r build 26741, InternalErrorException - Created with msg: Cannot convert <458> to a basecamp.parameter.SofEnum: incorrect number of tokens. === 2010-06-30 15:33:34,149 [l0-4] DEBUG DataSourceDMI - Invocation threw exception java.lang.IllegalArgumentException: Can't convert value of type java.lang.String to target type basecamp.parameter.SofEnum at com.isomorphic.util.DataTools.convertType(DataTools.java:2714) at com.isomorphic.util.DataTools.createSetterArgument(DataTools.java:2606) at com.isomorphic.util.DataTools.coerceProperty(DataTools.java:2553) at com.isomorphic.util.DataTools.setProperties(DataTools.java:2395) at com.isomorphic.util.DataTools.setProperties(DataTools.java:2307) at server.stores.SilkAncestorStore.update(SilkAncestorStore.java:99)
Comment