You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Dimitri Valdin <di...@db.com> on 2001/10/01 17:00:08 UTC

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.