1 <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
2 pageEncoding="ISO-8859-1"
4 <%@ page import="java.util.Iterator"%>
5 <%@ page import="org.splat.wapp.Menu"%>
6 <%@ page import="org.splat.wapp.MenuItem"%>
7 <%@ page import="org.splat.simer.Action"%>
8 <%@page import="com.opensymphony.xwork2.ActionContext"%>
9 <%@ taglib prefix="s" uri="/struts-tags"%>
11 <s:set var="menuname" value="leftMenuSettings.menuName" />
12 <s:set var="namespace" value="leftMenuSettings.menuNamespace" />
14 <!-- Display of the menu tab
17 <span id="tab-front"> <s:text name="title.%{#menuname}"/> </span>
21 <!-- Display of menu items
25 Action anAction = (Action)ActionContext.getContext().getActionInvocation().getAction();
26 Menu menu = anAction.getLeftMenuSettings().getMenu();
27 boolean submenu = false;
29 <s:if test="leftMenuSettings.menu != null">
31 for (Iterator<MenuItem> listem = menu.asList().iterator(); listem.hasNext(); ) {
32 MenuItem item = listem.next();
33 String arrow = "image.hold.gif";
35 if (item.isSubItem()) {
38 %> <div id="article-separator"></div>
43 %> <div id="article-separator"></div>
46 if (item.isOpen()) arrow = "image.downarrow.png";
47 else arrow = "image.rightarrow.png";
50 String name = item.getLabel();
51 String icon = item.getIcon();
52 %> <div id="article-item" onMouseOver="this.style.backgroundImage='url(<s:url value="/skin/image.highlighted.png"/>)'" onMouseOut="this.style.backgroundImage='url(<s:url value="/skin/image.white.png"/>)'">
53 <table width=100% border=0 cellspacing=0 cellpadding=0 class=menu>
54 <tr height=22 valign=middle>
55 <s:set var="menulabel"><%=name%></s:set>
56 <s:set var="menuicon">/skin/<%=icon%></s:set>
57 <s:set var="menuarrow">/skin/<%=arrow%></s:set>
58 <% if (item.isSelected()) {
60 %> <td background="<s:url value="/skin/image.highlighted.png"/>" width=20 align=center><img src="<s:url value="%{#menuicon}"/>" border="none" /></td>
62 %> <td background="<s:url value="/skin/image.highlighted.png"/>"> <s:text name="%{#menulabel}"/></td>
63 <td background="<s:url value="/skin/image.highlighted.png"/>" width=20 align=right><img src="<s:url value="%{#menuarrow}"/>" border="none" /></td>
66 %> <td width=20 align=center><img src="<s:url value="%{#menuicon}"/>" border="none" /></td>
68 String href = item.getAction();
70 String[] link = href.split("\\x3F"); // '?' character
71 %> <s:set var="menulink"><%=link[0]%></s:set>
72 <s:url id="item" namespace="%{#namespace}" action="%{#menulink}">
73 <% if (link.length > 1) {
74 link = link[1].split("\\x26"); // '&' character
75 for (int i=0; i<link.length; i++) {
76 String[] param = link[i].split("=");
77 %> <s:set var="menuitemparameter"><%=param[0]%></s:set>
78 <s:set var="menuitemvalue"><%=param[1]%></s:set>
79 <s:param name="%{#menuitemparameter}" value="%{#menuitemvalue}"/>
83 <td> <s:a href="%{#item}" cssClass="item"><s:text name="%{#menulabel}"/></s:a></td>
85 %> <td> <font color=#A1A192><s:text name="%{#menulabel}"/></font></td>
87 %> <td width=20 align=right><img src="<s:url value="%{#menuarrow}"/>" border="none" /></td>