Sun, 17 May 2020 15:24:58 +0200
fixes sub-menu entries not mapping correctly due to buggy handling of trailing slash
1.1 --- a/src/main/java/de/uapcore/lightpit/AbstractLightPITServlet.java Sat May 16 17:22:45 2020 +0200 1.2 +++ b/src/main/java/de/uapcore/lightpit/AbstractLightPITServlet.java Sun May 17 15:24:58 2020 +0200 1.3 @@ -166,7 +166,8 @@ 1.4 || DataAccessObjects.class.isAssignableFrom(param); 1.5 } 1.6 if (paramsInjectible) { 1.7 - final String requestPath = "/" + mapping.get().requestPath(); 1.8 + final String requestPath = "/" + mapping.get().requestPath() 1.9 + + (mapping.get().menuKey().isBlank() ? "" : "/"); 1.10 1.11 if (mappings 1.12 .computeIfAbsent(mapping.get().method(), k -> new HashMap<>())
2.1 --- a/src/main/java/de/uapcore/lightpit/ModuleManager.java Sat May 16 17:22:45 2020 +0200 2.2 +++ b/src/main/java/de/uapcore/lightpit/ModuleManager.java Sun May 17 15:24:58 2020 +0200 2.3 @@ -155,7 +155,7 @@ 2.4 new ResourceKey( 2.5 mod.bundleBaseName(), 2.6 mod.menuKey()), 2.7 - mod.modulePath(), 2.8 + mod.modulePath()+"/", 2.9 mod.defaultPriority())) 2.10 .sorted() 2.11 .forEachOrdered(mainMenu::add);
3.1 --- a/src/main/webapp/WEB-INF/jspf/menu-entry.jspf Sat May 16 17:22:45 2020 +0200 3.2 +++ b/src/main/webapp/WEB-INF/jspf/menu-entry.jspf Sun May 17 15:24:58 2020 +0200 3.3 @@ -30,7 +30,7 @@ 3.4 data-active 3.5 </c:if> 3.6 > 3.7 - <a href="${menu.pathName}/"> 3.8 + <a href="${menu.pathName}"> 3.9 <fmt:bundle basename="${menu.resourceKey.bundle}"> 3.10 <fmt:message key="${menu.resourceKey.key}"/> 3.11 </fmt:bundle>