svn commit: r578181 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java

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

svn commit: r578181 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java

byersa-3
Author: byersa
Date: Fri Sep 21 08:49:07 2007
New Revision: 578181

URL: http://svn.apache.org/viewvc?rev=578181&view=rev
Log:
Tuning the method so that it gives passed dataResourceId priority over passed contentId, but not
over content.dataResourceId.

Modified:
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java?rev=578181&r1=578180&r2=578181&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java Fri Sep 21 08:49:07 2007
@@ -300,13 +300,7 @@
         if (Debug.verboseOn()) Debug.logVerbose("expandedContentId:" + expandedContentId, module);
         
         try {
-            if (UtilValidate.isNotEmpty(expandedDataResourceId)) {
-               if (WidgetDataResourceWorker.dataresourceWorker != null) {
-                   renderedContent = WidgetDataResourceWorker.dataresourceWorker.renderDataResourceAsTextExt(delegator, expandedDataResourceId, contentContext, locale, mimeTypeId, false);
-               } else {
-                   Debug.logError("Not rendering content, not WidgetDataResourceWorker.dataresourceWorker found.", module);
-               }
-            } else if (UtilValidate.isNotEmpty(dataResourceId)) {
+            if (UtilValidate.isNotEmpty(dataResourceId)) {
                 if (WidgetDataResourceWorker.dataresourceWorker != null) {
                     renderedContent = WidgetDataResourceWorker.dataresourceWorker.renderDataResourceAsTextExt(delegator, dataResourceId, contentContext, locale, mimeTypeId, false);
                 } else {
@@ -317,6 +311,12 @@
                     renderedContent = WidgetContentWorker.contentWorker.renderContentAsTextExt(dispatcher, delegator, expandedContentId, contentContext, locale, mimeTypeId, true);
                 } else {
                     Debug.logError("Not rendering content, not ContentWorker found.", module);
+                }
+            } else if (UtilValidate.isNotEmpty(expandedDataResourceId)) {
+                if (WidgetDataResourceWorker.dataresourceWorker != null) {
+                    renderedContent = WidgetDataResourceWorker.dataresourceWorker.renderDataResourceAsTextExt(delegator, expandedDataResourceId, contentContext, locale, mimeTypeId, false);
+                } else {
+                    Debug.logError("Not rendering content, not WidgetDataResourceWorker.dataresourceWorker found.", module);
                 }
             }
             if (UtilValidate.isEmpty(renderedContent)) {