Dynamic menus

"Scott Smith" <[email protected]> Fri, 20 Jun 2008 10:29:21 -0600
Newsgroups gmane.comp.java.struts-menu.user
Message-ID <55F9EF953014514EB6BEE1F5198CEEB4030DC509@exchange.slc.mainstreamdata.com>
This is a multi-part message in MIME format.

--===============1184294552==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C8D2F2.CBC6774A"

This is a multi-part message in MIME format.

------_=_NextPart_001_01C8D2F2.CBC6774A
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

We use struts menu for several menus on one of our sites.  Currently, we
are using the standard menu-config.xml to describe the menu and a
standard properties file to provide the text displayed in the menu
(i.e., we have a property name in the title and tooltip attributes of
the <Item> and the displayed value comes from the associated properties
file). =20

=20

We now need the ability to modify the menu's text displayed on-the-fly
(e.g., we may need to add a German version of a menu title).  Obviously,
we can programmatically rewrite the properties file, but I would assume
that doesn't cause the file to be re-read.  It appears that Struts-Menu
uses Struts MessageResources  (instead of Java property classes) and
that there are methods to add new values to the MessageResources (since
all of the different language versions are kept in a single file-unlike
java property files).  What I don't know if these message resources are
singletons.  That is, if I get the MessageResource and change it, is
that reflected in what the menu displays the next time around or did I
just change my local copy.

=20

Perhaps there is another way to do this.  Does anyone have any
suggestions?  Has anyone done anything similar?

=20

Any help would be appreciated.

=20

Scott


------_=_NextPart_001_01C8D2F2.CBC6774A
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
	{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext=3D"edit">
  <o:idmap v:ext=3D"edit" data=3D"1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal>We use struts menu for several menus on one of our
sites.&nbsp; Currently, we are using the standard menu-config.xml to =
describe
the menu and a standard properties file to provide the text displayed in =
the
menu (i.e., we have a property name in the title and tooltip attributes =
of the &lt;Item&gt;
and the displayed value comes from the associated properties =
file).&nbsp; <o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>We now need the ability to modify the menu&#8217;s =
text
displayed on-the-fly (e.g., we may need to add a German version of a =
menu title).&nbsp;
Obviously, we can programmatically rewrite the properties file, but I =
would
assume that doesn&#8217;t cause the file to be re-read.&nbsp; It appears =
that
Struts-Menu uses Struts MessageResources &nbsp;(instead of Java property
classes) and that there are methods to add new values to the =
MessageResources
(since all of the different language versions are kept in a single =
file&#8212;unlike
java property files).&nbsp; What I don&#8217;t know if these message =
resources
are singletons.&nbsp; That is, if I get the MessageResource and change =
it, is
that reflected in what the menu displays the next time around or did I =
just
change my local copy.<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>Perhaps there is another way to do this.&nbsp; Does =
anyone
have any suggestions?&nbsp; Has anyone done anything =
similar?<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>Any help would be appreciated.<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>Scott<o:p></o:p></p>

</div>

</body>

</html>

------_=_NextPart_001_01C8D2F2.CBC6774A--


--===============1184294552==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
--===============1184294552==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
struts-menu-user mailing list
struts-menu-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/struts-menu-user

--===============1184294552==--