HierarchicalTable expandAll problem

This forum is used by users to request and discuss new product features. Please do not use this forum for technical support including bug reports.

Moderator: JIDE Support

Forum rules
Product suggestions only. Please do not use this forum for technical support including bug reports.

HierarchicalTable expandAll problem

Postby amrithrajv » Mon Dec 21, 2009 11:31 pm

Hi,

We are using HierarchicalTable in our product. At one point in time, we are calling expandAll on HierarchicalTable object to expand the contents. The individual rows in this table are also instances of other HierarchicalTable objects which again contain other HierarchicalTable children like a tree display. But only the top level rows are expanded after this call. Is there a way to expand all the objects in a HierarchicalTable in a single call?. If now, at least is there a way to easily get the child instances of a HierarchicalTable object so that I can iterate through them and call expandRow on them.


Thanks In Advance,
Amrith
amrithrajv
 
Posts: 2
Joined: Mon Dec 21, 2009 11:20 pm

Re: HierarchicalTable expandAll problem

Postby JIDE Support » Tue Dec 22, 2009 8:08 am

Please invoke HierarchicalTable#getChildComponentAt(int) to iterate the child components. As you can see from the interface, the return value of that method could be any Component instance although it is also HierarchicalTable in your application. That's the reason that we are not able to expand the second level nodes just like we do in TreeTable.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: HierarchicalTable expandAll problem

Postby amrithrajv » Tue Dec 22, 2009 8:30 pm

Thanks for your reply. I am using version 1.4 of HierarchicalTable and it looks like getChildComponentAt method is not present there. Is there any other way to achieve this in 1.4 using any other APIs.

Thanks..
amrithrajv
 
Posts: 2
Joined: Mon Dec 21, 2009 11:20 pm

Re: HierarchicalTable expandAll problem

Postby JIDE Support » Tue Dec 22, 2009 8:57 pm

Are you sure it is JIDE version 1.4? That's a version released back in 2004 which is really old. I don't think we have HierarchicalTable component at that time.

We didn't have other APIs available for the purpose before we had getChildComponenetAt() since version 2.2.7.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: HierarchicalTable expandAll problem

Postby Alexander_Belarus » Wed Jun 09, 2010 6:08 am

Hi again JIDE Support.
I'm continue working on this issue after updating to the 2.9.2 version.

Now we can Iterate using <HierarchicalTable>.getChildComponentAt(row), but it returns TreeLikeHierarchicalPanel.
Of course in createChildComponent() method of HierarchicalTable we are using
return new TreeLikeHierarchicalPanel(new FitScrollPane(hierarchicalTable));

My question is: how can I get HierarchicalTable from TreeLikeHierarchicalPanel?

Thank you.
Alexander_Belarus
 
Posts: 2
Joined: Mon May 31, 2010 5:20 am

Re: HierarchicalTable expandAll problem

Postby JIDE Support » Wed Jun 09, 2010 10:07 am

Since you create the child component, you would be able to know the component hierarchy much better than JIDE. It's easy for you to get the inside HierarchicalTable by invoking Container#getComponent().

JIDE also provides a generalized solution for you to look up a specified component inside a container. Please try to use JideSwingUtilities#setRecursively(Component, Handler). In the Handler#condition() method, just check if the component is an instance of HierarchicalTable. In the action() or postAction() method, record that component to a gloabl variable. Then you would be able to use the global variable, which is null or the HierarchicalTable you are looking for.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: HierarchicalTable expandAll problem

Postby Alexander_Belarus » Thu Jun 10, 2010 8:23 am

The problem is:
I have HierarchicalTable and children of this table are TreeLikeHierarchicalPanel's, we need to have TreeLike appearance and so we're using
new TreeLikeHierarchicalPanel(new FitScrollPane(hierarchicalTable)

It means that childrens of Main HierarchicalTable are TreeLikeHierarchicalPanel's and I can't expand all rows in a tree, only Main HierarchicalTable is expanded.
I iterate through the list of children using <HierarchicalTable>.getChildComponentAt(row) and get TreeLikeHierarchicalPanel.
For TreeLikeHierarchicalPanel I get list of all components in a container and Iterate through them and try to find HierarchicalTable.
So success.

Where I'm wrong?
Thank you.
Alexander_Belarus
 
Posts: 2
Joined: Mon May 31, 2010 5:20 am

Re: HierarchicalTable expandAll problem

Postby JIDE Support » Thu Jun 10, 2010 9:14 am

Since it is just a tree like panel, it means that it looks like a tree. However, the children tables are created separatly with the main HierarchicalTable. You have to iterate the children to expand "all" levels. From JIDE point of view, you could create another HierarchicalTable or just a normal panel at the createChildComponent() method, so we are not able to provide an interface for you to expand "all" levels.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am


Return to Product Suggestions

Who is online

Users browsing this forum: No registered users and 13 guests

cron