Skip to content

Commit

Permalink
Revert restore view map
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Pinčuk <alexander.v.pinchuk@gmail.com>
  • Loading branch information
avpinchuk committed Oct 8, 2023
1 parent e84178e commit 62c6549
Showing 1 changed file with 1 addition and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,21 +247,8 @@ public UIViewRoot createView(FacesContext context, String viewId) {
}

// Restore the current UIViewRoot.
// Because new UIViewRoot was temporary set, this will clear
// view map, which also contains our "page session".
// Thus we need reset a new view root's view map after restore original
// view root.
if (currentViewRoot != null) {
Map<String, Object> pageSession = viewRoot.getViewMap(false);
if (pageSession != null) {
pageSession = new HashMap<>(pageSession);
}

if (currentViewRoot != null) {
context.setViewRoot(currentViewRoot);

if (pageSession != null) {
viewRoot.getViewMap().putAll(pageSession);
}
}

// Return the populated UIViewRoot
Expand Down

0 comments on commit 62c6549

Please sign in to comment.