I have extended the PropertyUtils so that it can support as well what we
call 'string keyed' properties. It's part of the mapper framework I made
publicly available recently (
http://www.husted.com/about/struts/resources.htm#extensions
<http://www.husted.com/about/struts/resources.htm#extensions> ).
Have  look at it and you may be able to do what you want.
 
Fr.

-----Original Message-----
From: Calvin Yu [mailto:[EMAIL PROTECTED]]
Sent: 27 June 2001 20:51
To: [EMAIL PROTECTED]; Jonathan
Subject: Re: Global values as Tag parameters....How???



I imagine you'll have to parse that attribute yourself and use reflection to
get that value.  I don't think Struts has support for this.  It might be
difficult to keep it generic however, since I don't think there is way you
can access the imports that are declared in a JSP page.
 
Of course, there's always this:
 
<html:userTargetedMessages messagesObjectKey="<%= Globals.MESSAGES_OBJECT
%>"/>
 
Calvin

----- Original Message ----- 
From: Jonathan <mailto:[EMAIL PROTECTED]>  
To: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>  
Sent: Wednesday, June 27, 2001 10:03 AM
Subject: Global values as Tag parameters....How???

I am creating a custom Struts tag which needs to search for an object in a
HashMap.  I want the 'key" for the object in the HashMap to be some agreed
upon, pre-defined, final global value defined in a file available to the
whole application.  How do I refer to this value in a Tag attribute?
 
eg.
<html:userTargetedMessages messagesObjectKey="Globals.MESSAGES_OBJECT"/>
 
where "Globals.MESSAGES_OBJECT" is some static final variable in a file


************************************************************************
The information in this email is confidential and is intended solely
for the addressee(s).
Access to this email by anyone else is unauthorised. If you are not
an intended recipient, you must not read, use or disseminate the
information contained in the email.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Capco.

http://www.capco.com
***********************************************************************

Reply via email to