%--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
See the License for the specific language governing permissions and
limitations under the License.
--%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@ taglib uri="http://portals.apache.org/pluto" prefix="pluto"%>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt"%>
<%response.setContentType("text/html; charset=UTF-8");%>
<%@ page import="java.util.List,java.util.ArrayList,java.util.Map,
org.apache.geronimo.pluto.impl.PageConfig,
org.apache.geronimo.console.navigation.TreeNode,
org.apache.geronimo.console.navigation.NavigationJsonGenerator"%>
<%
List pageConfigList=new ArrayList();
%>
<%
pageConfigList.add((PageConfig) (pageContext.getAttribute("page")));
%>
<%
List filteredPageConfigList = NavigationJsonGenerator.filterPagesByRole(pageConfigList,request);
NavigationJsonGenerator generator = new NavigationJsonGenerator(request.getLocale());
Map treeBasic = generator.getNavigationTree(filteredPageConfigList, "basic");
String treeJsonBasic = generator.generateTreeJSON(treeBasic, request.getContextPath(), "/images/ico_doc_16x16.gif", "basic", 8);
String listJsonBasic = generator.generateQuickLauncherJSON(treeBasic, request.getContextPath(), "/images/ico_doc_16x16.gif", "basic");
boolean isBasicTreeHasValidItem=generator.isTreeHasValidItem(treeBasic, "basic");
Map treeAll = generator.getNavigationTree(filteredPageConfigList, "all");
String treeJson = generator.generateTreeJSON(treeAll, request.getContextPath(), "/images/ico_doc_16x16.gif", "all", 8);
String listJson = generator.generateQuickLauncherJSON(treeAll, request.getContextPath(), "/images/ico_doc_16x16.gif", "all");
%>