I added VELOCITY=Velocity to TrackerRes.
A <fmt:message key="VELOCITY"/> will display Velocity when viewing the
source in your index.jsp
All following varients failed inside of the index.jsp of a fresh
struts-menu-2.4.2:

This example chokes on the quotes: 
<menu-el:useMenuDisplayer name="<fmt:message key="VELOCITY"/>"
 config="/templates/simple.html">
   <menu:displayMenu name="ToDoListMenuEdit"/>
</menu-el:useMenuDisplayer>

These examples:
<menu-el:useMenuDisplayer name='<fmt:message key="VELOCITY"/>'
 config="/templates/simple.html">
   <menu:displayMenu name="ToDoListMenuEdit"/>
</menu-el:useMenuDisplayer>

<menu-el:useMenuDisplayer name="&lt;fmt:message key="VELOCITY"/&gt;"
 config="/templates/simple.html">
   <menu:displayMenu name="ToDoListMenuEdit"/>
</menu-el:useMenuDisplayer>
give this error:
javax.servlet.ServletException: The displayer mapping for the specified
MenuDisplayer does not exist

Your reply that it should work gives me hope. Is there any chance that you
can add 
the four lines including the fmt tag in the velocity-el.jsp of your demo?

Alternatively jot down the syntax I should be using.

I have been trying to crack this one for a very, very long time :-)

Thanks,
Claudia

mraible wrote:
> 
> You should be able to use <menu-el:> for all your tags and get the
> functionality you're looking for.
> 
> Matt
> 
> On Jan 17, 2008 2:29 AM, Claudia <[EMAIL PROTECTED]> wrote:
>>
>> Is there a smarter, shorter way to access values from a property
>> file and use them directly in the Struts menu tag?
>>
>> This test would obviously fail:
>> <menu-el:useMenuDisplayer name="<fmt:message key="VELOCITY"/>"
>> config="/templates/simple.html">
>>   <menu:displayMenu name="ToDoListMenuEdit"/>
>> </menu-el:useMenuDisplayer>
>>
>> But if it were possible, it would nicely decouple the attribute values so
>> I
>> can
>> externalize them without having to repeat them in the jsp file, as is
>> needed
>> in
>> your working example:
>> ________________________________________________________________________________
>> Using
>> <c:set var="displayer" value="Velocity"/>
>> <c:set var="menuName" value="ToDoListMenuEdit"/>
>>
>> <menu-el:useMenuDisplayer name="${displayer}"
>> config="/templates/simple.html">
>>   <menu-el:displayMenu name="${menuName}"/>
>> </menu-el:useMenuDisplayer>
>> ___________________________________________________________________________________
>>
>> or my working example:
>> Using:
>> Ubuntu 6.10 operating system (built around the Linux kernel). jdk1.5.0_06
>> and
>> apache-tomcat-5.5.20
>> My property resource file is called TrackerRes.
>> There I define a key-value pair: VELOCITY=Velocity
>> To use this in my Struts menu tags, I do the following
>> tests that work fine. Note that mixing menu-el tags and
>> normal menu tags dont present a problem.
>>
>> <hr />
>> <fmt:bundle basename="TrackerRes">
>>         Test Current fmt value: <fmt:message key="VELOCITY"/>
>> </fmt:bundle>
>> <hr />
>> <c:set var="d" scope="request">
>>
>>         <fmt:message key="VELOCITY"/>
>>
>> </c:set>
>>
>> <hr />
>> Test Cout: <c:out value='${d}' />
>>
>> <hr />
>> <menu-el:useMenuDisplayer name="${d}" config="/templates/simple.html">
>>   <menu:displayMenu name="ToDoListMenuEdit"/>
>> </menu-el:useMenuDisplayer>
>> ______________________________________________________________________________
>>
>> Please include the needed snippets in strut-config.xml or web.xml
>> if such a solution exists. Thanks Matt.
>>
>> Claudia
>> --
>> View this message in context:
>> http://www.nabble.com/Is-accessing-fmt-values-directly-from-the-Struts-menu-tag-at-all-possible--tp14916039p14916039.html
>> Sent from the struts-menu-user mailing list archive at Nabble.com.
>>
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> struts-menu-user mailing list
>> struts-menu-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/struts-menu-user
>>
> 
> 
> 
> -- 
> http://raibledesigns.com
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> struts-menu-user mailing list
> struts-menu-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/struts-menu-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Is-accessing-fmt-values-directly-from-the-Struts-menu-tag-at-all-possible--tp14916039p14933998.html
Sent from the struts-menu-user mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
struts-menu-user mailing list
struts-menu-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/struts-menu-user

Reply via email to