On Fri, 12 Jul 2002, Thorbjoern Ravn Andersen wrote:

> Date: Fri, 12 Jul 2002 07:02:57 +0200
> From: Thorbjoern Ravn Andersen <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: Re: DynaBeans, DynaClass, DynaMen
>
> [EMAIL PROTECTED] skrev:
>
> >...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?
> >
> I wrote an AnonyBeans package which uses BCEL to generate beans on the
> fly based on a ResultSet.  It is alpha code but works for me, and is
> usable anywhere where you need a real traditional bean, but where you do
> not want to serialize it or  use its type in Java source.
>
> Is this interesting?
>

I think it would be  interestesting, even though it might not be
universally useful (some containers won't let you introduce new classes at
runtime).

I'd also be interested in a mechanism that converted a ResultSet into a
custom DynaClass, with a corresponding DynaBean for each row.  This would
be trivially simple to do -- so simple that it probably makes a worthwhile
addition to commons-beanutils itself if someone wanted to take this on.

This wouldn't help you create dynamic input forms, but it would make a
completely flexible bean-like wrapper around a result set so you can use
Struts tags to display stuff.

> --
>   Thorbjørn Ravn Andersen                 http://biobase.dk/~tra

Craig


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to