Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Re: FreeMarker Question

MassimoH

2007-12-03



Thanks for the replies, everyone, but I found a solution. If anyone else is
facing the same issue and finds this thread, here is how I resolved:

public class CustomFreemarkerManager extends FreemarkerManager {
 @Override
 protected ScopesHashModel buildScopesHashModel(ServletContext
servletContext, HttpServletRequest request, HttpServletResponse response,
ObjectWrapper wrapper, ValueStack stack) {
   ScopesHashModel model = super.buildScopesHashModel(servletContext,
request, response, wrapper, stack);

   BeansWrapper beansWrapperInstance = getObjectWrapper();
   model.put("statics", beansWrapperInstance.getStaticModels());
   model.put("enums", beansWrapperInstance.getEnumModels());
   
   return model;
 }
}
--
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.