Hi, gentlemen!

 

I need to have some complex solution with the Tree. It must the panel
with checkbox and label separately editable. Default editor that is set
inside of the UITree is unacceptable for that. I have decided not to use
editor at all and set editor exactly to the JTree at client side:

 

public class UITree extends com.ulcjava.base.client.UITree

{

...

            @Override

            protected void postInitializeState()

            {

                        super.postInitializeState();

                        JTree tree = getBasicTree();

                        tree.setCellEditor(new TreeCellEditor(tree,
(DefaultTreeCellRenderer)treeRendererComponent.getTreeCellRenderer(),
tree.isEditable()));

                        tree.setEditable(true);

            }

...

}

 

I want to intercept changed values for the label to handle them manually
but haven't find any idea how. In the case where no cell editor is set
on the server side but ULC modules is called as result of changed values
exception occurs.

 

2      21.04.2007 19:28:38.745   1.000  SEVERE Thread[ULC Communication
Controller Thread,6,main]       com.ulcjava.base.server.ULCSession
processRequests      got exception while processing
[java.lang.UnsupportedOperationException: this tree model implementation
does not support updates to the model.

       at
com.ulcjava.base.application.tree.AbstractTreeModel.valueForPathChanged(
AbstractTreeModel.java:40)

       at
com.ulcjava.base.server.ULCTreeModelAdapter.updateCellValues(ULCTreeMode
lAdapter.java:57)

       at
com.ulcjava.base.server.ULCTreeModelAdapter$ULCTreeModelAdapterDispatche
r.updateCellValues(ULCTreeModelAdapter.java:3)

       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)

       at java.lang.reflect.Method.invoke(Unknown Source)

       at
com.ulcjava.base.shared.internal.ReflectionUtilities.invokeMethod(Reflec
tionUtilities.java:47)

       at com.ulcjava.base.application.ULCProxy.d(ULCProxy.java:31)

       at
com.ulcjava.base.application.ULCProxy.handleRequest(ULCProxy.java:30)

       at com.ulcjava.base.server.ULCSession.a(ULCSession.java:22)

       at
com.ulcjava.base.server.ULCSession.processRequests(ULCSession.java:194)

       at
com.ulcjava.base.development.DevelopmentContainerAdapter.processRequests
(DevelopmentContainerAdapter.java:2)

       at
com.ulcjava.base.development.DevelopmentConnector.sendRequests(Developme
ntConnector.java:25)

       at com.ulcjava.base.client.UISession$l_.run(UISession$l_.java:38)

       at java.lang.Thread.run(Unknown Source)

]

 

I see ULCTreeModelAdapter and UITreeModelAdapter pair in the reference
but not in the PDF documentation on how to use them.

 

Can somebody help me with easiest method on how to intercept changed
value in the tree item to handle it manually?

 

 

~~~~~~~~~~~~~~~~~~~~~~

Vitaliy Tkachenko

Senior Software Engineer

Mirasoft

 

E-mail: [EMAIL PROTECTED]

Work phone: +380 44 4929960

Cellular phone: +380 66 7406009

ICQ: 40299155
<http://www.icq.com/people/cmd.php?uin=40299155&action=add> 

Skype: virtualvat

 

 

Reply via email to