Excluding properties when converting from JavaScript to Java objects

View: New views
13 Messages — Rating Filter:   Alert me  

Excluding properties when converting from JavaScript to Java objects

by Bruno Klava :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Is there any way to exclude some object properties when converting
from JavaScript to Java objects?

Using black-lists in dwr.xml only excludes properties when converting
from Java objects to JavaScript objects.


In my application, the user can modify the data structure using gui
elements (in a way that I need a reference from each gui element to
the actual object and vice versa) so, when sending the data to be
saved in the server, I get the "Max depth exceeded when dereferencing
..." error due to the references to gui elements.

My currently workaround is to navigate through the entire structure
and, for each object, set the reference to the gui element to
"undefined". Then, after sending the structure to the server, I need
to reload it to get the references to gui elements back. (I could
store these references in temporary elements to be reassigned to the
objects after communicating with the server, but the structure is
quite complex to do so).


Any suggestion is welcome.
Bruno

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Excluding properties when converting from JavaScript to Java objects

by Lance Java :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> Using black-lists in dwr.xml only excludes properties when converting from Java objects to JavaScript objects.
Are you sure? I wasn't aware of this although the docs do only mention that getters are excluded.
http://getahead.org/dwr/server/dwrxml/converters/bean

A work around could be to have two classes for your bean. Lets call them BeanAll and BeanRestricted. BeanRestricted has only the setters you want to convert from javascript. BeanAll extends (or delegates to) BeanRestricted and has the other properties needed on the serverside.

Cheers,
Lance.

On 16/04/2008, Bruno Klava <bklava@...> wrote:
Hi,

Is there any way to exclude some object properties when converting
from JavaScript to Java objects?

Using black-lists in dwr.xml only excludes properties when converting
from Java objects to JavaScript objects.


In my application, the user can modify the data structure using gui
elements (in a way that I need a reference from each gui element to
the actual object and vice versa) so, when sending the data to be
saved in the server, I get the "Max depth exceeded when dereferencing
..." error due to the references to gui elements.

My currently workaround is to navigate through the entire structure
and, for each object, set the reference to the gui element to
"undefined". Then, after sending the structure to the server, I need
to reload it to get the references to gui elements back. (I could
store these references in temporary elements to be reassigned to the
objects after communicating with the server, but the structure is
quite complex to do so).


Any suggestion is welcome.
Bruno

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



Re: Excluding properties when converting from JavaScript to Java objects

by Bruno Klava :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> > Using black-lists in dwr.xml only excludes properties when converting from
> Java objects to JavaScript objects.
> Are you sure? I wasn't aware of this although the docs do only mention that
> getters are excluded.

Sorry. I should have explained it better.
I meant that black-lists doesn't prevents DWR from sending data from
JavaScript object properties that not match the corresponding Java
class.

For instance, if you have a class Foo

public class Foo{

     private int a;

     public Foo(){
     }

     public int getA(){
          return a;
     }

     public void setA(int a){
          this.a = a;
     }

}

a class Bar with a method saveFoo(), exposed through DWR,

public void saveFoo(Foo foo){ ... }

and you have the following JavaScript code:

var jsObject = new Foo();
jsObject.a = 123;
jsObject.b = 456; // b is not part of Foo prototype!
Bar.saveFoo(jsObject, callbackFunction);

DWR sends to the server:

c0-scriptName=Bar
c0-methodName=saveFoo
c0-id=0
c0-e1=number:123
c0-e2=number:456
c0-param0=Object_Foo:{a:reference:c0-e1, b:reference:c0-e2}

and it doesn't matter if you change the converter to exclude the property b:

<convert converter="bean" javascript="Foo" match="my.package.Foo">
     <param name="exclude" value="b"/>
</convert>


Althought b is, obviously, never setted in th foo object passed to the
saveFoo method in the Bar class, the property is always included in
the data sent to the server.



In my case, the "b property" is a div element with hundreads other gui
elements, so I get the "Max depth exceeded when dereferencing ..."
error. What I need is not to send these properties data to the server,
without setting then to "undefined".

I hope my problem is more clear now ;)


Thanks,
Bruno

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Parent Message unknown Re: Excluding properties when converting from JavaScript to Java objects

by David Marginian-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am a bit confused.  If b is not a part of Foo why are you setting it in
your JavaScript object?  

Original Message:
-----------------
From: Bruno Klava bklava@...
Date: Thu, 17 Apr 2008 16:33:17 -0300
To: users@...
Subject: Re: [dwr-user] Excluding properties when converting from
JavaScript to Java objects


