Skip to content

Commit

Permalink
Exclude null viewId from mapped views
Browse files Browse the repository at this point in the history
Signed-off-by: avpinchuk <alexander.v.pinchuk@gmail.com>
  • Loading branch information
avpinchuk committed Oct 25, 2022
1 parent 04a42ea commit 9667337
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public UIViewRoot createView(FacesContext context, String viewId) {
}

// Check to see if jsftemplating should create the view
if (!this.isMappedView(viewId) || viewId == null) {
if (!this.isMappedView(viewId)) {
return _oldViewHandler.createView(context, viewId);
}

Expand Down Expand Up @@ -266,6 +266,9 @@ public UIViewRoot createView(FacesContext context, String viewId) {
* @since 1.2
*/
private boolean isMappedView(String viewId) {
if (viewId == null) {
return false;
}
if (this._viewMappings == null) {
String initParam = FacesContext.getCurrentInstance().getExternalContext().getInitParameterMap().get(VIEW_MAPPINGS);
this._viewMappings = SimplePatternMatcher.parseMultiPatternString(initParam, ";");
Expand Down Expand Up @@ -612,7 +615,7 @@ public UIViewRoot restoreView(FacesContext context, String viewId) {
}

// Perform default behavior...
if (viewId == null || !isMappedView(viewId)) {
if (!isMappedView(viewId)) {
return _oldViewHandler.restoreView(context, viewId);
}

Expand Down

0 comments on commit 9667337

Please sign in to comment.