Skip to main content

Find does not locate collapsed tree nodes

3 replies [Last post]
sbozian
Offline
Joined: 2010-08-30
Points: 0

Hello,

I am using the JXTreeTable component. I noticed that if I search the tree table using Find (Ctrl+F), Find can only locate expanded nodes.

Shouldn't it also 'detect' collapsed nodes? At least if a node has been once expanded then collapsed back!

Thank you,
Shant

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
sbozian
Offline
Joined: 2010-08-30
Points: 0

Hi again,

I forgot to mention that I am aware that doFind() method in JXTable "starts a search on this List's visible items", so for example if a table was filtered and some rows were eliminated by the filter, it makes sense that Find (Ctrl+F) cannot locate them. It doesn't make much sense to use Ctrl+F when a filter is there anyway.

But my concern is with JXTree os JXTreeTable where filtering is not available yet. Wouldn't it make sense for Find (Ctrl+F) to locate a collapsed node? Otherwise, that means that one has to expand all roots inside the tree before he/she can start to search it!

I would like to know if it possible to configure this in the code, something related to the Searchable component which is passed inside doFind() perhaps?

Thank you,
Shant

kleopatra
Offline
Joined: 2003-06-11
Points: 0

[quote=sbozian]

But my concern is with JXTree os JXTreeTable where filtering is not available yet. Wouldn't it make sense for Find (Ctrl+F) to locate a collapsed node? Otherwise, that means that one has to expand all roots inside the tree before he/she can start to search it!

[/quote]

agreed, but not supported. Searching is done by accessing the model via the ComponentAdapter which is not particularly well suited for hierarchical structures. Some years back I've seen a sample that automatically expanded/collapsed the nodes just for accessing them, forgot where that was.

A custom Searchable sounds like a good idea, might walk the tree internally and only expand on a match. Contributions welcome :-)

Cheers, Jeanette

 

sbozian
Offline
Joined: 2010-08-30
Points: 0

Thanks for your reply Jeanette.

Regards,
Shant