> > Using black-lists in dwr.xml only excludes properties when converting
from
> Java objects to JavaScript objects.
> Are you sure? I wasn't aware of this although the docs do only mention
that
> getters are excluded.

Sorry. I should have explained it better.
I meant that black-lists doesn't prevents DWR from sending data from
JavaScript object properties that not match the corresponding Java
class.

For instance, if you have a class Foo

public class Foo{

     private int a;

     public Foo(){
     }

     public int getA(){
          return a;
     }

     public void setA(int a){
          this.a = a;
     }

}

a class Bar with a method saveFoo(), exposed through DWR,

public void saveFoo(Foo foo){ ... }

and you have the following JavaScript code:

var jsObject = new Foo();
jsObject.a = 123;
jsObject.b = 456; // b is not part of Foo prototype!
Bar.saveFoo(jsObject, callbackFunction);

DWR sends to the server:

c0-scriptName=Bar
c0-methodName=saveFoo
c0-id=0
c0-e1=number:123
c0-e2=number:456
c0-param0=Object_Foo:{a:reference:c0-e1, b:reference:c0-e2}

and it doesn't matter if you change the converter to exclude the property b:

<convert converter="bean" javascript="Foo" match="my.package.Foo">
     <param name="exclude" value="b"/>
</convert>


Althought b is, obviously, never setted in th foo object passed to the
saveFoo method in the Bar class, the property is always included in
the data sent to the server.



In my case, the "b property" is a div element with hundreads other gui
elements, so I get the "Max depth exceeded when dereferencing ..."
error. What I need is not to send these properties data to the server,
without setting then to "undefined".

I hope my problem is more clear now ;)


Thanks,
Bruno

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



--------------------------------------------------------------------
myhosting.com - Premium Microsoft® Windows® and Linux web and application
hosting - http://link.myhosting.com/myhosting



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Excluding properties when converting from JavaScript to Java objects

by Bruno Klava :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I am a bit confused.  If b is not a part of Foo why are you setting it in
>  your JavaScript object?

It's a gui element representing this object (the user can manipulate
the data using the gui elements, and the structure is quite complex,
so i need a reference from each element to its gui element).

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


RE: Excluding properties when converting from JavaScript to Java objects

by Randy Jones-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've had the same problem with a JS Lib I'm using where I want to send some of its objects to DWR, but it has alot of client side attributes for graphics/handlers. I haven't found a way around it. DWR has nothing on the client side to tell it to only send certain attributes of an object.
 
Randy

________________________________

From: Bruno Klava [mailto:bklava@...]
Sent: Thu 4/17/2008 4:13 PM
To: users@...
Subject: Re: [dwr-user] Excluding properties when converting from JavaScript to Java objects



> I am a bit confused.  If b is not a part of Foo why are you setting it in
>  your JavaScript object?

It's a gui element representing this object (the user can manipulate
the data using the gui elements, and the structure is quite complex,
so i need a reference from each element to its gui element).

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

winmail.dat (5K) Download Attachment

Parent Message unknown Re: Excluding properties when converting from JavaScript to Java objects

by David Marginian-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I really don't know your situation but no matter the complexity I have
always been able to build objects and only send what is expected to the
back-end.  And I have been using DWR for about 4 years now dealing with a
lot of complex layouts.  My feeling is that there is an easier way.

From the sounds of it you are sending a div to the backend?  Is this true?

I can help you out further but I would need to see your html, js, the
object you are trying to save and the method you are calling to save it.  

See my comments below:

var jsObject = new Foo();
jsObject.a = 123;
jsObject.b = 456; // b is not part of Foo prototype!
Bar.saveFoo(jsObject, callbackFunction);
(Don't send b to the server then (are you saying this is a div, if that's
the case NO NO NO?).  I am still unclear why you are doing this.  You Build
your objects and just send what is needed to the server.)

DWR sends to the server:
// DWR does send it but you are telling it what to send. Not sure what your
expectation is here.

c0-scriptName=Bar
c0-methodName=saveFoo
c0-id=0
c0-e1=number:123
c0-e2=number:456
c0-param0=Object_Foo:{a:reference:c0-e1, b:reference:c0-e2}

and it doesn't matter if you change the converter to exclude the property b:

// This doesn't even make sense since b is not even a field on Foo.
// So I would expect it to have no affect.
<convert converter="bean" javascript="Foo" match="my.package.Foo">
     <param name="exclude" value="b"/>
</convert>



Original Message:
-----------------
From: Bruno Klava bklava@...
Date: Thu, 17 Apr 2008 17:13:08 -0300
To: users@...
Subject: Re: [dwr-user] Excluding properties when converting from
JavaScript to Java objects


