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

Excluding properties when converting from JavaScript to Java objects

by Bruno Klava :: Rate this Message:

Reply to Author | View in Thread

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

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