This Question is Answered

1 "correct" answer available (4 pts) 1 "helpful" answer available (2 pts)
7 Replies Last post: Jan 3, 2008 4:34 PM by Tatyana Matveyeva  
Auke van Leeuwen   10 posts since
Dec 20, 2007
Currently Being Moderated

Jan 2, 2008 1:30 PM

TreeTable, filters and expansionState

Happy new year!

 

Am I correct to say that there is no real easy way (i.e. standard functionality) to have all the nodes expanded if the 'treeTable' is in a 'filter-state'?

 

 

 

What I mean is that if the filter searchbox is not empty all the matching nodes are expanded, but otherwise the nodes are in a default (collapsed or some other dynamic expansion) state.

 

 

 

Apart from that I want to have my tree expanded to the point of a selected node, if this is loaded from a backing bean. So I have a

 

 

 

<q:singleNodeSelection nodeData="#{activityAgentTree.activityNode}" />

 

 

 

And it's loaded alright, but it's not expanded up until that level. Maybe someone can give me a few pointers on how to procede with that?

 

 

Tatyana Matveyeva   873 posts since
Aug 16, 2006
Currently Being Moderated
1. Jan 2, 2008 5:42 PM in response to: Auke van Leeuwen
Re: TreeTable, filters and expansionState

Hello Auke,

 

 

 

Yes, you are right, there is no way to expand nodes when the filter is applied. We will consider adding this feature in one of the future releases of QuipuKit.

 

 

 

 

 

 

 

Regarding your second question.  Unfortunately, I don't fully understand your use case. Are you trying to change selection from the backing bean and then expand the TreeTable up to the selected node?

 

 

 

 

 

 

 

Regards,

Tatyana

Tatyana Matveyeva   873 posts since
Aug 16, 2006
Currently Being Moderated
3. Jan 3, 2008 2:40 PM in response to: Auke van Leeuwen
Re: TreeTable, filters and expansionState

Hello,

 

It's still not clear. However, I'll try to explain as I understand it now. You have a TreeTable with a single selection enabled. The user can change the selection on the client-side. And also you need to save the selection, so when the page with the TreeTable is opened next time, the previously selected node is selected again. You are correctly using the nodeData attribute to save the selection.

 

And also the TreeTable has some default expansion state. As I understand, all nodes are collapsed. You want the TreeTable to be expanded up to the selected node when the page is opened. If you specify the expansionState attribute as binding, the expansion state will be saved.

 

And regarding your question about the code formating. At the present, there is no possibility to format a code snippets when you use the "Rich Text" editor. However, if you switch to the "Plain Text" editor, you can use the WIKI markup, including code formating (use the some code markup).

 

Regards,

Tatyana

Tatyana Matveyeva   873 posts since
Aug 16, 2006
Currently Being Moderated
5. Jan 3, 2008 3:53 PM in response to: Auke van Leeuwen
Re: TreeTable, filters and expansionState

Regarding selecting node in the backing bean on the first page load. From your code, it seems that you bind the nodeData attribute of the singleNodeSelection tag to the property of the TreeNode type. It is not correct, you should bind it to the property of the same type as the value attribute of the DataTable is bound to. If you set the initial value for this property, for example in constructor, it should be selected when the page is loaded first.

 

Regarding expanding one specific node. You should use the expansionState of the DynamicNodeExpansionState type. For more details please see the http://support.teamdev.com/message/2591 thread.

 

Any further questions are welcome.

 

Regards,

Tatyana

Tatyana Matveyeva   873 posts since
Aug 16, 2006
Currently Being Moderated
7. Jan 3, 2008 4:34 PM in response to: Auke van Leeuwen
Re: TreeTable, filters and expansionState

Sorry, yes you are right. I mean that it should be bound to the same type as an element in the list that is given to the nodeChildren attribute of the dynamicTreeStructure element.

More Like This

  • Retrieving data ...