> I am a bit confused.  If b is not a part of Foo why are you setting it in
>  your JavaScript object?

It's a gui element representing this object (the user can manipulate
the data using the gui elements, and the structure is quite complex,
so i need a reference from each element to its gui element).

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



--------------------------------------------------------------------
myhosting.com - Premium Microsoft® Windows® and Linux web and application
hosting - http://link.myhosting.com/myhosting



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Parent Message unknown RE: Excluding properties when converting from JavaScript to Java objects

by David Marginian-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I can see this scenario but I think we are dealing with something else
here.  I think there is a better way to approach it.  Regardless, I think
it is unreasonable to expect DWR to know what to send the server.  I think
the developer has to be responsible for what he sends to the server.  If
you want a skimmed down version of something create the skimmed down
version and pass that to the server.  

Original Message:
-----------------
From: Randy Jones randy_jones@...
Date: Thu, 17 Apr 2008 13:19:05 -0700
To: users@...
Subject: RE: [dwr-user] Excluding properties when converting from
JavaScript to Java objects


I've had the same problem with a JS Lib I'm using where I want to send some
of its objects to DWR, but it has alot of client side attributes for
graphics/handlers. I haven't found a way around it. DWR has nothing on the
client side to tell it to only send certain attributes of an object.
 
Randy

________________________________

From: Bruno Klava [mailto:bklava@...]
Sent: Thu 4/17/2008 4:13 PM
To: users@...
Subject: Re: [dwr-user] Excluding properties when converting from
JavaScript to Java objects



> I am a bit confused.  If b is not a part of Foo why are you setting it in
>  your JavaScript object?

It's a gui element representing this object (the user can manipulate
the data using the gui elements, and the structure is quite complex,
so i need a reference from each element to its gui element).

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...






--------------------------------------------------------------------
mail2web - Check your email from the web at
http://link.mail2web.com/mail2web



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


RE: Excluding properties when converting from JavaScript to Java objects

by Randy Jones-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

RE: [dwr-user] Excluding properties when converting from JavaScript to Java objects
I think it is basically the same situation. I agree it may not be DWR's job, but it would be nice if it was intelligent enough to know what to seralize to send to the server in cases like this. It is alot of code for me to rewrite everyobject I want to send to dwr if my api is say dojo (or build on dojo as is my case)...
 
"My feeling is that there is an easier way."
You're right and DWR handling it would be the easiest way from a developer's perspective instead of having to rebuild every object that has attributes you don't want to be sent. Again I'm not saying it should DWR's job, just playing devil's advocate with a hit of sympathy based on experience.
 
I'm glad you've been using DWR for so long, alot of us have and the community is growing.
 
Randy


From: david@... [mailto:david@...]
Sent: Thu 4/17/2008 4:37 PM
To: users@...
Subject: RE: [dwr-user] Excluding properties when converting from JavaScript to Java objects

I can see this scenario but I think we are dealing with something else
here.  I think there is a better way to approach it.  Regardless, I think
it is unreasonable to expect DWR to know what to send the server.  I think
the developer has to be responsible for what he sends to the server.  If
you want a skimmed down version of something create the skimmed down
version and pass that to the server. 

Original Message:
-----------------
From: Randy Jones randy_jones@...
Date: Thu, 17 Apr 2008 13:19:05 -0700
To: users@...
Subject: RE: [dwr-user] Excluding properties when converting from
JavaScript to Java objects


I've had the same problem with a JS Lib I'm using where I want to send some
of its objects to DWR, but it has alot of client side attributes for
graphics/handlers. I haven't found a way around it. DWR has nothing on the
client side to tell it to only send certain attributes of an object.

Randy

________________________________

From: Bruno Klava [bklava@...]
Sent: Thu 4/17/2008 4:13 PM
To: users@...
Subject: Re: [dwr-user] Excluding properties when converting from
JavaScript to Java objects



> I am a bit confused.  If b is not a part of Foo why are you setting it in
>  your JavaScript object?

It's a gui element representing this object (the user can manipulate
the data using the gui elements, and the structure is quite complex,
so i need a reference from each element to its gui element).

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...






--------------------------------------------------------------------
mail2web - Check your email from the web at
http://link.mail2web.com/mail2web



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



Parent Message unknown RE: Excluding properties when converting from JavaScript to Java objects

by David Marginian-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I definitely can see your point but I am thinking level of effort versus
usage.  It seems this is a pretty unique situation and the level of effort
to implement it in DWR may be pretty high (not sure).  

