Re: "pluggable" beans wrapper
Grégory Joseph <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
Hi again, I have this working nicely now - however, if I want to register ModelFactories at runtime, it is often "too late": Factories have been cached in ModelCache. Is there any way to control ModelCache from my custom ObjectWrapper ? The instance is private, and as far as I can tell, there are no accessors for it. A complete flush of all caches related to ObjectWrapper might be useful. If nothing else, I guess I could just replace my custom ObjectWrapper with a fresh instance, but I'd like to poke here and see if there are any other ideas. Cheers, -greg On Dec 16, 2008, at 2:32 PM, Grégory Joseph wrote: > Thanks Attila. This opens up a whole lot more flexibility :) > > Cheers, > > -g > > On Dec 16, 2008, at 10:19 AM, Attila Szegedi wrote: > >> You can certainly subclass BeansWrapper and override >> getModelFactory(). The sole reason it is marked protected instead of >> private is so that subclasses can override it. As for JavaDoc, I >> guess >> I'll remove the word "internal" -- not sure why's that there... >> >> Attila. >> -- >> home: http://www.szegedi.org >> twitter: http://twitter.com/szegedi >> weblog: http://constc.blogspot.com >> >> On 2008.12.15., at 18:08, Grégory Joseph wrote: >> >>> Hi, >>> >>> Having a pluggable beans wrappers - where components could somehow >>> "register" the wrappers on a per-class basis would be useful for me >>> right now. I thought I could use an extended version of >>> getModelFactory() which would use a Map<Class, ModelFactory>. Now I >>> read in ModelFactory's javadoc that it's an "internal interface". >>> What >>> is the status on this ? How safe would it be for me and my project >>> to >>> use this in the longer run ? >>> >>> Cheers, >>> -g >> >> ------------------------------------------------------------------------------ >> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, >> Nevada. >> The future of the web can't happen without you. Join us at MIX09 to >> help >> pave the way to the Next Web now. Learn more and register at >> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ >> _______________________________________________ >> FreeMarker-user mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/freemarker-user > > > > ------------------------------------------------------------------------------ > SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, > Nevada. > The future of the web can't happen without you. Join us at MIX09 to > help > pave the way to the Next Web now. Learn more and register at > http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ > _______________________________________________ > FreeMarker-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/freemarker-user ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword