svn commit: r761664 - in /ofbiz/trunk/framework/widget: config/widget.properties src/org/ofbiz/widget/screen/MacroScreenViewHandler.java

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

svn commit: r761664 - in /ofbiz/trunk/framework/widget: config/widget.properties src/org/ofbiz/widget/screen/MacroScreenViewHandler.java

jacopoc
Author: jacopoc
Date: Fri Apr  3 13:14:51 2009
New Revision: 761664

URL: http://svn.apache.org/viewvc?rev=761664&view=rev
Log:
Added some code, commented out, for upcoming (hopefully) implementation of macro renderers for menu and tree widgets

Modified:
    ofbiz/trunk/framework/widget/config/widget.properties
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenViewHandler.java

Modified: ofbiz/trunk/framework/widget/config/widget.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/config/widget.properties?rev=761664&r1=761663&r2=761664&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/config/widget.properties (original)
+++ ofbiz/trunk/framework/widget/config/widget.properties Fri Apr  3 13:14:51 2009
@@ -36,15 +36,21 @@
 # html output
 screen.screenrenderer=component://widget/templates/htmlScreenMacroLibrary.ftl
 screen.formrenderer=component://widget/templates/htmlFormMacroLibrary.ftl
+screen.menurenderer=component://widget/templates/htmlMenuMacroLibrary.ftl
+screen.treerenderer=component://widget/templates/htmlTreeMacroLibrary.ftl
 screen.default.contenttype=UTF-8
 screen.default.encoding=none
 # text output
 screentext.screenrenderer=component://widget/templates/textScreenMacroLibrary.ftl
 screentext.formrenderer=component://widget/templates/textFormMacroLibrary.ftl
+screentext.menurenderer=component://widget/templates/textMenuMacroLibrary.ftl
+screentext.treerenderer=component://widget/templates/textTreeMacroLibrary.ftl
 screentext.default.contenttype=UTF-8
 screentext.default.encoding=none
 # xml output
 screenxml.screenrenderer=component://widget/templates/xmlScreenMacroLibrary.ftl
 screenxml.formrenderer=component://widget/templates/xmlFormMacroLibrary.ftl
+screenxml.menurenderer=component://widget/templates/xmlMenuMacroLibrary.ftl
+screenxml.treerenderer=component://widget/templates/xmlTreeMacroLibrary.ftl
 screenxml.default.contenttype=UTF-8
 screenxml.default.encoding=none

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenViewHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenViewHandler.java?rev=761664&r1=761663&r2=761664&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenViewHandler.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenViewHandler.java Fri Apr  3 13:14:51 2009
@@ -40,10 +40,14 @@
 import org.ofbiz.webapp.view.ViewHandlerException;
 import org.xml.sax.SAXException;
 
+import org.ofbiz.widget.menu.MenuStringRenderer;
+//import org.ofbiz.widget.menu.MacroMenuRenderer;
+import org.ofbiz.widget.tree.TreeStringRenderer;
+//import org.ofbiz.widget.tree.MacroTreeRenderer;
 import org.ofbiz.widget.form.FormStringRenderer;
+import org.ofbiz.widget.form.MacroFormRenderer;
 import org.ofbiz.widget.screen.ScreenStringRenderer;
 import org.ofbiz.widget.screen.MacroScreenRenderer;
-import org.ofbiz.widget.form.MacroFormRenderer;
 
 import freemarker.template.TemplateException;
 import freemarker.template.utility.StandardCompress;
@@ -89,6 +93,9 @@
 
             ScreenStringRenderer screenStringRenderer = new MacroScreenRenderer(UtilProperties.getPropertyValue("widget", getName() + ".screenrenderer"), writer);
             FormStringRenderer formStringRenderer = new MacroFormRenderer(UtilProperties.getPropertyValue("widget", getName() + ".formrenderer"), writer, request, response);
+            // TODO: uncomment these lines when the renderers are implemented
+            //TreeStringRenderer treeStringRenderer = new MacroTreeRenderer(UtilProperties.getPropertyValue("widget", getName() + ".treerenderer"), writer);
+            //MenuStringRenderer menuStringRenderer = new MacroMenuRenderer(UtilProperties.getPropertyValue("widget", getName() + ".menurenderer"), writer);
 
             ScreenRenderer screens = new ScreenRenderer(writer, null, screenStringRenderer);
             screens.populateContextForRequest(request, response, servletContext);