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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/struts-menu-user