ofbiz-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leon (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OFBIZ-5870) Birt doesn't work
Date Fri, 27 Feb 2015 06:24:04 GMT

    [ https://issues.apache.org/jira/browse/OFBIZ-5870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14339787#comment-14339787
] 

Leon commented on OFBIZ-5870:
-----------------------------

Hi Jacques,

You should revert the changes to ScreenRenderer.java too. Since that class has been re-factoried
a lot, I paste the patch to current version as below:
{quote}
Index: framework/widget/src/org/ofbiz/widget/renderer/ScreenRenderer.java
===================================================================
--- framework/widget/src/org/ofbiz/widget/renderer/ScreenRenderer.java  (revision 1662639)
+++ framework/widget/src/org/ofbiz/widget/renderer/ScreenRenderer.java  (working copy)
@@ -63,6 +63,7 @@
 import freemarker.ext.jsp.TaglibFactory;
 import freemarker.ext.servlet.HttpRequestHashModel;
 import freemarker.ext.servlet.HttpSessionHashModel;
+import freemarker.ext.servlet.ServletContextHashModel;
 
 /**
  * Widget Library - Screen model class
@@ -246,7 +247,11 @@
         TaglibFactory JspTaglibs = new TaglibFactory(servletContext);
         context.put("JspTaglibs", JspTaglibs);
         context.put("requestParameters",  UtilHttp.getParameterMap(request));
-        
+       
+        ServletContextHashModel ftlServletContext = (ServletContextHashModel) request.getAttribute("ftlServletContext");
+        context.put("Application", ftlServletContext);
+        context.put("Request", context.get("requestAttributes"));
+ 
         // this is a dummy object to stand-in for the JPublish page object for backward compatibility
         context.put("page", new HashMap());
{quote}

> Birt doesn't work
> -----------------
>
>                 Key: OFBIZ-5870
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5870
>             Project: OFBiz
>          Issue Type: Bug
>          Components: specialpurpose/birt
>    Affects Versions: Trunk
>            Reporter: Leon
>             Fix For: Trunk
>
>
> Birt report does't work anymore.
> access following url: [http://demo-trunk-ofbiz.apache.org/birt/control/Report].
> error cut out :
> {quote}
> FreeMarker template error: Could not find an instance of freemarker.ext.servlet.ServletContextHashModel
in the data model under either the name __FreeMarkerServlet.Application__ or Application ----
FTL stack trace ("~" means nesting-related): - Failed at: @birt.report id="birtReport" reportDe...
[in template "component://birt/webapp/birt/birt/chartReport.ftl" at line 22, column 1] ----
Java stack trace (for programmers): ---- freemarker.template.TemplateModelException: [...
Exception message was already printed; see it above ...] at freemarker.ext.jsp.FreeMarkerPageContext.<init>(FreeMarkerPageContext.java:92)
at freemarker.ext.jsp._FreeMarkerPageContext21.<init>(_FreeMarkerPageContext21.java:53)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at 
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message