<%@ page language="java" contentType="text/html; charset=utf-8"%> <%@ page import="java.util.List"%> <%@ page import="com.eactive.eai.rms.common.acl.sitemap.ui.SitemapNode"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%! private void printNodeLabel(javax.servlet.jsp.JspWriter out, SitemapNode node) throws java.io.IOException { String url = node.getMenuUrl(); boolean hasLink = url != null && !url.trim().isEmpty() && !"NAN".equalsIgnoreCase(url.trim()); if (hasLink) { out.print("" + escapeHtml(node.getMenuName()) + ""); } else { out.print("" + escapeHtml(node.getMenuName()) + ""); } } private void printSitemapNode(javax.servlet.jsp.JspWriter out, SitemapNode node) throws java.io.IOException { out.print("
  • "); printNodeLabel(out, node); List children = node.getChildren(); if (children != null && !children.isEmpty()) { out.print(""); } out.print("
  • "); } private String escapeHtml(String value) { if (value == null) { return ""; } return value.replace("&", "&").replace("<", "<").replace(">", ">").replace("\"", """); } private String escapeJs(String value) { if (value == null) { return ""; } return value.replace("\\", "\\\\").replace("'", "\\'"); } %> <% response.setHeader("Pragma", "No-cache"); response.setHeader("Cache-Control", "no-cache"); response.setHeader("Expires", "0"); List sitemapTree = (List) request.getAttribute("sitemapTree"); %>
    <% for (SitemapNode category : sitemapTree) { %>
    <% printNodeLabel(out, category); %>
      <% List children = category.getChildren(); if (children != null) { for (SitemapNode child : children) { printSitemapNode(out, child); } } %>
    <% } %>