Re: Own version of VelocityMenuDisplayer - problems with V2.4

"Matt Raible" <[email protected]> Wed, 17 May 2006 15:55:29 -0700
Newsgroups gmane.comp.java.struts-menu.user
Message-ID <[email protected]>
Please enter an issue for this and we can fix it in the next release.

http://issues.appfuse.org/browse/SM

Matt

On 5/17/06, [email protected] <[email protected]> wrote:
>
> When using Struts-menu 2.3, I created my own version of the
> VelocityMenuDisplayer and removed the code to disallow menu components
> based on user role - instead, I handle the display of what is allowed for
> each user role directly in Velocity using:
>
>       #if ($displayer.isAllowed($menu))
>
> This has the advantage of not resetting the application scope menu each
> time a user with a different role logs in.
>
> I can do this again for Struts-menu 2.4 by creating my own
> VelocityMenuDisplayer  class once more and removing the call to:
>
>       updateAllowedComponents(menu);
>
> However, in Struts-menu 2.4 it seems that Velocity is only initialised if I
> use the supplied
>
>       net.sf.navigator.displayer.VelocityMenuDisplayer
>
> Code in:
>
>       net.sf.navigator.menu.MenuRepository
>
> specifically checks for this particular displayer:
>
>       if (displayerMapping.getType().equals(VelocityMenuDisplayer.class
> .getName())) {
>             if (servletContext == null) {
>                   log.error("ServletContext not set - can't initialize
> Velocity");
>             } else {
>                   VelocityMenuDisplayer.initialize(servletContext);
>             }
>       }
>
> It's reasonable that we only want to initialise this once, but tying it to
> a specific displayer type seems a bit restrictive.
>
>
> Steve
>
>
> ______________________________________________________________________
>
> ----ONLINE-SERVICES-------------------------------------------
> Find out more about our services or login at
> http://www.scottishequitable.co.uk
>
> -----EXISTING-BUSINESS-CONTACTS-------------------------------
> 08456 10 00 10    Individual pensions & Investments
> ([email protected])
> 08456 10 00 10       Group pensions
> 08456 10 00 52    Final salary pension schemes
> 08456 01 52 73    Open market option helpdesk
> 08456 10 00 01    Online Services ([email protected])
> 08456 00 14 02    Protection ([email protected])
>
> **************************************************************
> Scottish Equitable plc
> Registered Office: Edinburgh Park, Edinburgh EH12 9SE.
> Registered in Scotland (No. 144517).
> Authorised and Regulated by the Financial Services Authority.
> Telephone: 0870 242 6789
> **************************************************************
>
> ______________________________________________________________________
>
>
>                           EMAIL DISCLAIMER
>
> This message is for the intended recipient only. It may contain
> confidential or proprietary information. If you receive this message in
> error, please immediately delete it, destroy all copies of it and notify
> the sender.
> You must not use or disclose any part of this message if you are not the
> intended recipient. We may monitor all Email communication through our
> networks.
>
> If you contact us by Email, we may store your name and address to
> facilitate communication.
>
> Any views expressed in this message are those of the individual sender,
> except where the message states otherwise.
>
> We take reasonable precautions to ensure our Emails are virus free.
> However, we cannot accept responsibility for any virus transmitted by us
> and recommend that you subject any incoming Email to your own virus
> checking procedures.
>
>
>
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> struts-menu-user mailing list
> struts-menu-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/struts-menu-user
>


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642