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");