You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Pat Quinn <pa...@hotmail.com> on 2003/08/01 10:48:44 UTC

RE: Dynamic Tree Menus --- HELP!!!

Thanks for you effort in resolving this issue its working perfectly now.

It might be a good idea to include the changes i've made to the 
DisplayMenuTag class i.e.

in the doStartTag() method after we fetch the menu from the repository we 
could add the following:

	/* If no menu was found in the repository*/
        if ( menu == null ) {

            /*check Request for menu component*/
            menu = (MenuComponent) 
this.pageContext.getRequest().getAttribute(this.name);

            /*check session for menu component*/
            if ( menu == null ) {
                menu = (MenuComponent) 
this.pageContext.getSession().getAttribute(this.name);
            }
        }

Anyways thanks again its really appreciated.

Pat



>From: "Raible, Matt" <Ma...@cable.comcast.com>
>Reply-To: "Struts Users Mailing List" <st...@jakarta.apache.org>
>To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
>Subject: RE: Dynamic Tree Menus --- HELP!!!
>Date: Thu, 31 Jul 2003 13:21:26 -0600
>
>Thanks Pat - I confirmed that this is a bug, and fixed it in CVS.  You can
>see an example at the following URL:
>
>http://raibledesigns.com/struts-menu/test1.jsp
>
>Download the updated JAR at:
>
>http://raibledesigns.com/downloads/struts-menu.jar
>
>or build struts-menu from CVS.
>
>HTH,
>
>Matt
>
>
>-----Original Message-----
>From: Pat Quinn [mailto:pat_quinn2009@hotmail.com]
>Sent: Thursday, July 31, 2003 9:47 AM
>To: struts-user@jakarta.apache.org
>Subject: RE: Dynamic Tree Menus --- HELP!!!
>
>
>I appreciate your kind offer my details are as follows:
>
>I've broken it down into a very basic example once you view this the third
>node will appear with a series of plus images.
>
>-----------------------
>Menu-Config.xml
>-----------------------
><?xml version="1.0" encoding="UTF-8" ?>
><MenuConfig>
>   <Displayers>
>     <Displayer   name="ListMenu"
>type="com.fgm.web.menu.displayer.ListMenuDisplayer"/>
>   </Displayers>
>   <Menus>
>
>     <Menu  name="test1"  title="test1"  description="test" width="200">
>        <Item   name="test2"   title="test2" width="200">
>            <Item   name="test3"   title="test3" width="200">
>                 <Item   name="test4"   title="test4" location="index.jsp"
>width="200"/>
>             </Item>
>        </Item>
>     </Menu>
>
>   </Menus>
>
></MenuConfig>
>
>-------------
>JSP Code
>-------------
><%@ taglib uri="/WEB-INF/struts-menu.tld" prefix="menu"%>
>
><menu:useMenuDisplayer name="ListMenu">
>     <menu:displayMenu name="test1"/>
></menu:useMenuDisplayer>
>
>
> >From: "Raible, Matt" <Ma...@cable.comcast.com>
> >Reply-To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> >To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
> >Subject: RE: Dynamic Tree Menus --- HELP!!!
> >Date: Thu, 31 Jul 2003 09:22:04 -0600
> >
> >I'm willing to help if you send me the code.  Which Displayer are you
> >using?
> >
> >Matt
> >
> >-----Original Message-----
> >From: Pat Quinn [mailto:pat_quinn2009@hotmail.com]
> >Sent: Thursday, July 31, 2003 9:20 AM
> >To: struts-user@jakarta.apache.org
> >Subject: Re: Dynamic Tree Menus --- HELP!!!
> >
> >
> >Is anyone out there working with dynamic HTML trees at the moment (i.e.
> >displaying data loaded from a data base) as i'm pulling my hair out here 
>at
> >the moment.
> >
> >I downloaded the source for Struts Menu and implemented a change to allow
> >me
> >
> >to place a java bean with my tree menu details into HttpSession rather 
>than
> >loading it from the menu xml file. Every thing works fine until i tried 
>to
> >add triple nested node to the tree and it totally screws up presentation
> >i.e. The node image is repeatedly displayed. Its not due to my changes as 
>i
> >tested it in the latest stable version and it fails also to render with 
>the
> >same results.
> >
> >I've also taken a look into using http://www.kobrix.com/ offering but 
>their
> >configuration requirements to integrate with struts seems abit too much 
>for
> >my liking.
> >
> >
> >
> >
> >Any suggestions, or should i just go find the JavaScript i require
> >elsewhere
> >
> >and wrap it with my own custom tag library....
> >
> >
> >
> > >From: "Pat Quinn" <pa...@hotmail.com>
> > >Reply-To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> > >To: struts-user@jakarta.apache.org
> > >Subject: Dynamic Html Tree Menus - Java Beans.
> > >Date: Thu, 31 Jul 2003 10:22:51 +0100
> > >
> > >I'm looking for a tag library to aid the rendering of a Tree Menu using
> > >session/request stored objects.
> > >I want to included the menu data as a Java Bean in HttpSession for each
> > >user and then use tag libs in my JSP's. I've looked into the StrutsMenu
> > >Offering for Dynamic Menus but it loads menu data from an XML file.
> > >
> > >Any ideas or am i better off to develop my own custom tag lib?
> > >
> > >_________________________________________________________________
> > >MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
> > >http://join.msn.com/?page=features/virus
> > >
> > >
> > >---------------------------------------------------------------------
> > >To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > >For additional commands, e-mail: struts-user-help@jakarta.apache.org
> > >
> >
> >_________________________________________________________________
> >The new MSN 8: advanced junk mail protection and 2 months FREE*
> >http://join.msn.com/?page=features/junkmail
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
>
>_________________________________________________________________
>MSN 8 with e-mail virus protection service: 2 months FREE*
>http://join.msn.com/?page=features/virus
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>

_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org