Do you have some code to show how you are doing this?

Steven

-----Original Message-----
From: O'Reilly John [mailto:[EMAIL PROTECTED]] 
Sent: Friday, July 20, 2001 6:54 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Tree


We are using Cocoon for our presentation (using XML/XSP/XSL).  What we have
done is to store menus in static XML files.  In response to a request an
action (making use of a menu manager) can load a specific menu.  If the
action originated from selecting a menu option then that option is modifed
by setting the "selected" attribute to true.  If the option has a sub menu
then we set "expanded" to true.  The XSL can then interpret these attributes
(i.e. not associating a href with an option if selected=true and showing the
sub menu in expanded=true) to display the menu tree.

Has anyone else had experience of using menus with Struts/Cocoon.  Is there
a better way of doing the above?


-John




> -----Original Message-----
> From: Matt Raible [SMTP:[EMAIL PROTECTED]]
> Sent: 19 July 2001 19:56
> To:   [EMAIL PROTECTED]
> Subject:      Re: Tree
> 
> Have you seen the "struts-menu" application - it uses struts, 
> javascript, and xml to build a DHTML tree.
> 
> Can be found at:
> 
> http://husted.com/about/struts/resources.htm#extensions
> 
> Matt
> 
> 
> --- Levi Cook <[EMAIL PROTECTED]> wrote:
> > I agree with Matts points, in addition here are a couple more 
> > thoughts
> on
> > the challenge of tree navigation--
> > 
> > 1) From a mvc design perspective, a tree is just a view; assigning 
> > responsibility of rendering a tree to "a lot of action classes" is
> probably
> > not optimal.
> > 
> > 2) Offhand, a key to building an effective tree view rests with 
> > thinking about recursive associations-- ie. a container class that 
> > may contain
> itself
> > (self containment)
> > 
> > Here's a common example:
> > 
> >  ----------
> > |  Folder  |<>--  1
> >  ----------     |
> >      | *        |
> >      |          |
> >       ----------
> > 
> > In this case, a Folder can have zero or more subfolders-- thus 
> > yielding
> a
> > hierarchy, or tree :) Each folder can be contained by exactly one
> folder.
> > 
> > With this model in mind, I believe you should consider creating a 
> > custom
> tag
> > that expects this *type* of structure. Ideally, you're new "tree" 
> > tag
> would
> > only need to rely on interfaces from the java collections framework.
> > 
> > 
> > Regards,
> > Levi
> > 
> > 
> > ----- Original Message -----
> > From: "Gogineni, Pratima" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, July 19, 2001 10:09 AM
> > Subject: Tree
> > 
> > 
> > > Hi
> > >
> > > I have been thinking for a while about making a "tree" jsp 
> > > component
> using
> > > struts. I like the idea of having a jsp based tree rather than 
> > > using
> the
> > > javascript trees that are normally used.
> > >
> > > I know I will have to write a lot of action classes to support a
> *Good*
> > > generic tree. But does anyone know of any problems with using a 
> > > jsp
> based
> > > tree rather than javascript based?
> > >
> > > Thanks
> > > Pratima
> > >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, July 19, 2001 9:05 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: struts-layout
> > >
> > >
> > > Hi there!
> > >
> > > I am happy to inform you that the 0.3 version of struts-layout has
> been
> > > released on <http://struts.application-servers.com>. struts-layout 
> > > is
> a
> > tag
> > > library for Struts that allows for fast and easy development of 
> > > jsp
> pages.
> > 
> > > With
> > > struts-layout, pages are described with only a small set of 
> > > special
> tags.
> > > HTML
> > > tags are not any more needed (well, nearly), as struts-layout tags
> > generates
> > >
> > > the layout. I kindly invite you to have a look on the site for 
> > > more information.
> > >
> > > struts-layout is now used in my company's projects and in 
> > > <http://www.application-servers.com>, a French site dedicated to
> > information
> > >
> > > about application servers. French users can also find an 
> > > introduction
> to
> > > Struts
> > > and struts-layout on this site in the article section.
> > >
> > > Please feel free to send me feedbacks and bug reports.
> > >
> > > Cheers,
> > >
> > > Jean-Noel
> > >
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail 
> http://personal.mail.yahoo.com/

Reply via email to