RE: Newbie questions

"Matt Raible" <lists-T7vlz3gD7BdF/EzeuO4KJwC/[email protected]>
Newsgroups gmane.comp.java.struts-menu.user
Organization Raible Designs, Inc.
Message-ID <[email protected]>
See answers below.


> -----Original Message-----
> From: struts-menu-user-admin-TtF/[email protected] 
> [mailto:struts-menu-user-admin-TtF/[email protected]] On Behalf Of 
> Jesus Rodriguez
> Sent: Monday, June 07, 2004 11:48 AM
> To: struts-menu-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> Subject: [struts-menu] Newbie questions
> 
> 
> I'm looking at using struts menu in our application, but I 
> have several 
> questions I'm trying to answer.
> 
> 1) Is it possible to extend the menu-config.xml file and add
>     new attributes?

Yes, but you'll need to modify the MenuBase.java file to add getters and
setters for you r new attributes.

> 
> 2) Is JavaScript a requirement?  I'm primarily interested in
>     tabbed menus so don't need the flashy stuff.

No, if you use the Velocity Displayer - you'll have full control over
all the code that's rendered.  You can just spit out plain ol' HTML if
that's what you choose.  I use JavaScript in a lot of the menus because
it's often easier to use it.

> 
> 3) What's the heuristic for highlighting a menu item (tab in my case)?

The most effective way is to do URL matching - where you try to match
the current URL with URLs defined in menu-config.xml.  I've done this
with JavaScript for the most part - but I've also done it using VTL in a
Velocity template.  Another method is to use cookies.  This is built
into some displayers (i.e. Tabbed and List).  I guess the question is -
how would you normally do this if you weren't using Struts Menu and you
just had a included menu.jsp file?

Matt 




-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite!  GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
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.