This feature is now available in the Jakarta commons project, where
BeanUtils/PropertyUtils have been upgrated to support MappedProperties,
which is exactly what you describe. Have a look at the BeanUtils 1.1
component on http://jakarta.apache.org/commons/components.html.

Fr.

PS: BeanUtils/PropertyUtils/Digester have moved to the commons project, and
are no longer part of Struts.



-----Original Message-----
From: Dimitri Valdin [mailto:[EMAIL PROTECTED]]
Sent: 01 October 2001 17:00
To: [EMAIL PROTECTED]
Subject: PropertyUtils.getIndexedProperty() with Obect key as parameter



Hello,

at the moment I am working for the Deutsche Bank in Germany. I have managed
to persuade
people to use Struts for their purposes, and we are happy about that. Thank
you for the nice product.

I would like to propose a small extension. It would be nice to have access
not only to indexed properties
with integer as index, but to get access to some property through some key,
for example to access
HashMap or Hashtables.

      <bean:write name="someBean" property="someProperty.value[key]"/>

Bean should have an access method getSomeProperty() which returns HashMap or
smth similar.

or

      <bean:write name="someBean" property="someProperty[key]"/>

Bean should have an access method Object getSomeProperty(Object key) similar
to
Object getSomeProperty(int index) which is already supported by Struts

Here is a sample implementation. Let me know what do you think about it, or
you have a better idea perhaps.

Regards,

Dmitri Valdin

(See attached file: PropertyUtils.java)(See attached file: A.java)(See
attached file: patchfile.txt)


--

Diese E-Mail enth�lt vertrauliche und/oder rechtlich gesch�tzte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
irrt�mlich erhalten haben, informieren Sie bitte sofort den Absender und
vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.

************************************************************************
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