Something to look forward to :-) Brandon Goodin Phase Web and Multimedia P (406) 862-2245 F (406) 862-0354 [EMAIL PROTECTED] http://www.phase.ws
-----Original Message----- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 16, 2002 12:22 PM To: Struts Developers List Subject: Re: DynaBean examples? On Wed, 16 Jan 2002, Will Jaynes wrote: > Date: Wed, 16 Jan 2002 11:37:15 -0500 > From: Will Jaynes <[EMAIL PROTECTED]> > Reply-To: Struts Developers List <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: DynaBean examples? > > Does someone have any code demonstrating the use of the DynaBean stuff? > I'm sure I want to use it, but I need a little kick-start. > One place to start would be to look at the unit test programs in the commons-beanutils nightly source bundle. But, fundamentally, it's not totally different from how yo access properties using PropertyUtils, where you might say: MyBean bean = ...; String name = PropertyUtils.getSimpleProperty(bean, "name"); you would instead say MyBean bean = ...; // Must implement DynaBean String name = bean.get("name"); One very nice feature is that PropertyUtils has been enhanced to understand DynaBeans internally, so you can actually use *either* syntax in your application. That way, all the Struts tags that already use PropertyUtils will be able to auto-magically work with DynaBeans as well. Look for a check-in of DynaActionForm (so that you can define the properties of form beans without having to create a Java clas for every one) real soon now ... > Will > Craig -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>