Re: [struts-menu] contextRelative locations
Have you tried using the page attribute? This pre-pends it's value with the contextPath. You can also use forward or action if you're using Struts. Matt On Jun 9, 2004, at 6:46 PM, Brown, James wrote: Is it possible to specify context relative (similar to struts global forward's contextRelative) equal to true such that locations starting with / will have a root of treated as http://host/context/ Rather than http://host/ The issue I am having is that I have a large menu structure that I would like to use in multiple places within a multi-module application (one parent struts-config and 3 children). The layout of the site is as follows: / /mod1 /mod2 /mod3 My desire is that when a user requests: http://host/context/ http://host/context/mod1 http://host/context/mod2 http://host/context/mod3 They receive the same menu, but if I specify locations such as location=mod1/page1 they will not work when displayed within the modules as the URL becomes if in mod1: http://host/context/mod1/mod1/page1 if I specify locations such as location=/mod1/page1 they will not work when displayed within the modules as the URL becomes: http://host/mod1/mod1/page1 Note the missing context which I cannot hard code as it changes as we roll through our environments from development through to production. Any ideas? -- James THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --- 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 ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user
RE: [struts-menu] Newbie questions
See answers below. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jesus Rodriguez Sent: Monday, June 07, 2004 11:48 AM To: [EMAIL PROTECTED] 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 ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user
RE: [struts-menu] contextRelative locations
Are you using the latest version of Struts menu (2.2)? This should not be happening and is probably a bug. You could also try Item name=new title=registration.new action=/index/ - where the action's value matches the path of your action in struts-config.xml. Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brown, James Sent: Thursday, June 10, 2004 4:51 AM To: [EMAIL PROTECTED] Subject: RE: [struts-menu] contextRelative locations Doesn't see to make much of a difference. With the following configuration: Menu name=registration title=registration width=50 roles=registrant Item name=new title=registration.new page=/index.do/ Item name=new title=registration.new page=index.do/ Item name=new title=registration.new page=/index/ Item name=new title=registration.new page=index/ The resulting links are: http://host/context//context/index.do http://host/context//context/index.do http://host/context//context/index http://host/context//context/index When what I need is: http://host/context/index.do Is this a bug in struts-menu? Why is the context repeated twice? -- James THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matt Raible Sent: 2004 June 10 04:13 To: [EMAIL PROTECTED] Subject: Re: [struts-menu] contextRelative locations Have you tried using the page attribute? This pre-pends it's value with the contextPath. You can also use forward or action if you're using Struts. Matt On Jun 9, 2004, at 6:46 PM, Brown, James wrote: Is it possible to specify context relative (similar to struts global forward's contextRelative) equal to true such that locations starting with / will have a root of treated as http://host/context/ Rather than http://host/ The issue I am having is that I have a large menu structure that I would like to use in multiple places within a multi-module application (one parent struts-config and 3 children). The layout of the site is as follows: / /mod1 /mod2 /mod3 My desire is that when a user requests: http://host/context/ http://host/context/mod1 http://host/context/mod2 http://host/context/mod3 They receive the same menu, but if I specify locations such as location=mod1/page1 they will not work when displayed within the modules as the URL becomes if in mod1: http://host/context/mod1/mod1/page1 if I specify locations such as location=/mod1/page1 they will not work when displayed within the modules as the URL becomes: http://host/mod1/mod1/page1 Note the missing context which I cannot hard code as it changes as we roll through our environments from development through to production. Any ideas? -- James THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --- 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 ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user --- 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 ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user --- 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 ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user
RE: [struts-menu] Failure initializing struts-menu: Error parsing resource file -- Help!
Send it to matt AT raibledesigns.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sandra Logeson Sent: Wednesday, May 26, 2004 6:30 AM To: [EMAIL PROTECTED] Subject: RE: [struts-menu] Failure initializing struts-menu: Error parsing resource file -- Help! Tried to send you a war file, but it was too big? Any suggestions? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Matt Raible Sent: Wednesday, May 26, 2004 12:16 AM To: [EMAIL PROTECTED] Subject: RE: [struts-menu] Failure initializing struts-menu: Error parsing resource file -- Help! It looks like it's finding menu-config.xml - maybe its not well-formed XML? If everything looks write - is it possible to send me a WAR I can just drop into Tomcat to test? Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sandra Logeson Sent: Tuesday, May 25, 2004 6:28 AM To: [EMAIL PROTECTED] Subject: [struts-menu] Failure initializing struts-menu: Error parsing resource file -- Help! I am new to struts and am trying to get struts-menu to work in my application. I keep gettting this error and cannot find anything wrong in my menu-config.xml file. Here is the error I'm receiving: javax.servlet.ServletException: Failure initializing struts-menu: Error parsing resource file: /WEB-INF/classes/edu/ncsu/lib/ematrix/conf/menu-config.xml nested exception is: Error at (11, 155: null at net.sf.navigator.menu.MenuPlugIn.init(MenuPlugIn.java:67) at org.apache.struts.action.ActionServlet.initModulePlugIns(Actio nServlet.java: 1156) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472) at org.apache.struts.tiles.ActionComponentServlet.init(ActionComp onentServlet.j ava:104) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardW rapper.java:93 5) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper. java:823) at org.apache.catalina.core.StandardContext.loadOnStartup(Standar dContext.java: 3422) at org.apache.catalina.core.StandardContext.start(StandardContext .java:3623) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:754) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363) at org.apache.catalina.core.StandardService.start(StandardService .java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.j ava:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess orImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth odAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) Here is my menu-config.xml: ?xml version=1.0 encoding=UTF-8 ? MenuConfig Displayers Displayer name=ListMenu type=net.sf.navigator.displayer.ListMenuDisplayer/ Displayer name=Simple type=com.fgm.web.menu.displayer.SimpleMenuDisplayer/ /Displayers Menus Menu name=indexMenu title=Examples Item name=indexMenu1 title=Basic Example toolTip=Shows usage of the menu displayers using defaults. location=/pages/common/bibdetails.jsp/ Item name=indexMenu2 title=Advanced Example toolTip=Shows customized menu displays. location=/pages/common/view_bibdetails.jsp/ /Menu /Menus /MenuConfig Here is my jsp that is attempting to display the indexMenu: %@ taglib uri=jstl/c prefix=c % %@ taglib uri=struts/tiles prefix=tiles % %@ taglib uri=http://struts-menu.sf.net/tag; prefix=menu % menu:useMenuDisplayer name=Simple table cellpadding=0 cellspacing=0 trtd menu:displayMenu name=indexMenu/ /td/tr /table /menu:useMenuDisplayer Any suggestions would be greatly appreciated. Sandra Logeson email: [EMAIL PROTECTED] --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
RE: [struts-menu] java script error
Title: Message What version of struts-menu are you using?You might trydownloading the sample app and simply modifying that. Matt -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]Sent: Tuesday, May 11, 2004 6:22 AMTo: [EMAIL PROTECTED]Subject: Re: [struts-menu] _javascript_ errorI have checked and there are no special characters in the menu-config.xml file for the menu item. I am still getting the same problem it is having a problem with the # symbol in the generated script. Frank FryShaw Ind. Inc.Systems Engineer[EMAIL PROTECTED]706-275-5290Customer Service / Distribution Programming koen [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 05/10/2004 11:20 AM Please respond to[EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject Re: [struts-menu] _javascript_ error My experience :Make sure the "xx" in your example is a name not containing illegal characters.The x expands to a _javascript_ variable and for instance having a underscore in it, results in a _javascript_ error.[EMAIL PROTECTED] wrote: I am getting a _javascript_ error when I use the following menu. I keep getting an Invalid Character error on the # when I go to run the page. I have used all the default settings. Has anybody seen this and know how to fix it. menu:useMenuDisplayer name="Velocity" config="/templates/coolmenus.html" bundle="org.apache.struts.action.MESSAGE" script type="text/_javascript_" !-- menu:displayMenu name="xxx"/ oCMenu.construct(); // -- /script *_#_*displayMenu([EMAIL PROTECTED] Frank Fry Shaw Ind. Inc. Systems Engineer_ [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 706-275-5290 Customer Service / Distribution Programming**Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company or its subsidiaries.** -- Best regards,Koen MaesDomainnames Belgiumwww.domainnames.bewww.domeinnamen.be--This message has been scanned for viruses anddangerous content, and is believed to be clean.---This SF.Net email is sponsored by Sleepycat SoftwareLearn developer strategies Cisco, Motorola, Ericsson Lucent use to deliver higher performing products faster, at low TCO.http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3___struts-menu-user mailing list[EMAIL PROTECTED]https://lists.sf.net/lists/listinfo/struts-menu-user** Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail. If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender. Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company or its subsidiaries. **
RE: [struts-menu] Im trying to add a new menu property for use with Velocity.
I don't know what the cause of your error is - but what you're trying to do *should* work. The error doesn't look like it has anything to do with your new properties. Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Ketchin Sent: Friday, April 30, 2004 3:24 AM To: [EMAIL PROTECTED] Subject: [struts-menu] Im trying to add a new menu property for use with Velocity. I use Struts-Menu 2.2 using the Velocity templates to customise and configure some dynamic functionality and appearance attributes for coolmenus4. Our aim is for our customers to be able to fully configure their menu without having to edit JSP files. They will be able to edit Menu-config.xml I wan to add a new attribute to the xml called Type. The Type attribute is a property to allow the velocity macro to perform specific processing for the menu element. Ive looked over the code and thought all I needed to do was to add setters and getters for type to MenuBase.java Presumably Im missing something obvious somewhere. The digester doesnt use a DTD to consume the stuts-menu file so I thought that using reflection it would set the new property values? Does anyone have a helpful hint ? relevant code is below. public abstract class MenuBase { .//other stuff .//other stuff .//other stuff protected String type; .//other stuff public String getType() { return type; } .//other stuff public void setType(String typ) { this.type = typ; } } My menu-config.xml Menus Menu name=Contactusermenu title=HOMEMENU description=test Item name=HomeMenu title=HOMEMENU description=test forward=Main.Welcome / Item name=ContactIncidentMenu title=INCIDENTMENU type=LogIncAllowed Item name=PrinterFault title=LOGPRINTERFAULT forward=Incident.LogPrinterFault / Item name=SoftwareFault title=LOGSOFTWAREFAULT forward=Incident.LogSoftwareFault / Item name=GeneralFault title=LOGGENERALFAULT forward=Incident.LogGeneralFault / Item name=LogIncident title=LOGINCIDENT forward=Incident.LogIncident / /Item Item name=ContactChangeMenu title=REQUESTMENU type=LogRFCAllowed Item name=MoveFault title=LOGMOVEFAULT forward=Incident.LogMoveFault / Item name=NewtstartFault title=LOGNEWSTARTFAULT forward=Incident.LogNewstartFault / Item name=LogChange title=LOGCHANGE forward=Change.LogChange / /Item Item name=ViewMenu title=VIEWMENU description=test Item name=EventMonitor title=EVENTMONITOR forward=Main.EventSearch / Item name=KnowledgeBase title=KNOWLEDGEBASE forward=Main.KnowledgeBase / Item name=AMSearch title=ASSETSEARCH forward=Asset.AssetSearch image=../images/select-all.png/ /Item Item name=HelpMenu title=HELPMENU Item name=AboutPage title=ABOUTPAGE forward=Help.About / Item name=HelpPage title=HELPPAGE forward=Help.Main target=_blank/ /Item Item name=LogoutMenu title=LOGOUTMENU forward=Main.Logout description=test/ /Menu /Menus However I get the following errors in the initialisation of the struts-menu plugin. 16:57:42,822 ERROR [Engine] StandardContext[/assystTen]: Servlet /assystTen threw load() exception javax.servlet.ServletException: Failure initializing struts-menu: Error parsing resource file: /WEB-INF/menu-config.xml nested exception is: Error at (30, 80: LogIncAllowed at net.sf.navigator.menu.MenuPlugIn.init(MenuPlugIn.java:67) at org.apache.struts.action.ActionServlet.initModulePlugIns(Actio nServlet.java: 1158) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardW rapper.java:93 5) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper. java:823) at org.apache.catalina.core.StandardContext.loadOnStartup(Standar dContext.java: 3421) at org.apache.catalina.core.StandardContext.start(StandardContext .java:3609) at org.apache.catalina.core.ContainerBase.addChildInternal(Contai nerBase.java:8 21) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase. java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579) at org.jboss.web.tomcat.tc4.EmbeddedTomcatService.createWebContex t(EmbeddedTomc atService.java:530) at org.jboss.web.tomcat.tc4.EmbeddedTomcatService.performDeploy(E
RE: [struts-menu] TabbedMenu performance problems
This thread might help you understand it - I'm no expert on the subject. Restarting Tomcat only takes 10 seconds for me, so when I get an OOM error, I restart it. http://www.mail-archive.com/[EMAIL PROTECTED]/msg111595.htm l Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pingili, Madhupal Sent: Tuesday, March 09, 2004 1:26 PM To: '[EMAIL PROTECTED]' Subject: RE: [struts-menu] TabbedMenu performance problems That's right. I am reloading web app 5-6 times and it starts getting slow. Well, if that's typical behavior, then restarting the server is only option. But, what could be the reason? Is it that app server doesn't dispose all the objects for the older versions immediately? I don't know how app servers deal with removed versions. Thanks for your response, Reddy Pingili -Original Message- From: Matt Raible [SMTP:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 3:15 PM To: [EMAIL PROTECTED] Subject:RE: [struts-menu] TabbedMenu performance problems Are you saying that when your app is reloaded 5-6 times it starts getting slow? If so, that's typical behavior I see on Tomcat all the time. I'd suggest restarting your server periodically. Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pingili, Madhupal Sent: Tuesday, March 02, 2004 9:04 AM To: '[EMAIL PROTECTED]' Subject: [struts-menu] TabbedMenu performance problems We are facing a typical problem and wonder if it's related to struts-menu TabbedMenu displayer. App. server: WebSphere 4.0.4 JDK: JDK 1.3.1 Struts-Menu: 2.0 I am using WebSphere Studio 5.0 to develop web application (Struts Actions, JSPs, Java beans etc.) and export EAR file to disk. And using a batch program (putty tools), deploying this application on development WebSphere app. server. Problem is, after changing application and deploying 5 or 6 times, application is becoming slower to respond. We are comparing performance against another web application that doesn't use struts-menu. That application is very quick to present the pages. Has anyone come across this problem? Can anyone tell me where to look for more information? Are there any tools that identify the performance problems? Any suggestions are greatly appreciated. Reddy Pingili Raleigh, NC --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438 op=click ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts- menu-user --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts- menu-user --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user
RE: [struts-menu] Create dynamicaly menu itens
Try setting the parent of the newly created menu using setParent of MenuComponent. HTH, Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo Padial Sent: Friday, February 27, 2004 10:33 AM To: [EMAIL PROTECTED] Subject: Re: [struts-menu] Create dynamicaly menu itens Hello Matt We found a error in Struts-menu when creating dynamicaly menus. Look the JavaScript code: script type=text/javascript if (document.getElementById) { var UserMenu = new WebFXTree('Usuario de teste'); var p01 = new WebFXTreeItem('p01'); UserMenu.add(p01); var b = new WebFXTreeItem('Bugs Resolvidos ()','a'); p02.add(b); ERROR- var p02 = new WebFXTreeItem('p02'); UserMenu.add(p02); var b = new WebFXTreeItem('Bugs Resolvidos ()','a'); p02.add(b); document.write(UserMenu); } else { var msg = Your browser does not support document.getElementById().\n; msg += You must use a modern browser for this menu.; alert(msg); } /script Look the line that i put the comment. The variable p02 is not declared and the JavaScript use method .add to put something. The correct is p01 and not p02. Look a piece of my code that a use to generate this JavaScript: menu = new net.sf.navigator.menu.MenuComponent(); menu.setName(MENU_NAME); menu.setTitle(menuFacade.getUserName()); ProjectSmallInfo project; Iterator i = projects.iterator(); while (i.hasNext()) { project = (ProjectSmallInfo) i.next(); nodeTree = new MenuComponent(); nodeTree.setTitle(new String(project.getName())); nodeTree.setName(project.getName()); nodeTree.addMenuComponent(infoProject); menu.addMenuComponent(nodeTree); } Could you solve this problem and disponibilize a path for us ? Thank's Matt On Fri, 2004-02-27 at 12:34, Matt Raible wrote: Take all the time you need. ;-) Matt On Feb 27, 2004, at 6:01 AM, Gustavo Padial wrote: Ok Matt. I will write. No problem. Just give-me some days right ? thank's for your help Gustavo Padial On Thu, 2004-02-26 at 19:18, Matt Raible wrote: Gustavo - I'd *love* it if you could write a tutorial on creating dynamic menus. You can use my wiki if you'd like - then I'll move it into the main struts-menu documentation. I can also probably add some code to strip whitespaces from names (or add an underscore). http://raibledesigns.com/wiki/Wiki.jsp?page=StrutsMenuDynamicMenus Thanks! Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo Padial Sent: Thursday, February 26, 2004 3:10 PM To: [EMAIL PROTECTED] Subject: RE: [struts-menu] Create dynamicaly menu itens Hi Matt I create dynamicaly itens with no problems now. ;-) I discovery in method .setName we cant put spaces. For example: .setName(Hello World) dont load the menu in page. .setName(HelloWorld) load menu in page. ;-P Our old friend JavaScript ! ;-) Thank's. Do you like that i write a tutorial to put in struts-menu page to show how create dynamicaly menu's ? Bye On Thu, 2004-02-26 at 18:37, Matt Raible wrote: Have you tried the code below? It looks like it'll work. I've never tried to build a menu dynamically, so I'm just guessing here. Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo Padial Sent: Thursday, February 26, 2004 2:27 PM To: [EMAIL PROTECTED] Subject: RE: [struts-menu] Create dynamicaly menu itens Ok i'll see old versions. But, in struts-menu 2.1 we dont have methods to create itens dynamicaly ? How struts-menu 2.1 creates menu and subitens given a struts-menu.xml ? Why i cant create with this code: MenuComponent infoProject = new MenuComponent(); infoProject.setTitle(Bugs Resolvidos ()); infoProject.setName(Bugs Resolvidos ()); infoProject.setPage(/admin/teste.jsp); infoProject.setAction(); infoProject.setLocation(a); nodeTree = repository.getMenu(UserProject); nodeTree.addMenuComponent(infoProject); Thank's Matt Gustavo On Thu, 2004-02-26 at 18:05, Matt Raible wrote: I don't believe I removed or modified anything in MenuComponent b/w 1.3 and 2.1. Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo Padial Sent: Thursday, February 26, 2004 1:57 PM To: [EMAIL PROTECTED] Subject: RE: [struts-menu] Create dynamicaly menu itens Hello Matt I got the classes but i'm using Struts Menu 2.1. The class MenuComponentBuilder.java uses the folow methods of MenuComponent.class : menu.setBaseObject(obj
RE: [struts-menu] Create dynamicaly menu itens
I have no idea... Sorry I can't help more. You could look at the Velocity template - maybe that'll help. Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo Padial Sent: Friday, February 27, 2004 12:10 PM To: [EMAIL PROTECTED] Subject: RE: [struts-menu] Create dynamicaly menu itens Hi Matt I make this but the problem continue. I put nodeTree.setParent(menu). I believe the problem is in some place of code interaction. What do you think ? Bye Gustavo Padial On Fri, 2004-02-27 at 14:53, Matt Raible wrote: Try setting the parent of the newly created menu using setParent of MenuComponent. HTH, Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo Padial Sent: Friday, February 27, 2004 10:33 AM To: [EMAIL PROTECTED] Subject: Re: [struts-menu] Create dynamicaly menu itens Hello Matt We found a error in Struts-menu when creating dynamicaly menus. Look the JavaScript code: script type=text/javascript if (document.getElementById) { var UserMenu = new WebFXTree('Usuario de teste'); var p01 = new WebFXTreeItem('p01'); UserMenu.add(p01); var b = new WebFXTreeItem('Bugs Resolvidos ()','a'); p02.add(b); ERROR- var p02 = new WebFXTreeItem('p02'); UserMenu.add(p02); var b = new WebFXTreeItem('Bugs Resolvidos ()','a'); p02.add(b); document.write(UserMenu); } else { var msg = Your browser does not support document.getElementById().\n; msg += You must use a modern browser for this menu.; alert(msg); } /script Look the line that i put the comment. The variable p02 is not declared and the JavaScript use method .add to put something. The correct is p01 and not p02. Look a piece of my code that a use to generate this JavaScript: menu = new net.sf.navigator.menu.MenuComponent(); menu.setName(MENU_NAME); menu.setTitle(menuFacade.getUserName()); ProjectSmallInfo project; Iterator i = projects.iterator(); while (i.hasNext()) { project = (ProjectSmallInfo) i.next(); nodeTree = new MenuComponent(); nodeTree.setTitle(new String(project.getName())); nodeTree.setName(project.getName()); nodeTree.addMenuComponent(infoProject); menu.addMenuComponent(nodeTree); } Could you solve this problem and disponibilize a path for us ? Thank's Matt On Fri, 2004-02-27 at 12:34, Matt Raible wrote: Take all the time you need. ;-) Matt On Feb 27, 2004, at 6:01 AM, Gustavo Padial wrote: Ok Matt. I will write. No problem. Just give-me some days right ? thank's for your help Gustavo Padial On Thu, 2004-02-26 at 19:18, Matt Raible wrote: Gustavo - I'd *love* it if you could write a tutorial on creating dynamic menus. You can use my wiki if you'd like - then I'll move it into the main struts-menu documentation. I can also probably add some code to strip whitespaces from names (or add an underscore). http://raibledesigns.com/wiki/Wiki.jsp?page=StrutsMenuDynamicMenus Thanks! Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo Padial Sent: Thursday, February 26, 2004 3:10 PM To: [EMAIL PROTECTED] Subject: RE: [struts-menu] Create dynamicaly menu itens Hi Matt I create dynamicaly itens with no problems now. ;-) I discovery in method .setName we cant put spaces. For example: .setName(Hello World) dont load the menu in page. .setName(HelloWorld) load menu in page. ;-P Our old friend JavaScript ! ;-) Thank's. Do you like that i write a tutorial to put in struts-menu page to show how create dynamicaly menu's ? Bye On Thu, 2004-02-26 at 18:37, Matt Raible wrote: Have you tried the code below? It looks like it'll work. I've never tried to build a menu dynamically, so I'm just guessing here. Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo Padial Sent: Thursday, February 26, 2004 2:27 PM To: [EMAIL PROTECTED] Subject: RE: [struts-menu] Create dynamicaly menu itens Ok i'll see old versions. But, in struts-menu 2.1 we dont have methods to create itens dynamicaly ? How struts-menu 2.1 creates menu and subitens given a struts-menu.xml ? Why i cant create with this code: MenuComponent infoProject = new MenuComponent(); infoProject.setTitle(Bugs Resolvidos
RE: [struts-menu] Create dynamicaly menu itens
Have you tried the code below? It looks like it'll work. I've never tried to build a menu dynamically, so I'm just guessing here. Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo Padial Sent: Thursday, February 26, 2004 2:27 PM To: [EMAIL PROTECTED] Subject: RE: [struts-menu] Create dynamicaly menu itens Ok i'll see old versions. But, in struts-menu 2.1 we dont have methods to create itens dynamicaly ? How struts-menu 2.1 creates menu and subitens given a struts-menu.xml ? Why i cant create with this code: MenuComponent infoProject = new MenuComponent(); infoProject.setTitle(Bugs Resolvidos ()); infoProject.setName(Bugs Resolvidos ()); infoProject.setPage(/admin/teste.jsp); infoProject.setAction(); infoProject.setLocation(a); nodeTree = repository.getMenu(UserProject); nodeTree.addMenuComponent(infoProject); Thank's Matt Gustavo On Thu, 2004-02-26 at 18:05, Matt Raible wrote: I don't believe I removed or modified anything in MenuComponent b/w 1.3 and 2.1. Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo Padial Sent: Thursday, February 26, 2004 1:57 PM To: [EMAIL PROTECTED] Subject: RE: [struts-menu] Create dynamicaly menu itens Hello Matt I got the classes but i'm using Struts Menu 2.1. The class MenuComponentBuilder.java uses the folow methods of MenuComponent.class : menu.setBaseObject(obj); menu.setParams(params); The two methods above not exists in struts-menu 2.1 right ? We have a similary methods or i need to use old version of struts menu ? Thank's Gustavo On Thu, 2004-02-26 at 17:37, Matt Raible wrote: Try this: http://www.mail-archive.com/struts-menu-devel%40lists.sf.net/msg0001 1. ht ml If it works for you, please let me know - I'd like to add a sample to the example app. Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo Padial Sent: Thursday, February 26, 2004 1:00 PM To: [EMAIL PROTECTED] Subject: [struts-menu] Create dynamicaly menu itens Hello people I'm using struts-menu and i like so much, but i need to create dynamicaly items in menu. How can i make this ? I see a message posted but the answer is with wrong link. Thank's -- === Gustavo Padial Gerente de Projetos Kaffa Software Consulting +55 19 3296 3505 www.kaffa.com.br === --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438 op=click ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts- menu-user --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438 op=click ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user -- === Gustavo Padial Gerente de Projetos Kaffa Software Consulting +55 19 3296 3505 www.kaffa.com.br === --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438 op=click ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts- menu-user --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438 op=click ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user
RE: [struts-menu] Struts-Menu for multi-page form
I use the menu in a separate tile and it works fine for me. Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Morse Sent: Monday, January 19, 2004 9:33 AM To: [EMAIL PROTECTED] Subject: [struts-menu] Struts-Menu for multi-page form Hello, I'm investigating using Struts-Menu to implement a multi-page form application (i.e, the the form requires multiple pages to ask all the questions, and I'd like to use struts-menu for the navigation). I haven't seen anything in the archives indicating this would be a problem or a bad idea, other than forcing the submit when the user clicks between tabs. Ideally, I'd like to encapsulate the tabs as a separate tile. Is anyone aware of any problems I might run into? Thanks. -- Never speak more clearly than you think. (Bernstein) Key ID: F0533BB6 --- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts- menu-user --- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user
RE: [struts-menu] A question on struts menus and frames...
The only solution is to use Struts Menu 2.0 right now, I'm working on backing out the EL support for 2.2 and making it optional for users. Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pingili, Madhupal Sent: Monday, January 12, 2004 8:35 AM To: '[EMAIL PROTECTED]' Subject: RE: [struts-menu] A question on struts menus and frames... Hi Lance, I have added globalMacros.vm, .css, .js, Velocity JARs from example(struts-menu.war) app, and added following code to JSP: div id=menuDiv menu:useMenuDisplayer name=Velocity config=/templates/tabs.html bundle=org.apache.struts.action.MESSAGE ul id=menuList menu:displayMenu name=TabbedAdvSearch/ menu:displayMenu name=TabbedLogoff/ menu:displayMenu name=TabbedHelp/ /ul /menu:useMenuDisplayer /div I am getting this error: Servlet Error: org/apache/taglibs/standard/lang/support/ExpressionEvaluatorManager: java.lang.Exception: org/apache/taglibs/standard/lang/support/ExpressionEvaluatorManager at _FindLoans_jsp_6._jspService(_FindLoans_jsp_6.java:1033) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:142) . So, if I understand it correctly, VelocityMenuDisplayer is calling Velocity engine to evaluate tabs.html and create html tags to present menu items. I wonder who needs ExpressionEvaluatorManager. Is it Velocity engine OR VelocityMenuDisplayer? I am running on a app. server that doesn't support JSP 1.2. Is there any solution/workaround to this problem? Thank you, Reddy Pingili -Original Message- From: Lance Lavandowska [SMTP:[EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 1:01 PM To: [EMAIL PROTECTED] Subject:Re: [struts-menu] A question on struts menus and frames... I just added the strutsmenu jar, and the velocity jars packaged with the download (velocity 1.4.x and the velocity tools jar). Check out the example app for the details. My setup is a bit different than the example in that I put tabs.vm in /WEB-INF/classes rather than wherever the example has tabs.html (the velocity template for the example). Lance Pingili, Madhupal wrote: Thank you Lance. If it's not too much to ask, can you give me a brief summary on using VelocityDisplayer? I have not developed anything using Velocity tool. I need to know like WEB-INF/x.xml file changes, adding velocity-1.3.1.jar files etc. Thank you, Reddy Pingili --- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user --- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts- menu-user --- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user
Re: [struts-menu] attaching 'struts' menu to non-struts apps
Thanks Dan, I'll look into adding these shortly. Most likely, the reason they don't expand is because there's a conflict between the window.onload in the menuExpandable.js and an onload handler on your page. You can manually call the initializeMenus() function in your page after the menu's JSP - this should fix the problem: Here's an example from one of my projects: div id=menu menu:useMenuDisplayer name=ListMenu bundle=org.apache.struts.action.MESSAGE permissions=rolesAdapter menu:displayMenu name=MainMenu/ menu:displayMenu name=AdminMenu/ menu:displayMenu name=Logout/ /menu:useMenuDisplayer /div script type=text/javascript initializeMenus(); /script HTH, Matt On Jan 8, 2004, at 7:14 AM, Dan Luputan wrote: I made the changes to remove the dependency from ActionServlet, using instead the servlet context. There is also the spring plug-in for initializing the menu. The menu is working fine, except an annoying problem: I use the expandable menu like in appfuse. On some pages the menu does not expand at all, altough it is displayed. Also, looking in the source page, all items are present, there is no error on page, and still they dont expand. Dan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matt Raible Sent: Thursday, January 08, 2004 2:40 PM To: [EMAIL PROTECTED] Subject: Re: [struts-menu] attaching 'struts' menu to non-struts apps I *do* want to de-couple struts-menu from Struts (hence the new navigator package naming). If you have a patch - please submit - I'd love to have a non-struts-dependent MenuPlugin, or simply a different initialization class. Thanks, Matt On Jan 8, 2004, at 2:08 AM, Dan Luputan wrote: It is possible the use the menu in non-struts applications. I have succeeded to do this in the following way with Spring: There is a MenuPlugin class used by struts. Because it depends on Plugin interface from struts, and wanted to not depend at all on struts, I created a new class: public class MenuConfigurer extends WebApplicationObjectSupport { } It does the same as MenuPlugin but does not depend on struts. MenuPlugin has as member struts ActionServlet just for getting the servlet context. Why not use the servlet context instead? There is no ActionServlet in non-struts applications. The ActionServlet caused a further complication, having to subclass the MenuRepository class and override the load() method since it checks the servlet against null. The menu-config.xml can be provided in Springs xml configuration: bean id=menu class=com.xxx.MenuConfigurer property name=menuConfig value/WEB-INF/menu-config.xml/value /property /bean Thats all. Dan --- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user MenuRepository.javaLoadableResource.javaMenuStrutsConfigurer.java --- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user
Re: [struts-menu] A question on struts menus and frames...
It doesn't look like this Displayer supports a target attribute. You can enter this as a bug if you'd like to see it on there. If you can, you could use the VelocityDisplayer with the tabs.html template - then you'll have full control over the HTML it produces. HTH, Matt On Jan 7, 2004, at 8:45 AM, Pingili, Madhupal wrote: I am using TabbedMenuDisplayer as follows: Displayer name=TabbedMenu type=net.sf.navigator.displayer.TabbedMenuDisplayer/ JSP page contents: menu:useMenuDisplayer name=TabbedMenu bundle=org.apache.struts.action.MESSAGE menu:displayMenu name=%=menu%/ /menu:useMenuDisplayer Thanks Reddy Pingili -Original Message- From: Matt Raible [SMTP:[EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 10:36 AM To: [EMAIL PROTECTED] Subject:Re: [struts-menu] A question on struts menus and frames... Which displayer are you using? Matt On Jan 7, 2004, at 8:06 AM, Pingili, Madhupal wrote: Hi Matt, I have tested with static HTML and it replaces whole body of the window with target link results with the following HTML in header (top) frame: a href=Help.html#Login target=_topHelp/a OR a href=Help.html#Login target=_parentHelp/a But, When I put target=_parent OR target=_top in menu-config.xml for menu items, it is not added in HTML like below: lia href=/docQuery/searchDocs.do title=Advanced SearchAdvanced Search/a/li So, If Struts-menu can add that target=_top as part of link like below: lia href=/loanQuery/searchDocs.do target=_top title=Advanced SearchAdvanced Search/a/li that will solve my problem. Thanks Reddy Pingili -Original Message- From: Matt Raible [SMTP:[EMAIL PROTECTED] Sent: Monday, January 05, 2004 4:02 PM To: [EMAIL PROTECTED] Subject:Re: [struts-menu] A question on struts menus and frames... You might try doing a view-source and just working with the static HTML. You'll probably have to copy all the files to a local directory and change a bunch of links to make it work - but it'll make it easier for you to figure out the solution. Once you find the HTML syntax you need (vs. what the Menu is rendering), I can help you get the menu right. Matt On Jan 5, 2004, at 1:21 PM, Pingili, Madhupal wrote: I have added target=text like below: Menu name=TabbedAdvSearch title=menu.title.advsearch action=/advSearch target=text/ Still it replaces the top-frame only. Any ideas??? Thanks Reddy Pingili -Original Message- From: Matt Raible [SMTP:[EMAIL PROTECTED] Sent: Monday, January 05, 2004 2:47 PM To: [EMAIL PROTECTED] Subject: Re: [struts-menu] A question on struts menus and frames... Add target=lowerFrameName to your items in menu-config.xml. HTH, Matt On Jan 5, 2004, at 12:27 PM, Pingili, Madhupal wrote: Hello again, I have Struts menus(tabbed) in the header section in top-frame of a frameset. I have left and right frames right below the top-frame. Now if I click on tabbed menu, it is just replacing the top-frame with the results of that menu link. Rather, I want it to replace whole document with the results of that menu link. Can anyone give me some clues/ideas on making this happen? Thanks a lot, Reddy Pingili --- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user --- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user --- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user --- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
Re: [struts-menu] A question on struts menus and frames...
Here's the quick and dirty. 1. Add Velocity JARs to your WEB-INF/lib directory. These are in the sample app's WAR file. 2. Add globalMacros.vm to your WEB-INF/classes directory. This is also in the sample app's WAR file. 3. Change the displayer value to be VelocityDisplayer and change your config to point to a template. See the examples in the WAR file for more info. HTH, Matt On Jan 7, 2004, at 10:45 AM, Pingili, Madhupal wrote: Thank you Lance. If it's not too much to ask, can you give me a brief summary on using VelocityDisplayer? I have not developed anything using Velocity tool. I need to know like WEB-INF/x.xml file changes, adding velocity-1.3.1.jar files etc. Thank you, Reddy Pingili -Original Message- From: Lance Lavandowska [SMTP:[EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 12:05 PM To: [EMAIL PROTECTED] Subject:Re: [struts-menu] A question on struts menus and frames... I've attached the tabs.vm that I sent to the list a while ago, which includes support for 'target'. Matt Raible wrote: It doesn't look like this Displayer supports a target attribute. You can enter this as a bug if you'd like to see it on there. If you can, you could use the VelocityDisplayer with the tabs.html template - then you'll have full control over the HTML it produces. File: tabs.vm --- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user --- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user
Re: [struts-menu] A question on struts menus and frames...
You might try doing a view-source and just working with the static HTML. You'll probably have to copy all the files to a local directory and change a bunch of links to make it work - but it'll make it easier for you to figure out the solution. Once you find the HTML syntax you need (vs. what the Menu is rendering), I can help you get the menu right. Matt On Jan 5, 2004, at 1:21 PM, Pingili, Madhupal wrote: I have added target=text like below: Menu name=TabbedAdvSearch title=menu.title.advsearch action=/advSearch target=text/ Still it replaces the top-frame only. Any ideas??? Thanks Reddy Pingili -Original Message- From: Matt Raible [SMTP:[EMAIL PROTECTED] Sent: Monday, January 05, 2004 2:47 PM To: [EMAIL PROTECTED] Subject:Re: [struts-menu] A question on struts menus and frames... Add target=lowerFrameName to your items in menu-config.xml. HTH, Matt On Jan 5, 2004, at 12:27 PM, Pingili, Madhupal wrote: Hello again, I have Struts menus(tabbed) in the header section in top-frame of a frameset. I have left and right frames right below the top-frame. Now if I click on tabbed menu, it is just replacing the top-frame with the results of that menu link. Rather, I want it to replace whole document with the results of that menu link. Can anyone give me some clues/ideas on making this happen? Thanks a lot, Reddy Pingili --- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user --- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user --- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user --- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user
RE: [struts-menu] Create tabbed menus dynamically based on user access level
I've never done it, but someone did send in the attached code that might help you. Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pingili, Madhupal Sent: Monday, December 22, 2003 9:57 AM To: '[EMAIL PROTECTED]' Subject: RE: [struts-menu] Create tabbed menus dynamically based on user access level Hi, I want to create my own Menu Repository and keep it at session scope with the key net.sf.navigator.menu.MENU_REPOSITORY I am reading api docs and not getting exactly how to do that. Can anyone shed some light on this? Thanks Reddy -Original Message- From: Matt Raible [SMTP:[EMAIL PROTECTED] Sent: Tuesday, December 09, 2003 2:57 PM To: [EMAIL PROTECTED] Subject:RE: [struts-menu] Create tabbed menus dynamically based on user access level 1. The tabbed menu matches the selected tab based on URL. In the following URL, the Home tab will be selected because it has the same URL as the on in your browser: http://raibledesigns.com/struts-menu/tabbedMenu.jsp?Home 2. If you're using container-managed security, you can specify a comma-delimited roles attribute in your Menu's or Item's (in menu-config.xml). If not, you have two other choices: 1. Use the built-in permissions mechanism (http://struts-menu.sourceforge.net/security.html). 2. Use the Velocity templates and add your own custom logic to hide/show menus based on request/session attributes. 3. Create your own Menu Repository and stuff it in the application/session/request with the key net.sf.navigator.menu.MENU_REPOSITORY and the lowest level one will be used over the default (in application scope at startup). HTH, Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pingili, Madhupal Sent: Tuesday, December 09, 2003 12:41 PM To: '[EMAIL PROTECTED]' Subject: [struts-menu] Create tabbed menus dynamically based on user access level Hello all, Now that I can make Struts Menu 2.0 work in my web application, I have couple of questions on tabbed menus: 1. How do I make menu look like selected when I display first time? For example, in struts-menu.war example application, when we click on tabbedMenuExample option, it is displaying the Home menu page. But it is not showing like Home option is selected. Now you have to click on Home menu option to make it selected. 2. How do I create tabbed menus dynamically based on user's access level? We are storing user access levels in a complex Oracle database. I need to run a stored procedure to get all access levels. These access levels give the user permissions to see some menu options, to edit/delete actions etc. Any ideas, suggestions or links to more documentation will be helpful. Thanks Reddy Pingili --- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371 op=click ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts- menu-user --- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user --- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371 op=click ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts- menu-user ---BeginMessage--- Title: [struts-menu-devel] Dynamic Struts Menu Hello Everybody, I have just started to use StrutsMenu. Its really gr8 thing. While development to adjust my requirement I have added few things which I whould like to share with you all. 1) Generating MenuComponent Object dynamically. MenuComponentBuilder is a utility class that can generate the MenuComponent from any object. This will help to provide
Re: [struts-menu] Call action from menu item
You need to include JSTL's standard-1.0.4 JAR in your WEB-INF/lib folder. I added it to the binary download last night. Matt On Dec 28, 2003, at 12:10 PM, Magnus Heino wrote: btw, I'm using 2.1 downloaded a few days ago. /Magnus Matt Raible wrote: Have you tried specifying action=foo in your menu-config.xml? --- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user --- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user
RE: [struts-menu] RE: Exception thrown by struts-menu tags
Title: Message As of Struts Menu 2.1, the tag library does depend on JSTL for _expression_ evaluation. I've updated the documentation and will update the binary distribution shortly. If this presents a problem for you (or your servlet container), please let me know and hopefully we can figure out a solution. Matt -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joshua DavisSent: Monday, December 22, 2003 2:31 PMTo: '[EMAIL PROTECTED]'Subject: [struts-menu] RE: Exception thrown by struts-menu tags Aha, figured it out... getRootCause(): java.lang.NoClassDefFoundError: org/apache/taglibs/standard/lang/support/ExpressionEvaluatorManager at net.sf.navigator.taglib.ExpressionEvaluator.eval(ExpressionEvaluator.java:40) at net.sf.navigator.taglib.ExpressionEvaluator.evalString(ExpressionEvaluator.java:50) at net.sf.navigator.taglib.DisplayMenuTag.setPageLocation(DisplayMenuTag.java:203) at net.sf.navigator.taglib.DisplayMenuTag.doStartTag(DisplayMenuTag.java:128) I do not have 'standard-1.0.4.jar' in my WEB-INF/lib directory. The user guide states: "All you need to do is put struts-menu.jar in your WEB-INF/lib directory" This, I'm afraid, is not quite true. -Original Message- From: Joshua Davis Sent: Monday, December 22, 2003 4:15 PM To: '[EMAIL PROTECTED]' Subject: Exception thrown by struts-menu tags Hi, I'm trying to get the tabbed menu example to work and have encountered the following exception: javax.servlet.ServletException: org/apache/taglibs/standard/lang/support/ExpressionEvaluatorManager I have looked at the menu-config.xml file and the various other configuration files and I have not been able to locate the cause. Anyone else heard of this? Joshua DavisSystem ArchitectKiodex, Inc. 1 877 6 KIODEX toll-free in the US+1 646 437 3900 general+1 646 437 3859 direct+1 646 437 2610 faxwww.kiodex.com Disclaimer: This e-mail may contain confidential and privileged material for the sole use of the intended recipient(s). If you are not the intended recipient (or authorized to receive this e-mail for the recipient), please note that review, use, distribution or disclosure of any part of this e-mail is strictly prohibited, except that you should please contact the sender or notify Kiodex, Inc. at [EMAIL PROTECTED] that you have received this message in error, and delete all copies of the message. This e-mail and any attachments hereto are the property of Kiodex, Inc. and/or its relevant affiliate, and are not intended to be an offer or an acceptance, and do not create or evidence a binding and enforceable contract between Kiodex, Inc. or any of its affiliates and the intended recipient or any other party, and may not be relied on by anyone as the basis of a contract by estoppel or otherwise.
[struts-menu] Re: Tabbed menu
It's probably a browser issue. What version of IE are you using? I'm sure you could tweak the CSS to get around it. I'm heading out on vacation tomorrow morning, so I doubt I'd be able to fix it, but if you can document the browser version, platform, etc. and submit a bug, hopefully it'll get fixed before the next release. Matt On Dec 19, 2003, at 3:13 PM, Wendy Smoak wrote: Sorry to bug you directly... SourceForge refuses to let email from asu.edu through to the user lists. I'm interested in tabbed menus (I currently use tabsLayout in Tiles). However, the example shows this behavior, with the submenus overlapping the text: http://www.pbase.com/image/24277410 Is it a known problem, or just something wrong with the positioning on that particular page? Feel free to forward answer on the user's list, I do read it, it's just hard to post to it from work. -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management --- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user