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;
28 for (Iterator<MenuItem> listem = menu.asList().iterator(); listem.hasNext(); ) {
29 MenuItem item = listem.next();
30 String arrow = "image.hold.gif";
32 if (item.isSubItem()) {
35 %> <div id="article-separator"></div>
40 %> <div id="article-separator"></div>
43 if (item.isOpen()) arrow = "image.downarrow.png";
44 else arrow = "image.rightarrow.png";
47 String name = item.getLabel();
48 String icon = item.getIcon();
49 %> <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"/>)'">
50 <table width=100% border=0 cellspacing=0 cellpadding=0 class=menu>
51 <tr height=22 valign=middle>
52 <s:set var="menulabel"><%=name%></s:set>
53 <s:set var="menuicon">/skin/<%=icon%></s:set>
54 <s:set var="menuarrow">/skin/<%=arrow%></s:set>
55 <% if (item.isSelected()) {
57 %> <td background="<s:url value="/skin/image.highlighted.png"/>" width=20 align=center><img src="<s:url value="%{#menuicon}"/>" border="none" /></td>
59 %> <td background="<s:url value="/skin/image.highlighted.png"/>"> <s:text name="%{#menulabel}"/></td>
60 <td background="<s:url value="/skin/image.highlighted.png"/>" width=20 align=right><img src="<s:url value="%{#menuarrow}"/>" border="none" /></td>
63 %> <td width=20 align=center><img src="<s:url value="%{#menuicon}"/>" border="none" /></td>
65 String href = item.getAction();
67 String[] link = href.split("\\x3F"); // '?' character
68 %> <s:set var="menulink"><%=link[0]%></s:set>
69 <s:url id="item" namespace="%{#namespace}" action="%{#menulink}">
70 <% if (link.length > 1) {
71 link = link[1].split("\\x26"); // '&' character
72 for (int i=0; i<link.length; i++) {
73 String[] param = link[i].split("=");
74 %> <s:set var="menuitemparameter"><%=param[0]%></s:set>
75 <s:set var="menuitemvalue"><%=param[1]%></s:set>
76 <s:param name="%{#menuitemparameter}" value="%{#menuitemvalue}"/>
80 <td> <s:a href="%{#item}" cssClass="item"><s:text name="%{#menulabel}"/></s:a></td>
82 %> <td> <font color=#A1A192><s:text name="%{#menulabel}"/></font></td>
84 %> <td width=20 align=right><img src="<s:url value="%{#menuarrow}"/>" border="none" /></td>