On 2/6/06, Tim Morrow 2 (sent by Nabble.com) <[EMAIL PROTECTED]> wrote: > I've been using the "action" attribute to specify a Struts action to > generate the item's URL. It works great, including adding the current > Struts module to the generated link. > > However, I wish to include a menu item that links to a Struts action in > another module. That is, the menu is rendered in the context of "moduleA", > but one of the menu items is for an action in "moduleB". > > My first thought was to use the "location" attribute and include the module > in the url, but I would like the symmetry of specifying "action" everywhere. > Also, I have a custom permissions checker that looks up Struts actions, > and needs to know the module for that purpose. > > I ultimately settled on patching MenuBase to add a "module" attribute such > that when it is specified in combination with page or action the URL is > computed with the page or action looked up from that module, instead of the > current module. > > Was this the correct approach? Is there another way of doing it cleanly? > Is it a worthwhile modification? I can supply a patch if anyone is > interested.
I don't know if it's the correct approach, but if it works it's probably good enough. ;-) The current code looks up Action path's using Struts code. Is the "module" attribute needed for this? Matt > > Cheers, > > Tim > > ________________________________ > View this message in context: Linking to actions in other Struts modules > Sent from the struts-menu-user forum at Nabble.com. ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642 _______________________________________________ struts-menu-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/struts-menu-user
