svn commit: r995203 - in /ofbiz/trunk/framework/widget/src/org/ofbiz/widget: form/FormFactory.java menu/MenuFactory.java screen/ScreenFactory.java tree/TreeFactory.java

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

svn commit: r995203 - in /ofbiz/trunk/framework/widget/src/org/ofbiz/widget: form/FormFactory.java menu/MenuFactory.java screen/ScreenFactory.java tree/TreeFactory.java

doogie-3
Author: doogie
Date: Wed Sep  8 19:03:24 2010
New Revision: 995203

URL: http://svn.apache.org/viewvc?rev=995203&view=rev
Log:
Enable tracking of xml node positions when reading documents.

Modified:
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/FormFactory.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuFactory.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenFactory.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/TreeFactory.java

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/FormFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/FormFactory.java?rev=995203&r1=995202&r2=995203&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/FormFactory.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/FormFactory.java Wed Sep  8 19:03:24 2010
@@ -59,7 +59,7 @@ public class FormFactory {
         }
         */
         URL formFileUrl = FlexibleLocation.resolveLocation(resourceName); //, loader);
-        Document formFileDoc = UtilXml.readXmlDocument(formFileUrl, true);
+        Document formFileDoc = UtilXml.readXmlDocument(formFileUrl, true, true);
         return readFormDocument(formFileDoc, entityModelReader, dispatchContext, resourceName);
     }
 
@@ -78,7 +78,7 @@ public class FormFactory {
                     }
                     */
                     URL formFileUrl = FlexibleLocation.resolveLocation(resourceName); //, loader);
-                    Document formFileDoc = UtilXml.readXmlDocument(formFileUrl, true);
+                    Document formFileDoc = UtilXml.readXmlDocument(formFileUrl, true, true);
                     if (formFileDoc == null) {
                         throw new IllegalArgumentException("Could not find resource [" + resourceName + "]");
                     }
@@ -106,7 +106,7 @@ public class FormFactory {
                     Delegator delegator = (Delegator) request.getAttribute("delegator");
                     LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
                     URL formFileUrl = servletContext.getResource(resourceName);
-                    Document formFileDoc = UtilXml.readXmlDocument(formFileUrl, true);
+                    Document formFileDoc = UtilXml.readXmlDocument(formFileUrl, true, true);
                     Element formElement = UtilXml.firstChildElement(formFileDoc.getDocumentElement(), "form", "name", formName);
                     modelForm = new ModelForm(formElement, delegator.getModelReader(), dispatcher.getDispatchContext());
                     modelForm.setFormLocation(resourceName);

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuFactory.java?rev=995203&r1=995202&r2=995203&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuFactory.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuFactory.java Wed Sep  8 19:03:24 2010
@@ -62,7 +62,7 @@ public class MenuFactory {
                     ServletContext servletContext = (ServletContext) request.getAttribute("servletContext");
 
                     URL menuFileUrl = servletContext.getResource(resourceName);
-                    Document menuFileDoc = UtilXml.readXmlDocument(menuFileUrl, true);
+                    Document menuFileDoc = UtilXml.readXmlDocument(menuFileUrl, true, true);
                     modelMenuMap = readMenuDocument(menuFileDoc, cacheKey);
                     menuWebappCache.put(cacheKey, modelMenuMap);
                 }
@@ -112,7 +112,7 @@ public class MenuFactory {
 
                     URL menuFileUrl = null;
                     menuFileUrl = FlexibleLocation.resolveLocation(resourceName); //, loader);
-                    Document menuFileDoc = UtilXml.readXmlDocument(menuFileUrl, true);
+                    Document menuFileDoc = UtilXml.readXmlDocument(menuFileUrl, true, true);
                     modelMenuMap = readMenuDocument(menuFileDoc, resourceName);
                     menuLocationCache.put(resourceName, modelMenuMap);
                 }

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenFactory.java?rev=995203&r1=995202&r2=995203&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenFactory.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenFactory.java Wed Sep  8 19:03:24 2010
@@ -121,7 +121,7 @@ public class ScreenFactory {
                     if (screenFileUrl == null) {
                         throw new IllegalArgumentException("Could not resolve location to URL: " + resourceName);
                     }
-                    Document screenFileDoc = UtilXml.readXmlDocument(screenFileUrl, true);
+                    Document screenFileDoc = UtilXml.readXmlDocument(screenFileUrl, true, true);
                     modelScreenMap = readScreenDocument(screenFileDoc, resourceName);
                     screenLocationCache.put(resourceName, modelScreenMap);
                     double totalSeconds = (System.currentTimeMillis() - startTime)/1000.0;
@@ -150,7 +150,7 @@ public class ScreenFactory {
                     ServletContext servletContext = (ServletContext) request.getAttribute("servletContext");
 
                     URL screenFileUrl = servletContext.getResource(resourceName);
-                    Document screenFileDoc = UtilXml.readXmlDocument(screenFileUrl, true);
+                    Document screenFileDoc = UtilXml.readXmlDocument(screenFileUrl, true, true);
                     modelScreenMap = readScreenDocument(screenFileDoc, resourceName);
                     screenWebappCache.put(cacheKey, modelScreenMap);
                 }

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/TreeFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/TreeFactory.java?rev=995203&r1=995202&r2=995203&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/TreeFactory.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/TreeFactory.java Wed Sep  8 19:03:24 2010
@@ -62,7 +62,7 @@ public class TreeFactory {
 
                     URL treeFileUrl = null;
                     treeFileUrl = FlexibleLocation.resolveLocation(resourceName); //, loader);
-                    Document treeFileDoc = UtilXml.readXmlDocument(treeFileUrl, true);
+                    Document treeFileDoc = UtilXml.readXmlDocument(treeFileUrl, true, true);
                     modelTreeMap = readTreeDocument(treeFileDoc, delegator, dispatcher, resourceName);
                     treeLocationCache.put(resourceName, modelTreeMap);
                 }
@@ -92,7 +92,7 @@ public class TreeFactory {
                     LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
 
                     URL treeFileUrl = servletContext.getResource(resourceName);
-                    Document treeFileDoc = UtilXml.readXmlDocument(treeFileUrl, true);
+                    Document treeFileDoc = UtilXml.readXmlDocument(treeFileUrl, true, true);
                     modelTreeMap = readTreeDocument(treeFileDoc, delegator, dispatcher, cacheKey);
                     treeWebappCache.put(cacheKey, modelTreeMap);
                 }