If you set disclosedRowKeys to #{myBackingBean.disclosedRowKeys} you can
manipulate the disclosedRowKeys in your bean and also store it in a scope other
than the BackingBean's by popping and pushing it into the pageFlowScope. I used
the ViewController from shale to load the state from pageFlowScope on
initialization and push it back in prerender. That way I can manipulate the
rowKeys like a property and still have it stored in pageFlowScope.
If you don't use the viewcontroller you probably have to implement your getter
as lazy, i.e. check if bean in pageFlowScope is set and then return that
instance or create a new one.
Stefan
-----Ursprüngliche Nachricht-----
Von: Jochen Traunecker [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 14. Februar 2007 18:25
An: [email protected]
Betreff: [Trinidad] TreeTable: restoring expansion state
I'm wondering, how to store/restore the expansion state of a TreeTable.
Say there is some JSF-Page MyTreeTablePage containing a TreeTable and due to
some action invocation the page flow navigates to MyOtherPage. After navigating
back to MyTreeTablePage I'd like to restore the expansion state of the
TreeTable.
MyTreeTablePage
|
action->goto:MyOtherPage (store expansion state in PageFlowContext)
|
MyOtherPage
|
action->goto:MyTreeTabePage
|
MyTreeTablePage (restore expansion state out of PageFlowContext)
Any ideas when, where and how to restore the expansion state of the TreeTable?
I tried to set the TreeTable.setDisclosedRowKeys() triggered by PhaseListener
(before RenderResponse), but ran into Nullpointer exceptions.
___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de