Re: Does Freemarker support DynaBean?
Attila Szegedi <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
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