You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2011/01/20 15:23:29 UTC

svn commit: r1061310 - in /ofbiz/trunk/framework: webapp/src/org/ofbiz/webapp/control/ControlServlet.java widget/src/org/ofbiz/widget/screen/ScreenRenderer.java

Author: jleroux
Date: Thu Jan 20 14:23:29 2011
New Revision: 1061310

URL: http://svn.apache.org/viewvc?rev=1061310&view=rev
Log:
A patch from Chatree Srichart "Fix using TagLib in Freemarker." (https://issues.apache.org/jira/browse/OFBIZ-2703) - OFBIZ-2703

Fix using TagLib in freemarker follow this.
1. In ControlServlet.java, create ServletContextHashModel instance and set to request's attritube
2. In ScreenRenderer.java, set ServletContextHashModel instance from request's attribute to context name Application and set HttpRequestHashModel instance from requestAttributes in context to context name Request

Modified:
    ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenRenderer.java

Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java?rev=1061310&r1=1061309&r2=1061310&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java Thu Jan 20 14:23:29 2011
@@ -202,7 +202,7 @@ public class ControlServlet extends Http
         request.setAttribute("security", security);
 
         request.setAttribute("_REQUEST_HANDLER_", requestHandler);
-
+        
         ServletContextHashModel ftlServletContext = new ServletContextHashModel(this, BeansWrapper.getDefaultInstance());
         request.setAttribute("ftlServletContext", ftlServletContext);
 

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenRenderer.java?rev=1061310&r1=1061309&r2=1061310&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenRenderer.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenRenderer.java Thu Jan 20 14:23:29 2011
@@ -243,7 +243,7 @@ public class ScreenRenderer {
         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"));



Re: svn commit: r1061310 - in /ofbiz/trunk/framework: webapp/src/org/ofbiz/webapp/control/ControlServlet.java widget/src/org/ofbiz/widget/screen/ScreenRenderer.java

Posted by Jacques Le Roux <ja...@les7arts.com>.
Thanks Erwan,

Actually it has already been commited by Hans at r890175 when he merged the Birt branch. But as, I did not know at this time and the
issue was not closed, I thought it still needed to be committed. Then it was not a sole patch but 2 diffs. So I concatenated them
and applied the resulting patch with Tortoise (because Subclipse refused and I though it was because of my concatenation, so I tried
a merge with Tortoise and successed). So I thought it was good. But then when I compiled it refused again. I found the 2 duplicated
snippets and removed them and thought another time that it was because of the merge with Tortoise...

I'm a bit dissapointed because I posted a message 2 days ago about that, asking about this issue...

Jacques

From: "Erwan de FERRIERES" <er...@nereide.fr>
Subject: Re: svn commit: r1061310 - in /ofbiz/trunk/framework: webapp/src/org/ofbiz/webapp/control/ControlServlet.java
widget/src/org/ofbiz/widget/screen/ScreenRenderer.java
> Le 20/01/2011 15:23, jleroux@apache.org a écrit :
>> -
>> +
>
> You've just added spaces on this one... I doubt this is what you wanted to do !
>
> Cheers,
> -- 
> Erwan de FERRIERES
> www.nereide.biz
>



Re: svn commit: r1061310 - in /ofbiz/trunk/framework: webapp/src/org/ofbiz/webapp/control/ControlServlet.java widget/src/org/ofbiz/widget/screen/ScreenRenderer.java

Posted by Erwan de FERRIERES <er...@nereide.fr>.
Le 20/01/2011 15:23, jleroux@apache.org a écrit :
> -
> +

You've just added spaces on this one... I doubt this is what you wanted 
to do !

Cheers,
-- 
Erwan de FERRIERES
www.nereide.biz