« Return to Thread: DWR: error in convert from java object to javascript.
David Marginian-3 wrote:Try calling the method from the DWR test page please. You will need to
enable debug mode to do this.
http://directwebremoting.org/dwr/server/servlet/index.html
czyjava wrote:
> another weird thing is
>
> var newSetting = {settingId: item.settingId};
> doesn't work. I have to manually conver it to a string, like
> var newSetting = {settingId: item.settingId+""};
>
> I am using Dojo, it is related to Dojo ?
>
> Thanks,
>
>
> David Marginian-3 wrote:
>
>> Send us your dwr.xml and the java method you are calling.
>>
>> On Fri, Jul 3, 2009 at 9:25 PM, czyjava <czy11421@gmail.com> wrote:
>>
>>
>>> Using DWR ajax, I can convert java object to javascript object, but I
>>> can't
>>> convert an object in javascript to a java object. [code] var setting =
>>> {id:
>>> item.Id, name: item.name, val:item.val}; //wrong, data is
>>> '[reference:c0-e2]' var setting = {id:'1200', name: 'name', val:'ssss'};
>>> //correct AjaxUtil.saveSetting(setting, {callback:function(data){
>>> alert("data is saved through DWR"); }}); [/code] the error message is
>>> DEBUG
>>> [org.directwebremoting.dwrp.BaseCallMarshaller 43] - Environment:
>>> c0-e6=string:12ssd, c0-e5=Array:[reference:c0-e6],
>>> c0-e1=Array:[reference:c0-e2], c0-e2=string:1000,
>>> c0-e3=Array:[reference:c0-e4], c0-e4=string:ddd, INFO
>>> [org.directwebremoting.impl.DefaultRemoter 51] - Exec:
>>> AjaxUtil.saveSetting() DEBUG [org.directwebremoting.impl.DefaultRemoter
>>> 43]
>>> - --Object found in session. id=0 DEBUG [com.util.AjaxUtil 24] - save
>>> setting:[reference:c0-e2]--[reference:c0-e4]--[reference:c0-e6] I have
>>> defined in the dwr.xml Do I miss some something ? Thank.
>>> ------------------------------
>>> View this message in context: DWR: error in convert from java object to
>>> javascript.<http://www.nabble.com/DWR%3A-error-in-convert-from-java-object-to-javascript.-tp24330468p24330468.html>
>>> Sent from the DWR - Users mailing list
>>> archive<http://www.nabble.com/DWR---Users-f13934.html>at Nabble.com.
>>>
>>>
>>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@dwr.dev.java.net
For additional commands, e-mail: users-help@dwr.dev.java.net
« Return to Thread: DWR: error in convert from java object to javascript.
| Free embeddable forum powered by Nabble | Forum Help |