Yup! You're absolutely right. Now I'm just curious. How does that work Matt?
On Wed, Feb 16, 2011 at 1:40 PM, Matt Raible <m...@raibledesigns.com> wrote:
> If you remove the bundle attribute and add the following to your web.xml,
> it should work. The param name is the name of your properties file in
> WEB-INF/classes, without the .properties extension.
>
> <!-- Define the basename for a resource bundle for I18N -->
> <context-param>
>
> <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
> <param-value>ApplicationResources</param-value>
> </context-param>
>
>
> On Feb 16, 2011, at 9:27 AM, Tiago Farias wrote:
>
> Hello, I'm trying to make a custom menu for a web app and it all worked
> just fine, but now I need to internationalize it using a properties file.
> This properties file already exists and the whole app uses it. My
> menu-config.xml is this:
>
> <Displayers>
> <Displayer name="Velocity"
> type="net.sf.navigator.displayer.VelocityMenuDisplayer"/>
> </Displayers>
>
> <Menus>
> <!-- <Menu name="ecfMenu" title="ECFs" location="?Contact">
> <Item name="email" title="E-Mail" location="?EMail"/>
> <Item name="phone" title="Phone" location="?Phone"/>
> </Menu>-->
>
> <Menu name="mainMenu" title="" >
> <Item name="ecfMenu" title="ECFs" roles="FISCO"
> location="DisconnectedEcfsSearch" />
> <Item name="reportsMenu" title="Relatórios" roles="ADMIN"
> location="AlarmReportSearch"/>
> <Item name="fiscoMenu" title="Fisco" roles="ADMIN"
> location="UpdateFiscoForm"/>
> <Item name="alarmMenu" title="Alarmes" roles="ADMIN"
> location="AlarmNotification"/>
> <Item name="userMenu" title="application.header.users"
> roles="ADMIN" location="UserSearch"/>
> <Item name="consoleMenu" title="Console" roles="FISCO"
> location="ConsoleSearch"/>
> </Menu>
>
> And my jsp file is this:
> <%@taglib uri="http://struts-menu.sf.net/tag-el" prefix="menu" %>
>
> <menu:useMenuDisplayer permissions="rolesAdapter"
> name="Velocity" config="/WEB-INF/tabs.html"
> bundle="org.apache.struts.action.MESSAGE">
> <menu:displayMenu name="mainMenu"/>
> </menu:useMenuDisplayer>
>
> The thing is that all the menu titles are ok except for the "userMenu"
> title that is displaying the key to the properties file
> (application.header.users). I wanted it to get the i18n file and display the
> value associated with this key. I'm using struts2 and all the tutorials I
> found for this are Struts1's. Need help! Don't know what else to do...
>
> Best regards!
>
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
>
> http://p.sf.net/sfu/intel-dev2devfeb_______________________________________________
> struts-menu-user mailing list
> struts-menu-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/struts-menu-user
>
>
>
>
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> _______________________________________________
> struts-menu-user mailing list
> struts-menu-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/struts-menu-user
>
>
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
struts-menu-user mailing list
struts-menu-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/struts-menu-user