« Return to Thread: Excluding properties when converting from JavaScript to Java objects

RE: Excluding properties when converting from JavaScript to Java objects

by Randy Jones-2 :: Rate this Message:

Reply to Author | View in Thread

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@...


 « Return to Thread: Excluding properties when converting from JavaScript to Java objects

LightInTheBox - Buy quality products at wholesale price