struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: DynaBeans, DynaClass, DynaMen
Date Mon, 01 Jul 2002 17:27:52 GMT


On Mon, 1 Jul 2002 wbchmura@Ensign-BickfordInd.com wrote:

> Date: Mon, 1 Jul 2002 10:39:46 -0400
> From: wbchmura@Ensign-BickfordInd.com
> Reply-To: Struts Users Mailing List <struts-user@jakarta.apache.org>
> To: struts-user@jakarta.apache.org
> Subject: DynaBeans, DynaClass, DynaMen
>
>
> ...anyone remember DynaMen?
>
> Anyhow...  I got a Dynabean mechanism working that builds a DynaBean
> based on the metadata of a SQL result set, populates and array of the
> little buggers and passes it back to me.  For displaying I have a tag
> library that does not like a call to get('name') as the field name.
> What is the best way to get around this?
>
> (A) Write a bean to encapsulate the dynabean and provide hard method
> gets and sets
> (B) Modify the tag library to detect a DynaBean and access it via a get
> and set (not my library)
> (C) Don't use dynabeans for this sort of thing
> (D) None of the above you dufus
>

The standard methods in BeanUtils and PropertyUtils know how to deal with
DynaBeans already (essentially your option (B)).  That is why all of the
Struts tags can deal with DynaBeans or standard JavaBeans with no changes.
Is there a reason you can't use things like <bean:write> directly on your
DynaBeans as well?

> I can do any of the above - I just want to make sure that there is not
> an obvious way I am missing.
>
> Thanks and happy monday
>

Craig


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