Original Message:
-----------------
From: Randy Jones randy_jones@...
Date: Thu, 17 Apr 2008 14:04:55 -0700
To: users@..., users@...
Subject: RE: [dwr-user] Excluding properties when converting from
JavaScript to Java objects


I think it is basically the same situation. I agree it may not be DWR's
job, but it would be nice if it was intelligent enough to know what to
seralize to send to the server in cases like this. It is alot of code for
me to rewrite everyobject I want to send to dwr if my api is say dojo (or
build on dojo as is my case)...
 
"My feeling is that there is an easier way."
You're right and DWR handling it would be the easiest way from a
developer's perspective instead of having to rebuild every object that has
attributes you don't want to be sent. Again I'm not saying it should DWR's
job, just playing devil's advocate with a hit of sympathy based on
experience.
 
I'm glad you've been using DWR for so long, alot of us have and the
community is growing.
 
Randy

________________________________

From: david@... [mailto:david@...]
Sent: Thu 4/17/2008 4:37 PM
To: users@...
Subject: RE: [dwr-user] Excluding properties when converting from
JavaScript to Java objects



I can see this scenario but I think we are dealing with something else
here.  I think there is a better way to approach it.  Regardless, I think
it is unreasonable to expect DWR to know what to send the server.  I think
the developer has to be responsible for what he sends to the server.  If
you want a skimmed down version of something create the skimmed down
version and pass that to the server.

Original Message:
-----------------
From: Randy Jones randy_jones@...
Date: Thu, 17 Apr 2008 13:19:05 -0700
To: users@...
Subject: RE: [dwr-user] Excluding properties when converting from
JavaScript to Java objects


I've had the same problem with a JS Lib I'm using where I want to send some
of its objects to DWR, but it has alot of client side attributes for
graphics/handlers. I haven't found a way around it. DWR has nothing on the
client side to tell it to only send certain attributes of an object.

Randy

________________________________

From: Bruno Klava [mailto:bklava@...]
Sent: Thu 4/17/2008 4:13 PM
To: users@...
Subject: Re: [dwr-user] Excluding properties when converting from
JavaScript to Java objects



> I am a bit confused.  If b is not a part of Foo why are you setting it in
>  your JavaScript object?

It's a gui element representing this object (the user can manipulate
the data using the gui elements, and the structure is quite complex,
so i need a reference from each element to its gui element).

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...






--------------------------------------------------------------------
mail2web - Check your email from the web at
http://link.mail2web.com/mail2web



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...






--------------------------------------------------------------------
mail2web LIVE – Free email based on Microsoft® Exchange technology -
http://link.mail2web.com/LIVE



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


RE: Excluding properties when converting from JavaScript to Java objects

by Randy Jones-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I don't know...since you're required to include a dwr generated js file
already it might be possible to have information in it that engine.js
uses to serialize less...but some converter information might need to be
added that's not there. Maybe I'll look at it after I get the JSON-RPC
stuff done.

Randy


-----Original Message-----
From: david@... [mailto:david@...]
Sent: Thursday, April 17, 2008 5:12 PM
To: users@...
Subject: RE: [dwr-user] Excluding properties when converting from
JavaScript to Java objects

I definitely can see your point but I am thinking level of effort versus
usage.  It seems this is a pretty unique situation and the level of
effort
to implement it in DWR may be pretty high (not sure).  

Original Message:
-----------------
From: Randy Jones randy_jones@...
Date: Thu, 17 Apr 2008 14:04:55 -0700
To: users@..., users@...
Subject: RE: [dwr-user] Excluding properties when converting from
JavaScript to Java objects


I think it is basically the same situation. I agree it may not be DWR's
job, but it would be nice if it was intelligent enough to know what to
seralize to send to the server in cases like this. It is alot of code
for
me to rewrite everyobject I want to send to dwr if my api is say dojo
(or
build on dojo as is my case)...
 
"My feeling is that there is an easier way."
You're right and DWR handling it would be the easiest way from a
developer's perspective instead of having to rebuild every object that
has
attributes you don't want to be sent. Again I'm not saying it should
DWR's
job, just playing devil's advocate with a hit of sympathy based on
experience.
 
I'm glad you've been using DWR for so long, alot of us have and the
community is growing.
 
Randy

________________________________

From: david@... [mailto:david@...]
Sent: Thu 4/17/2008 4:37 PM
To: users@...
Subject: RE: [dwr-user] Excluding properties when converting from
JavaScript to Java objects



