You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Ken X Horn <ho...@jpmorgan.com> on 2000/10/17 19:06:10 UTC

Nested bean setters query

I've been using a relatively old build of struts (Aug 4 + fixes & tweaks), but
am now interested in the nested property syntax property.innerProperty.

Looking at the current CVS tree, I see PropertyUtils has this functionality. I
replaced my old BeanUtils and added PropertyUtils, and suddenly had this working
for getters.

However, on trying to use setters (ie via BeanUtils.populate() ) - this is
either not implemented yet or I'm just missing the point.
Has this been done?

Since time is marching on in my project, I've implemented the nested setter
stuff using the code from BeanUtils/PropertyUtils (though probably not quite as
people may like...). If this is needed by the tree, I'm happy to submit a patch
/ list the changes.

Ken.



This communication is for informational purposes only.  It is not intended as
an offer or solicitation for the purchase or sale of any financial instrument
or as an official confirmation of any transaction. All market prices, data
and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein
do not necessarily reflect those of J.P. Morgan & Co. Incorporated, its
subsidiaries and affiliates.


Re: Nested bean setters query

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Ken X Horn wrote:

> I've been using a relatively old build of struts (Aug 4 + fixes & tweaks), but
> am now interested in the nested property syntax property.innerProperty.
>
> Looking at the current CVS tree, I see PropertyUtils has this functionality. I
> replaced my old BeanUtils and added PropertyUtils, and suddenly had this working
> for getters.
>
> However, on trying to use setters (ie via BeanUtils.populate() ) - this is
> either not implemented yet or I'm just missing the point.
> Has this been done?
>
> Since time is marching on in my project, I've implemented the nested setter
> stuff using the code from BeanUtils/PropertyUtils (though probably not quite as
> people may like...). If this is needed by the tree, I'm happy to submit a patch
> / list the changes.
>

Ken,

I'd be quite interested in the changes.  Doing the nested/indexed property trick for
setters has been on my list of things to finish, but hasn't quite made it to the top
yet.

>
> Ken.
>

Craig

PS:  There's a lot of serendiptiy in the world ... someone posted a plea for
supporting indexed setters on STRUTS-USER (and a patch) within a couple of minutes
of when you posted this :-)

====================
See you at ApacheCon Europe <http://www.apachecon.com>!
Session VS01 (23-Oct 13h00-17h00):  Sun Technical Briefing
Session T06  (24-Oct 14h00-15h00):  Migrating Apache JServ
                                    Applications to Tomcat