Hi Vitaliy,

Right now it is not possible to set a checkbox editor on ULCTree:
https://www.canoo.com/jira/browse/UBA-6920

However you can do it on ULCTableTree and use a single column TableTree as
shown here:

http://lists.canoo.com/mailman/private/ulc-developer/2003/000407.html

Or you can implement a custom editor as described here:

http://lists.canoo.com/mailman/private/ulc-developer/2005/003334.html

ULCTreeModelAdapter is an internal class and not part of API class.

I hope this helps.

Thanks and regards

Janak

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Vitaliy Tkachenko
Sent: Saturday, April 21, 2007 10:03 PM
To: [email protected]
Subject: [ULC-developer] Tree complex solution


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(Abst
ractTreeModel.java:40)
       at
com.ulcjava.base.server.ULCTreeModelAdapter.updateCellValues(ULCTreeModelAda
pter.java:57)
       at
com.ulcjava.base.server.ULCTreeModelAdapter$ULCTreeModelAdapterDispatcher.up
dateCellValues(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(Reflection
Utilities.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(Dev
elopmentContainerAdapter.java:2)
       at
com.ulcjava.base.development.DevelopmentConnector.sendRequests(DevelopmentCo
nnector.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
Skype: virtualvat



_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer

Reply via email to