I can see this scenario but I think we are dealing with something else
here.  I think there is a better way to approach it.  Regardless, I
think
it is unreasonable to expect DWR to know what to send the server.  I
think
the developer has to be responsible for what he sends to the server.  If
you want a skimmed down version of something create the skimmed down
version and pass that to the server.

Original Message:
-----------------
From: Randy Jones randy_jones@...
Date: Thu, 17 Apr 2008 13:19:05 -0700
To: users@...
Subject: RE: [dwr-user] Excluding properties when converting from
JavaScript to Java objects


I've had the same problem with a JS Lib I'm using where I want to send
some
of its objects to DWR, but it has alot of client side attributes for
graphics/handlers. I haven't found a way around it. DWR has nothing on
the
client side to tell it to only send certain attributes of an object.

Randy

________________________________

From: Bruno Klava [mailto:bklava@...]
Sent: Thu 4/17/2008 4:13 PM
To: users@...
Subject: Re: [dwr-user] Excluding properties when converting from
JavaScript to Java objects



> I am a bit confused.  If b is not a part of Foo why are you setting it
in
>  your JavaScript object?

It's a gui element representing this object (the user can manipulate
the data using the gui elements, and the structure is quite complex,
so i need a reference from each element to its gui element).

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...






--------------------------------------------------------------------
mail2web - Check your email from the web at
http://link.mail2web.com/mail2web



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...






--------------------------------------------------------------------
mail2web LIVE - Free email based on Microsoft(r) Exchange technology -
http://link.mail2web.com/LIVE



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Excluding properties when converting from JavaScript to Java objects

by Bruno Klava :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

My final solution was to modify the dwr.engine._serializeObject
function, inside the loop over the elements, to skip the serialization
of the undesired elements.

Like you said, it would be very nice to improve this in the DWR code,
avoiding the serialization of data that doesn't match the prototype
and will never be used on the server side.

Thanks for your help!
Bruno

On Thu, Apr 17, 2008 at 7:04 PM, Randy Jones <randy_jones@...> wrote:
> I don't know...since you're required to include a dwr generated js file
>  already it might be possible to have information in it that engine.js
>  uses to serialize less...but some converter information might need to be
>  added that's not there. Maybe I'll look at it after I get the JSON-RPC
>  stuff done.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


RE: Excluding properties when converting from JavaScript to Java objects

by mikewse :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Bruno,

It sound reasonable that DWR should prevent that. Could you create
a bug report at http://getahead.org/bugs ?

Best regards
Mike Wilson

> -----Original Message-----
> From: Bruno Klava [mailto:bklava@...]
> Sent: den 17 april 2008 21:33
> To: DWR Users
> Subject: Re: [dwr-user] Excluding properties when converting
> from JavaScript to Java objects
>
> > > Using black-lists in dwr.xml only excludes properties
> when converting from
> > Java objects to JavaScript objects.
> > Are you sure? I wasn't aware of this although the docs do
> only mention that
> > getters are excluded.
>
> Sorry. I should have explained it better.
> I meant that black-lists doesn't prevents DWR from sending data from
> JavaScript object properties that not match the corresponding Java
> class.
>
> For instance, if you have a class Foo
>
> public class Foo{
>
>      private int a;
>
>      public Foo(){
>      }
>
>      public int getA(){
>           return a;
>      }
>
>      public void setA(int a){
>           this.a = a;
>      }
>
> }
>
> a class Bar with a method saveFoo(), exposed through DWR,
>
> public void saveFoo(Foo foo){ ... }
>
> and you have the following JavaScript code:
>
> var jsObject = new Foo();
> jsObject.a = 123;
> jsObject.b = 456; // b is not part of Foo prototype!
> Bar.saveFoo(jsObject, callbackFunction);
>
> DWR sends to the server:
>
> c0-scriptName=Bar
> c0-methodName=saveFoo
> c0-id=0
> c0-e1=number:123
> c0-e2=number:456
> c0-param0=Object_Foo:{a:reference:c0-e1, b:reference:c0-e2}
>
> and it doesn't matter if you change the converter to exclude
> the property b:
>
> <convert converter="bean" javascript="Foo" match="my.package.Foo">
>      <param name="exclude" value="b"/>
> </convert>
>
>
> Althought b is, obviously, never setted in th foo object passed to the
> saveFoo method in the Bar class, the property is always included in
> the data sent to the server.
>
>
>
> In my case, the "b property" is a div element with hundreads other gui
> elements, so I get the "Max depth exceeded when dereferencing ..."
> error. What I need is not to send these properties data to the server,
> without setting then to "undefined".
>
> I hope my problem is more clear now ;)
>
>
> Thanks,
> Bruno
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...