svn commit: r779751 - in /ofbiz/trunk: framework/widget/src/org/ofbiz/widget/screen/ specialpurpose/ecommerce/webapp/ecommerce/includes/

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

svn commit: r779751 - in /ofbiz/trunk: framework/widget/src/org/ofbiz/widget/screen/ specialpurpose/ecommerce/webapp/ecommerce/includes/

adrianc
Author: adrianc
Date: Thu May 28 19:57:53 2009
New Revision: 779751

URL: http://svn.apache.org/viewvc?rev=779751&view=rev
Log:
Made a few changes to the HTML view handlers. Multiple DOCTYPE declarations were being generated when screens included other screens. Problem reported by Ryan Foster - https://issues.apache.org/jira/browse/OFBIZ-2543.


Modified:
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenViewHandler.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenRenderer.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenWidgetViewHandler.java
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl

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=779751&r1=779750&r2=779751&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 Thu May 28 19:57:53 2009
@@ -107,7 +107,9 @@
             //screens.getContext().put("treeStringRenderer", treeStringRenderer);
             //screens.getContext().put("menuStringRenderer", menuStringRenderer);
             screens.getContext().put("simpleEncoder", StringUtil.getEncoder(UtilProperties.getPropertyValue("widget", getName() + ".encoder")));
+            screenStringRenderer.renderScreenBegin(writer, screens.getContext());
             screens.render(page);
+            screenStringRenderer.renderScreenEnd(writer, screens.getContext());
             writer.flush();
         } catch (TemplateException e) {
             Debug.logError(e, "Error initializing screen renderer", module);

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=779751&r1=779750&r2=779751&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 May 28 19:57:53 2009
@@ -119,9 +119,7 @@
             GenericWidgetOutput gwo = screenCache.get(screenCombinedName, wcck);
             if (gwo == null) {
                 Writer sw = new StringWriter();
-                screenStringRenderer.renderScreenBegin(writer, context);
                 modelScreen.renderScreenString(sw, context, screenStringRenderer);
-                screenStringRenderer.renderScreenEnd(writer, context);
                 gwo = new GenericWidgetOutput(sw.toString());
                 screenCache.put(screenCombinedName, wcck, gwo);
                 writer.append(gwo.toString());
@@ -129,9 +127,7 @@
                 writer.append(gwo.toString());
             }
         } else {
-            screenStringRenderer.renderScreenBegin(writer, context);
             modelScreen.renderScreenString(writer, context, screenStringRenderer);
-            screenStringRenderer.renderScreenEnd(writer, context);
         }
         return "";
     }

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenWidgetViewHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenWidgetViewHandler.java?rev=779751&r1=779750&r2=779751&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenWidgetViewHandler.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenWidgetViewHandler.java Thu May 28 19:57:53 2009
@@ -95,7 +95,9 @@
             FreeMarkerWorker.getSiteParameters(request, screens.getContext());
             screens.getContext().put("formStringRenderer", new HtmlFormRenderer(request, response));
             screens.getContext().put("simpleEncoder", StringUtil.htmlEncoder);
+            htmlScreenRenderer.renderScreenBegin(writer, screens.getContext());
             screens.render(page);
+            htmlScreenRenderer.renderScreenEnd(writer, screens.getContext());
         } catch (IOException e) {
             throw new ViewHandlerException("Error in the response writer/output stream: " + e.toString(), e);
         } catch (SAXException e) {

Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl?rev=779751&r1=779750&r2=779751&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl Thu May 28 19:57:53 2009
@@ -16,9 +16,7 @@
 specific language governing permissions and limitations
 under the License.
 -->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
-<#-- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> -->
 <head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
   <title><#if title?has_content>${title}<#elseif titleProperty?has_content>${uiLabelMap.get(titleProperty)}</#if>: ${(productStore.storeName)?if_exists}</title>