This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information

Expand/Collapse Tree

Frequently asked questions about VisionX.

Expand/Collapse Tree

Postby lucdep » Mon Dec 03, 2018 8:14 pm

Hello,

Is there a method to expand/collapse a tree structure or part of a tree structure (eg down the selected node)?

Thanks for your help.

Luc Depuydt
lucdep
 
Posts: 53
Joined: Wed Oct 10, 2018 12:01 pm

Re: Expand/Collapse Tree

Postby Support@SIB » Tue Dec 04, 2018 1:16 pm

Do you have a self-joined tree?

You could use, e.g:

Syntax: [ Download ] [ Hide ]
Object oSearch = rowSearch.getValue("PROGRAM");

DataBookUtil.searchAndSelectRow(rdbMenu,
                                new Equals("PROGRAM", oSearch).or(
                                    new Equals("PROGRAMNUMBER", oSearch)))
 
User avatar
Support@SIB
 
Posts: 353
Joined: Mon Sep 28, 2009 1:56 pm

Re: Expand/Collapse Tree

Postby lucdep » Tue Dec 04, 2018 4:59 pm

Hi,

Yes, I have a self joined table and filling the tree goes fine.
My problem is when I populate the tree component, the data tree is completely collapsed to the root. I would like to have a button with which the user can expand or open the tree completely to the last child, instead of having to click all the nodes one by one now. I know Windows tree object have such a method that can be invoked, but it is not clear if Swing/Vaadin components support this as well.
lucdep
 
Posts: 53
Joined: Wed Oct 10, 2018 12:01 pm

Re: Expand/Collapse Tree

Postby lucdep » Mon Jan 07, 2019 4:27 pm

Hi,

I would like to come back to this unsolved question. Does the Tree object have Expand and Collapse methods that can be used from within the code?

It seems that expandig/collapsing a tree in VisionX/JVx is only implemented for clicking physically with the mouse on a node, but I need expanding/collapsing from within the code. As far as I can see the Vaadin and Swing objects do have the methods. How can I use them?

Regards,,

Luc
lucdep
 
Posts: 53
Joined: Wed Oct 10, 2018 12:01 pm

Re: Expand/Collapse Tree

Postby rjahn » Tue Jan 08, 2019 10:28 pm

The UI concept is documented very well: Resource and UI Resource.

This should explain how you can use the technology dependent object. But be careful to keep the technology independence!
rjahn
 
Posts: 41
Joined: Sun Sep 13, 2009 1:54 pm


Return to VisionX