You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Henri Yandell <ba...@generationjava.com> on 2003/12/01 17:27:03 UTC

[beanutils] Dynabeans

I was playing with DynaBeans recently but couldn't find any faster way to
create a DynaBean than:

        DynaClass dc = new BasicDynaClass(
            "SomeNameBean",
            BasicDynaBean.class,
            new DynaProperty[] { new DynaProperty(property) }
        );
        DynaBean seeker = new BasicDynaBean( dc );
        seeker.set(property, value);

or something with more properties/types etc.

Is there any kind of Factory to make life easier?

Hen


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [beanutils] Dynabeans

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
hi henri

i'm afraid that i'm not a dynabeans expert but it looks like you'll 
have to make do :)

i don't think that there's an factory to make this easy (but it'd be 
easy to add one :)

- robert

On 1 Dec 2003, at 16:27, Henri Yandell wrote:

>
> I was playing with DynaBeans recently but couldn't find any faster way 
> to
> create a DynaBean than:
>
>         DynaClass dc = new BasicDynaClass(
>             "SomeNameBean",
>             BasicDynaBean.class,
>             new DynaProperty[] { new DynaProperty(property) }
>         );
>         DynaBean seeker = new BasicDynaBean( dc );
>         seeker.set(property, value);
>
> or something with more properties/types etc.
>
> Is there any kind of Factory to make life easier?
>
> Hen
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [beanutils] Dynabeans

Posted by "Craig R. McClanahan" <cr...@apache.org>.
Quoting Henri Yandell <ba...@generationjava.com>:

> 
> I was playing with DynaBeans recently but couldn't find any faster way to
> create a DynaBean than:
> 
>         DynaClass dc = new BasicDynaClass(
>             "SomeNameBean",
>             BasicDynaBean.class,
>             new DynaProperty[] { new DynaProperty(property) }
>         );
>         DynaBean seeker = new BasicDynaBean( dc );
>         seeker.set(property, value);
> 
> or something with more properties/types etc.
> 
> Is there any kind of Factory to make life easier?
> 
> Hen
> 

Something like a BasicDynaBeanFactory, with a way to configure the supported
DynaClass names and associated properties, would make an interesting addition. 
Struts has something like this for DynaActionForm beans, but it's not general
purpose.  The code, there, might serve as a basis for creating something more
reusable.

Craig


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org