This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes XMLDecoder -> how to update the properties previously deserialized javabeans [newbie] Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "XMLDecoder -> how to update the properties previously deserialized javabeans [newbie]" Watch "XMLDecoder -> how to update the properties previously deserialized javabeans [newbie]" New topic
Author

XMLDecoder -> how to update the properties previously deserialized javabeans [newbie]

slacker
Greenhorn

Joined: Nov 15, 2001
Posts: 2
hi,
As this post is mostly about javabeans deserialization, I hope it won't be too much off-topic. I apologize if this is the case but I couldn't find a better place for that post in Javaranch.
We're developping the client part of a 3 tier application. The main principle is the following:
The application server delivers XML JInternalFrame descriptions to the client.
The client then deserializes them (and all their contained components) using an XMLDecoder and adds it to a JDesktopPane
Now let's say that the displayed data have been changed server side (let's say by another user).
As the client data must always be "in sync" with the serverside db, the server must send another XML document to the client describing the properties changes for it to update the frame components (tables or textfields let's say).
It seems that I can't use the XMLDecoder to achieve this : once the beans deserialized, it seems to lose all the references to them. We can only use the XMLDecoder "idref mechanism" with beans described in the current XML document.
What would be a good way to handle this?
Subclassing the XMLDecoder to make it keep the references to beans as long as the frames they're contained in aren't closed could be a solution but probably not a good one.
Anyone there would have an idea?
 
jQuery in Action, 2nd edition
 
subject: XMLDecoder -> how to update the properties previously deserialized javabeans [newbie]
 
Similar Threads
My SCEA Part 1Study Notes
long post IBM.158
JSF versus XFORMS
Applet in J2EE application
MVC is not object oriented??