FW: [thelist] JSP Help

Ani Phelan aphelan at ajava.biz
Tue Jun 8 18:31:08 CDT 2004


That could work, but what about all the other pages on the site? For
every page that isn't Wireless or Switches, I want to load Routers
expanded..

 
             ani phelan 
             aphelan at ajava.biz
                 p: 800.786.2885
                 f.   714.774.7881

-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org] On Behalf Of Hassan Schroeder
Sent: Tuesday, June 08, 2004 3:45 PM
To: thelist at lists.evolt.org
Subject: Re: FW: [thelist] JSP Help

Ani Phelan wrote:

> I don't want the nav to behave differently; I just want to be able to
> open additional navs, such as Wireless and Security, without the
Routers
> nav staying open. With the code as it is, if I write the treenodeshow
> class to Wireless, then when I open Wireless, Routers will stay
open...

Uh, that's not what I'm seeing; when I click on Wireless, I see a
"Coming Soon" in a sub-list but the Routers list collapses -- hence
my confusion :-)

However,

> <%
>             if (onPage.startsWith("/cisco/systems/switches/"))
>             OR (onPage.startsWith("/cisco/systems/wireless/"))
>             {
>             %>
> 
>             <%
>             }
>             else
>             {
> 		%>
>                 class="treenodeshow"                  
>             <%
>             }
>             %>
> 
> In the Routers <li class=""> would do the trick... except that that ^
of
> course, isn't valid...

? So call it class="dummy", or "null" or something.

<%
	String routerClass   = "null";
	String switchesClass = "null";
	String wirelessClass = "null";
	if (onPage.startsWith("/cisco/systems/routers/")) {
	  routerClass = "treenodeshow"; }
	if (onPage.startsWith("/cisco/systems/switches/")) {
	  switchClass = "treenodeshow"; }
	if (onPage.startsWith("/cisco/systems/wireless/")) {
	  wirelessClass = "treenodeshow"; }
%>
<li class="<%= routerClass %>">Routers
  ...
<li class="<%= switchesClass %>"> Switches
  ...
<li class="<%= wirelessClass %>"> Wireless
  ...

Note: this approach also minimizes the curly-brace proliferation of
the original code :-)

FWIW!
-- 
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                           dream.  code.


-- 
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 



More information about the thelist mailing list