svn commit: r662127 - in /ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl: RenderContentAsText.java RenderContentTransform.java RenderSubContentCacheTransform.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r662127 - in /ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl: RenderContentAsText.java RenderContentTransform.java RenderSubContentCacheTransform.java

adrianc
Author: adrianc
Date: Sat May 31 19:34:49 2008
New Revision: 662127

URL: http://svn.apache.org/viewvc?rev=662127&view=rev
Log:
Oops, missed some files in last commit.

Modified:
    ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAsText.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentTransform.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAsText.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAsText.java?rev=662127&r1=662126&r2=662127&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAsText.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAsText.java Sat May 31 19:34:49 2008
@@ -38,8 +38,8 @@
 import org.ofbiz.base.util.template.FreeMarkerWorker;
 import org.ofbiz.content.content.ContentWorker;
 import org.ofbiz.entity.GenericDelegator;
-import org.ofbiz.widget.WidgetWorker;
 import org.ofbiz.service.LocalDispatcher;
+import org.ofbiz.widget.WidgetWorker;
 
 import freemarker.core.Environment;
 import freemarker.template.TemplateTransformModel;
@@ -208,7 +208,6 @@
             public void closeEditWrap(Writer out, String editRequestName) throws IOException {
                 if (Debug.infoOn()) Debug.logInfo("in RenderSubContent, contentId(3):" + templateRoot.get("contentId"), module);
                 if (Debug.infoOn()) Debug.logInfo("in RenderSubContent, subContentId(3):" + templateRoot.get("subContentId"), module);
-                StringBuffer sb = new StringBuffer();
                 String fullRequest = editRequestName;
                 String contentId = null;
                 contentId = (String)templateRoot.get("subContentId");
@@ -218,12 +217,10 @@
                     delim = "&";
                 }
               
-                WidgetWorker.appendOfbizUrl(sb, fullRequest, request, response);
-                String url = sb.toString();
-                String link = "<a href=\"" + url + "\">Edit</a>";
-                out.write(link);
-                String divStr = "</div>";
-                out.write(divStr);
+                out.write("<a href=\"");
+                WidgetWorker.appendOfbizUrl(out, fullRequest, request, response);
+                out.write("\">Edit</a>");
+                out.write("</div>");
             }
 
             public String getEditStyle() {

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentTransform.java?rev=662127&r1=662126&r2=662127&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentTransform.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentTransform.java Sat May 31 19:34:49 2008
@@ -20,8 +20,6 @@
 
 import java.io.IOException;
 import java.io.Writer;
-import java.util.HashMap;
-import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 
@@ -135,12 +133,10 @@
                     delim = "&";
                 }
               
-                WidgetWorker.appendOfbizUrl(sb, fullRequest, request, response);
-                String url = sb.toString();
-                String link = "<a href=\"" + url + "\">Edit</a>";
-                out.write(link);
-                String divStr = "</div>";
-                out.write(divStr);
+                out.write("<a href=\"");
+                WidgetWorker.appendOfbizUrl(out, fullRequest, request, response);
+                out.write("\">Edit</a>");
+                out.write("</div>");
             }
 
             public String getEditStyle() {

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java?rev=662127&r1=662126&r2=662127&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java Sat May 31 19:34:49 2008
@@ -39,12 +39,11 @@
 import org.ofbiz.entity.GenericDelegator;
 import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.model.ModelEntity;
-import org.ofbiz.widget.WidgetWorker;
 import org.ofbiz.service.LocalDispatcher;
+import org.ofbiz.widget.WidgetWorker;
 
 import freemarker.core.Environment;
 import freemarker.template.TemplateTransformModel;
-//import com.clarkware.profiler.Profiler;
 
 /**
  * RenderSubContentCacheTransform - Freemarker Transform for Content rendering
@@ -263,12 +262,10 @@
                 }
               
                 if (Debug.infoOn()) Debug.logInfo("in Render(2), contentIdTo ." + contentIdTo , module);
-                WidgetWorker.appendOfbizUrl(sb, fullRequest, request, response);
-                String url = sb.toString();
-                String link = "<a href=\"" + url + "\">Edit</a>";
-                out.write(link);
-                String divStr = "</div>";
-                out.write(divStr);
+                out.write("<a href=\"");
+                WidgetWorker.appendOfbizUrl(out, fullRequest, request, response);
+                out.write("\">Edit</a>");
+                out.write("</div>");
             }
 
             public String getEditStyle() {