Skip to content

Commit

Permalink
Add missing context path to UI pathInfo (#315)
Browse files Browse the repository at this point in the history
Fixes #252
  • Loading branch information
tsuoanttila authored Jun 1, 2018
1 parent 2a0ed9a commit 5943ba8
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,15 @@ public Class<? extends UI> getUIClass(
}
}

// Sometimes pathInfo does not contain leading slash
if (!pathInfo.isEmpty() && !pathInfo.startsWith("/")) {
pathInfo = "/" + pathInfo;
}

// Pass the path info to the UI through request
uiClassSelectionEvent.getRequest().setAttribute(
ApplicationConstants.UI_ROOT_PATH,
(pathInfo.startsWith("/") ? "" : "/") + pathInfo);
uiClassSelectionEvent.getRequest().getContextPath() + pathInfo);

return ui;

Expand Down

0 comments on commit 5943ba8

Please sign in to comment.