Re: [PROPOSAL] Keel look and feel (Attn: Pierre)

Shash Chatterjee <[email protected]>
Newsgroups gmane.comp.java.keel.devel
Message-ID <[email protected]>
menubar.jsp attached this time!
menubar.jsp (text/plain, 3.2 KB)
<jsp:directive.page language="java" />

<%-- The output from this jsp can be included anywhere in the (X)HTML page.
     It uses the app-navigate parameter "menu" to make nested lists.
     
     No Javascript here, only CSS!
     
     Note: when the cursor goes out of any menu area, all the submenus vanish
           *immediatly*. To get some latence time, Javascript is needed.
     
     --%>


<div id="navbar">
<c:if test="${! empty menu}">
	<ul class="level1">
		<c:forEach var="topelement" items="${menu.map['nested']}">
			<li class="submenu"><a href=""><c:out value="${topelement.map['attributes'].map['title']}" /></a>
			<ul class="level2">
				<c:forEach var="secondelement" items="${topelement.map['nested']}">
					<c:set var="secondelement_parameters" value="" />
					<c:if test="${!empty secondelement.map['attributes'].map['model']}">
						<c:set var="secondelement_model" value="${secondelement.map['attributes'].map['model']}" />
						<c:url var="secondelement_path" value="/model.do?model=${secondelement_model}" />
						<c:if test="${!empty secondelement.map['attributes'].map['parameters']}">
							<c:set var="secondelement_parameters" value="${secondelement.map['attributes'].map['parameters']}" />
						</c:if>
					</c:if>
					<c:if test="${empty secondelement.map['attributes'].map['model']}">
						<c:url var="secondelement_path" value="" />
						<c:if test="${!empty secondelement.map['attributes'].map['url']}">
							<c:set var="secondelement_url" value="${secondelement.map['attributes'].map['url']}" />
							<c:url var="secondelement_path" value="${secondelement_url}" />
						</c:if>
					</c:if>
					<li class="submenu"><a href='<c:out value="${secondelement_path}"/><c:out value="${secondelement_parameters}"/>'><c:out
						value="${secondelement.map['attributes'].map['title']}" /></a><c:if test="${!empty secondelement.map['nested']}">
						<span>&gt;</span>

						<ul class="level3">
							<c:forEach var="thirdelement" items="${secondelement.map['nested']}">
								<c:set var="thirdelement_parameters" value="" />
								<c:if test="${!empty thirdelement.map['attributes'].map['model']}">
									<c:set var="thirdelement_model" value="${thirdelement.map['attributes'].map['model']}" />
									<c:url var="thirdelement_path" value="/model.do?model=${thirdelement_model}" />
									<c:if test="${!empty thirdelement.map['attributes'].map['parameters']}">
										<c:set var="thirdelement_parameters" value="${thirdelement.map['attributes'].map['parameters']}" />
									</c:if>
								</c:if>
								<c:if test="${empty thirdelement.map['attributes'].map['model']}">
									<c:url var="thirdelement_path" value="" />
									<c:if test="${!empty thirdelement.map['attributes'].map['url']}">
										<c:set var="thirdelement_url" value="${thirdelement.map['attributes'].map['url']}" />
										<c:url var="thirdelement_path" value="${thirdelement_url}" />
									</c:if>
								</c:if>
								<li><a href='<c:out value="${thirdelement_path}"/><c:out value="${thirdelement_parameters}"/>'><c:out
									value="${thirdelement.map['attributes'].map['title']}" /></a></li>
							</c:forEach>
						</ul>
					</c:if></li>
				</c:forEach>
			</ul>
			</li>
		</c:forEach>
	</ul>
</c:if> <%-- menu --%>
</div>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.