<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %> <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %> <%@ taglib uri="http://struts.apache.org/tags-tiles" 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"/>