<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %> <%@ page import="java.util.Iterator" %> <%-- Menu Layout This layout render a menu with links. It takes as parameter the title, and a list of items. Each item is a bean with following properties : value, href, icon, tooltip. @param title Menu title @param items list of items. Items are beans whith following properties : --%> <%-- Push tiles attributes in page context --%> <%-- iterate on items list --%> <% // Add site url if link start with "/" String link = item.getLink(); if(link.startsWith("/") ) link = request.getContextPath() + link; %>
<%=item.getValue()%> <% // Add site url if link start with "/" String icon = item.getIcon(); if(icon.startsWith("/") ) icon = request.getContextPath() + icon; %> <bean:write name="item" property="tooltip" scope="page" ignore="true"/>