Scenarios:
This error is generally thrown in case where underlying tree model is changed & component changes (i.e. expanding or collapsing of nodes) are saved in state.
- Approach 1
treeTable.getDisclosedRowKeys().clear();
Note: But it will work only in case where tree is already being rendered & underlining model is changed as a part of partial submission.- Approach 2
org.apache.myfaces.trinidad.model.TreeModel uses ComponentChangesMapForSession API to support back button behavior or to save the state of TreeTable/tree. We can manually clear the changes stored in session map for respective pages.
FacesContext.getCurrentInstance().getExternalContext().getSessionMap().
remove("org.apache.myfaces.trinidadinternal.ComponentChangesMapForSession/oracle/webcenter/portalapp/pages/testPages/TestTree.jspx");
Hi!
ReplyDeleteThanks for your post... I'd earlier wondered how to get the page path and figured out it was the view Id (am i right?)
I still am running into the same exception..
do you have any suggestions?
Many thanks,
Suresh
And what is the ideal place where I'll add the Approach # 2?
ReplyDeleteDo i do it after i create a new ChidPropertyTreeModel?
I did that after populating the complete business tree & not ChildPropertyTreeModel. So you can try this, but it's prior to render. so behavior can't be predicted.
Delete