On Thu, 4 Apr 2002, Torgeir Veimo wrote:
> Date: Thu, 04 Apr 2002 14:15:09 +0200
> From: Torgeir Veimo <[EMAIL PROTECTED]>
> Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> To: Struts Developers List <[EMAIL PROTECTED]>
> Subject: mapped properties and jndi's Attributes
>
> I would like to use mappend properties with jndi, but using
>
> <bean:write name='entry' property='(cn)' />
>
> doesn't work, since PropertyUtils chokes when not supplying anything
> before the opening parenthesis. Ideally a property of (string) would map
> to get(string), which is the getter method on Attributes.
>
> I thought I could look into PeopertyUtils to support this, but the code
> is a bit hard to get into at first sight.
>
> Has anyone thought of supporting get(String id) style properties in struts?
>
If you use DynaBean based beans, you can get pretty much the same effect
by just using:
<bean:write name='entry' property='cn'/>
because the underlying DynaBean property ends up being retrieved with:
String cn = entry.get("cn");
(This works in the nightly builds and in Struts 1.1-b1 -- it uses the most
recent commons-beanutils nightly builds as well.)
Over the longer term, I would strongly suggest that we *not* add any more
functionality to the proprietary "expression language" that Struts uses to
retrieve property values. Instead, it's time to start migrating to the
expression language being used in the JSP Standard Tag Library
(http://jakarta.apache.org/taglibs/standard), which will also become part
of JSP 1.3.
> --
> -Torgeir
>
Craig
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>