You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Heligon Sandra <sa...@nextream.fr> on 2002/09/18 09:45:07 UTC

Tiles menu- submenu

	I have defined the following classic layout

	<logo> 	<menu>
	------------------------------------------------------------------
			<body>
	------------------------------------------------------------------
			<footer>

	The menu is composed of several main items and sub-menus.
	When no sub-menu is visible I would like to have:
	
	<logo>  Home   Admin  Help
	------------------------------------------------------------------

	When an item with a sub-menu is selected I would like to have

	<logo>  Home   Admin  	     Help
	------------------------! -Content!  ------------------
			! -About   !
			!              !

	and I have

	<logo>  
		Home   Admin  	    Help
			-Content	
			-About   
	----------------------------------------------------------------

	Because the menu is defined as a sub-table in the second column of
the main table:

	classiclayout.jsp:

	<body bgcolor="#ffffff" text="#000000" link="#023264"
alink="#023264" vlink="#023264">
	<table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
	    <td width="140" valign="top" height="23"><tiles:insert
attribute="header" /></td>
	    <tiles:insert attribute="menu"/>
	  </tr>
	</table>

	and the menu.jsp:
				
	<table class="menubar" cellspacing="0" cellpadding="0" border="0"
width="100%">
	    <tr>
		<!-- boucle for on the main items count (Home, Admin, Help)
--!>
		<td>
		     <table class="menu" id="<tiles:getAsString
name="title"/>" border="0" cellspacing="1">
			<!--boucle for on the content on the sub-menu
(Conent, Help) --!>
				<tr>
				....
				</tr> 
		    </table>
		</td>
               <tr>
 	</table>

	I have an other problem I use Javascript events  onmouseover,
onmouseout	 to hide the sub-menu
	when the corresponding main item is not selected. But the first time
that the page is displayed
	all the sub-menus are displayed, by default I would like to display
no sub-menu, how is it possible ?

	I hope that someone will have an other solution to display
horizontal menu or remarks on my solution.
	Thanks a lot in advance.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>