struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karr, David" <david.k...@attws.com>
Subject RE: Attribute rtexprvalues
Date Tue, 10 Dec 2002 21:31:36 GMT
You've already figured out most of it.  If you use an rtexprvalue, the entire value needs to
be an rtexprvalue, not just a portion.  If you use the JSTL, or Struts-EL (or anything that
uses the JSTL EL engine for attribute values), then this sort of thing gets easier to do,
as you can easily have a portion of the attribute value calling the EL engine.  You can even
have multiple calls in an attribute value (although not nested).

> -----Original Message-----
> From: Justin Ashworth [mailto:justin-struts@ashworth.org]
> 
> Hi,
> 
> This is really more of a JSP question, but I'm sure somebody 
> here has a
> quick answer.  I am using the <bean:write> tag to write a 
> property from a
> Map-backed ActionForm.  The Map in my Actionform is called 
> profile and I
> have that set up properly.  However, it seems as though the property
> attribute in <bean:write> doesn't like expressions embedded 
> within a String.
> The following fails:
> 
> <bean:write name="profileActionForm"
> property="profile(<%=ProfileMetaData.ID%>)"/>
> 
> while the following works:
> 
> <bean:write name="profileActionForm" property="profile(ID)"/>
> 
> In this example, ProfileMetaData.ID = "ID" so both lines 
> should evaluate to
> the same thing.  I am using a nightly build from a couple 
> days ago, and the
> struts-bean.tld indicates that rtexprvalue=true for 
> bean:write's property
> attribute.
> 
> Does rtexprvalue=true only allow me to have 
> property="<%=expr%>", but not
> property="profile(<%=expr%>)"?  If this is the case, it seems like a
> shortcoming in JSP.  If somebody has a quick way to do what 
> I'm trying to
> do, I would appreciate the help.

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message