Custom attributes in menu-config.xml
"Tim Morrow 2 (sent by Nabble.com)" <[email protected]>
| Newsgroups | gmane.comp.java.struts-menu.user |
|---|---|
| Message-ID | <[email protected]> |
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: http://www.nabble.com/Custom-attributes-in-menu-config.xml-t1042442.html#a2708148
Sent from the struts-menu-user forum at Nabble.com.