Re: Determining which BeansWrapper was used to wrap an object in the data model

Attila Szegedi <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Most objects implement TemplateHashModelEx, with which you can enumerate the available keys. Wouldn't that be sufficient for your needs?

Attila.

On Feb 21, 2011, at 2:22 PM, Rebecca Younes wrote:

> My Configuration uses a BeansWrapper with exposure level EXPOSE_PROPERTIES_ONLY to wrap template model objects by default. Sometimes I use a more permissive wrapper to wrap specific objects. When retrieving the data model from the template processing environment (for example, inside a Java directive called from the template), is there any way to determine which type of wrapper was used to wrap a particular object, so that I can determine which methods of the object are available to the template? I've looked at methods of DeepUnwrap and don't see anything that serves this purpose. 
> 
> Thank you.
> 
> Rebecca Younes

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev

_______________________________________________
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.