Similarly to post http://forums.terracotta.org/forums/posts/list/1045.page for a JCheckBox, I am now trying to share a JTextField across clustered Terracotta client GUIs. I tried to use javax.swing.text.PlainDocument as the shared model defined in ROOT similar to how the JCheckBox sample worked, but I am stuck with errors arond javax.swing.text.AbstractDocument not being non-portable. I tried the Ecilpse built-in "helper" features of the debugger to attempt to add locks and so on, but I cannot get it working.
Anyone has sample code for this? I am building a PoC and want to showcase this. I know that my issue is Swing lack of knowledge, but I cannot help that right now. :)
Instead of turning PlainDocument as root, which would drag an entire tree of classes with it (including classes that might not be TC portable at all/yet) it would be simpler in this case if create your own application's model that could be observed or that could send out notifications to update the model that your view uses.
Joined: 12/05/2006 10:22:37
Messages: 247
Location: Terracotta, Inc.
Online
Find attached an update to the CheckBoxTest Eclipse project that adds a new TextField sample that adapts the TextField's document to a SharedString that is shared.