On Mon, 1 Jul 2002 [EMAIL PROTECTED] wrote:

> Date: Mon, 1 Jul 2002 10:39:46 -0400
> From: [EMAIL PROTECTED]
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> 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:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to