final String requestPath = new URL(requestUrl).getPath();
@SuppressWarnings("unchecked")
- final NI match = (NI) rootNavigationItem
- .getMatchingNavigationItem(requestPath);
+ final NI match = (NI) rootNavigationItem.getMatchingNavigationItem(requestPath);
if (match != null)
return match;
@SuppressWarnings("unchecked")
public String getTopMenu(final HttpServletRequest request) {
- final String currentLocale = localeConfiguration
- .detectCurrentLocale(request);
+ final String currentLocale = localeConfiguration.detectCurrentLocale(request);
final NI selectedItem = getSelectedItem(request);
final StringBuffer result = new StringBuffer();
- result.append("<div class=\""
- + getGetNotNullString(rootNavigationItem.getCssPrefix())
- + "navigationMenu\">");
+ result.append("<div class=\"" + getGetNotNullString(rootNavigationItem.getCssPrefix()) + "navigationMenu\">");
- for (final NI item : (List<NI>) getRootNavigationItem()
- .getSubElements()) {
+ for (final NI item : (List<NI>) getRootNavigationItem().getSubElements()) {
if (item == selectedItem)
- result.append("<a class=\""
- + getGetNotNullString(item.getCssPrefix())
- + "menuItemSelected\" href=\"" + item.getLinkUrl()
- + "\">");
+ result.append("<a class=\"" + getGetNotNullString(item.getCssPrefix()) + "menuItemSelected\" href=\""
+ + item.getLinkUrl() + "\">");
else
- result.append("<a class=\""
- + getGetNotNullString(item.getCssPrefix())
- + "menuItem\" href=\"" + item.getLinkUrl() + "\">");
+ result.append("<a class=\"" + getGetNotNullString(item.getCssPrefix()) + "menuItem\" href=\""
+ + item.getLinkUrl() + "\">");
result.append("<div>" + item.getTitle(currentLocale) + "</div>");
result.append("</a>");