History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: SM-30
Type: Improvement Improvement
Status: Reopened Reopened
Priority: Major Major
Assignee: Matt Raible
Reporter: Matt Raible
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Struts Menu

Context path for images

Created: 09/May/06 01:53 AM   Updated: 10/May/06 07:38 PM
Component/s: Menu Core
Affects Version/s: 2.3
Fix Version/s: 2.5


 Description  « Hide
Moved from SF http://sourceforge.net/tracker/index.php?func=detail&aid=1071207&group_id=48726&atid=453974:

We would like a make to have the image attribute render
the img tags with the context path included (like the
page attribute does). Would it be possible just to have
this as an option (like using an imageContextRelative
attribute)?

We are using struts menu 2.3. Here is a sample of our
menu config and the code used to include the menu on
our page.


<Menu name="vHome" title=" ">
<Item title="Open Invoices"
page="/account/AccountInvoice.do?action=list"
image="/myrmc/templates/default/images/blue.arrow.gif"
roles="MYRMC-INVOICES,MYRMC-INTERNAL"/>
<Item title="Active Projects"
page="/project/ProjectList.do"
image="/myrmc/templates/default/images/blue.arrow.gif"
roles="MYRMC-PROJECTS,MYRMC-INTERNAL"/>
<Item title="Track Orders"
page="/order/OrderList.do"
image="/myrmc/templates/default/images/blue.arrow.gif"
roles="MYRMC-ORDERS,MYRMC-INTERNAL"/>
</Menu>

<menu:useMenuDisplayer name="Simple"
permissions="rolesAdapter">
<menu:displayMenu name="vHome"/>
</menu:useMenuDisplayer>

 All   Comments   Change History   FishEye      Sort Order:
Matt Raible - 10/May/06 01:55 AM
context-relative is now the default:

if (menu.getImage() != null) {
            menu.setImage(request.getContextPath() + menu.getImage());
        }

Matt Raible - 10/May/06 07:37 PM
This is more complicated than I originally thought. Backing out change - will fix in 2.5.