Kat,
Use:
<bean:define id="NameOfPageScopeVariableToDefine" name="BeanName" property
="PropertyNameOnBean"/>
<someLibrary:someControl selected="<%
=(String)NameOfPageScopeVariableToDefine%>"/>
In this example, the variable is defaulting to page scope. I would not
define the variable as session scope since you will most likely be sharing
your bean through the session across pages if that is necessary. The cast
before using a page (or session scope) variable is necessary, so, using
your example below, you will need to cast the object to
com.foo.bar.ReportResult..
Brian
"Luna,
Katherine" To: "'[EMAIL PROTECTED]'"
<Kat.Luna@eme <[EMAIL PROTECTED]>
rgis.com> cc:
Subject: Using Bean properties as
MessageTag args
08/27/2001
09:54 AM
Please
respond to
struts-user
Hi all,
I am trying to display a report heading that incorporates the properties
reportResult.startDate and reportResult.endDate into a custom bean:message
tag like this:
<bean:message key="report.heading" arg0="" arg1="" />
where arg0 is <bean:write name="reportResult" property="startDate" />
and arg1 is <bean:write name="reportResult" property="endDate" />
Ive searched the archives and I know that we can't nest tags, but none of
the solutions in the archives seems to work for me either. I've tried:
<bean:parameter id="report" name="reportResult"/>
<bean:message key="report.heading" arg0="<%= report.startDate>" etc... />
and also
<bean:define id="report" name="reportResult" scope="session" type
="com.foo.bar.ReportResult"/>
<bean:message key="report.heading" arg0="<%= report.startDate>" />
but both of the above give me errors. Any suggestions?
Kat Luna
[EMAIL PROTECTED]