Hi,
I'd like to be able to add a custom attribute to a Menu or Item element in the XML to make it available to a velocity template for rendering the menu. Is this possible? It seems that the menu-config xml can be parsed, but there is no way to access the added attribute.
I saw a previous post on editing the source for MenuBase to add a setter/getter for that new attribute. As an alternative to that I was thinking that if MenuBase implemented Map and all attributes were available via get() then I could access custom attributes in velocity via ${menu.myAttr}. Is this even possible with the XML parser, or do I need to add each custom attribute as a getter/setter.
Any hints would be appreciated,
Thanks,
Tim
View this message in context: Custom attributes in menu-config.xml
Sent from the struts-menu-user forum at Nabble.com.
[struts-menu] Custom attributes in menu-config.xml
Tim Morrow 2 (sent by Nabble.com) Wed, 01 Feb 2006 12:47:13 -0800
- [struts-menu] Custom attributes in menu-... Tim Morrow 2 (sent by Nabble.com)
- Re: [struts-menu] Custom attributes... Matt Raible
- Re: [struts-menu] Custom attrib... Tim Morrow 2 (sent by Nabble.com)
