Re: Does Freemarker support DynaBean?

Jeremy Chone <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
I use BeansWrapper.DEFAULT_WRAPPER, so I guess that should work.
BTW, this is cool, and should resolve my other requirements about "on
demand" properties.

Jeremy,


On Wed, Oct 14, 2009 at 10:46 PM, Attila Szegedi <[email protected]> wrote:

> If you use BeansWrapper, then yes, you will be able to do that. This
> is due to the fact that if the object has no static property of the
> requested name, but does have either a "public <any-return-value> get
> (Object)" or "public <any-return-value> get(String)" method, then its
> BeanModel wrapper will invoke that. This works for any class declaring
> a get() method, without the need to declare any particular interface.
> So, it accidentally works with DynaBean :-) If Apache folks would've
> named the method something other than get(), you'd be out of luck :-)
>
> Attila.
>
> On 2009.10.14., at 23:02, Jeremy Chone wrote:
>
> >
> http://commons.apache.org/beanutils/api/org/apache/commons/beanutils/DynaBean.html
> >
> > Basically, I would like to be able to do ${myDynaBean.propOne} where
> > myDynaBean is a Common DynaBean. Is that possible, or do I need to
> > get my own BeanWrapper for this type?
> >
> > Jeremy
> >
> > --
> > Jeremy Chone
> > +1 415 699 9912
> > CTO, VP Product Development and Operations,
> > www.iJuris.com
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> FreeMarker-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/freemarker-user
>



-- 
Jeremy Chone
+1 415 699 9912
CTO, VP Product Development and Operations,
www.iJuris.com

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference

_______________________________________________
FreeMarker-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemarker-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.