Author: doogie
Date: Fri Mar 13 14:17:49 2009
New Revision: 753280

URL: http://svn.apache.org/viewvc?rev=753280&view=rev
Log:
Remove the need to have the singleton <screen> tag.

Modified:
    
ofbiz/trunk/framework/webslinger/modules/ofbiz/www/WEB-INF/TypeHandlers/ofbiz-screen.groovy
    
ofbiz/trunk/framework/webslinger/websites/webslinger/www/OfBiz/DemoScreen.ofbiz-screen

Modified: 
ofbiz/trunk/framework/webslinger/modules/ofbiz/www/WEB-INF/TypeHandlers/ofbiz-screen.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webslinger/modules/ofbiz/www/WEB-INF/TypeHandlers/ofbiz-screen.groovy?rev=753280&r1=753279&r2=753280&view=diff
==============================================================================
--- 
ofbiz/trunk/framework/webslinger/modules/ofbiz/www/WEB-INF/TypeHandlers/ofbiz-screen.groovy
 (original)
+++ 
ofbiz/trunk/framework/webslinger/modules/ofbiz/www/WEB-INF/TypeHandlers/ofbiz-screen.groovy
 Fri Mar 13 14:17:49 2009
@@ -18,9 +18,10 @@
             createValue: { fi, name ->
                 def file = fi.file
                 def singleScreenText = VFSUtil.getString(file)
-                def fullDocumentText = '<screens 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd";>'
 + singleScreenText + '</screens>'
+                def screenName = fi.servletFile.name.path
+                def fullDocumentText = '<screens 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd";><screen
 name="' + screenName + '">' + singleScreenText + '</screen></screens>'
                 def doc = UtilXml.readXmlDocument(fullDocumentText)
-                def screens = ScreenFactory.readScreenDocument(doc, 
file.toString())
+                def screens = ScreenFactory.readScreenDocument(doc, 
"webslinger://$webslinger.webslingerServletContext.id")
                 if (screens.size() != 1) throw new 
IllegalArgumentException('wrong size')
                 return screens.values().iterator().next()
             }

Modified: 
ofbiz/trunk/framework/webslinger/websites/webslinger/www/OfBiz/DemoScreen.ofbiz-screen
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webslinger/websites/webslinger/www/OfBiz/DemoScreen.ofbiz-screen?rev=753280&r1=753279&r2=753280&view=diff
==============================================================================
--- 
ofbiz/trunk/framework/webslinger/websites/webslinger/www/OfBiz/DemoScreen.ofbiz-screen
 (original)
+++ 
ofbiz/trunk/framework/webslinger/websites/webslinger/www/OfBiz/DemoScreen.ofbiz-screen
 Fri Mar 13 14:17:49 2009
@@ -1,4 +1,3 @@
-    <screen name="browsercerts">
         <section>
             <actions>
                 <set field="headerItem" value="main"/>
@@ -14,5 +13,3 @@
                 </decorator-screen>
             </widgets>
         </section>
-    </screen>
-


Reply via email to