You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2007/06/15 17:44:42 UTC

svn commit: r547717 - in /lenya/trunk/src/modules/bxe: sitemap.xmap usecases/bxe.jx

Author: andreas
Date: Fri Jun 15 08:44:41 2007
New Revision: 547717

URL: http://svn.apache.org/viewvc?view=rev&rev=547717
Log:
Improve proxying behaviour of BXE (needs more testing, though)

Modified:
    lenya/trunk/src/modules/bxe/sitemap.xmap
    lenya/trunk/src/modules/bxe/usecases/bxe.jx

Modified: lenya/trunk/src/modules/bxe/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/bxe/sitemap.xmap?view=diff&rev=547717&r1=547716&r2=547717
==============================================================================
--- lenya/trunk/src/modules/bxe/sitemap.xmap (original)
+++ lenya/trunk/src/modules/bxe/sitemap.xmap Fri Jun 15 08:44:41 2007
@@ -140,13 +140,13 @@
               1. get the document contents (by issuing a GET to this URL),
               2. save the changed contents (by issuing a PUT to this URL)
             -->
-            <map:parameter name="BX_xmlfile" value="{request:contextPath}/{../1}/webdav/{../3}.xml?lenya.event=edit"/>
+            <map:parameter name="BX_xmlfile" value="{base-url:{../1}:{../2}}/../webdav/{../3}.xml?lenya.event=edit"/>
             <map:parameter name="defaultlanguage" value="{page-envelope:default-language}"/>
             
             <!-- Instead of an xsl we use the xhtml file to provide the basic layout
               <map:parameter name="BX_xslfile" value="{2}.xsl"/>
             -->
-            <map:parameter name="BX_xhtmlfile" value="{request:contextPath}/{../1}/{../2}/{../3}.bxe.html?rendertype=edit"/>
+            <map:parameter name="BX_xhtmlfile" value="{base-url:{../1}:{../2}}/{../3}.bxe.html?rendertype=edit"/>
             <map:parameter name="BX_validationfile" value="{resource-type:httpSchemaUri}"/>
             <map:parameter name="css" value="{request:contextPath}/lenya/css/default.css"/>
             <!-- The document is checked in when we exit from bx (in case of save&exit and in case of exit), so we use the usecase

Modified: lenya/trunk/src/modules/bxe/usecases/bxe.jx
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/bxe/usecases/bxe.jx?view=diff&rev=547717&r1=547716&r2=547717
==============================================================================
--- lenya/trunk/src/modules/bxe/usecases/bxe.jx (original)
+++ lenya/trunk/src/modules/bxe/usecases/bxe.jx Fri Jun 15 08:44:41 2007
@@ -8,8 +8,7 @@
   >
   
   <page:head>
-    <jx:set var="contextPath" value="${request.getContextPath()}"/>
-    <jx:set var="pathInfo" value="${request.getRequestURI().substring(contextPath.length())}"/>
+    <jx:set var="pathInfo" value="${usecase.getSourceURL()}"/>
     <jx:set var="steps" value="${pathInfo.split('/')}"/>
     <jx:set var="pubId" value="${java.util.Arrays.asList(steps).get(1)}"/>
     <link rel="stylesheet" href="/${pubId}/modules/bxe/bxe/css/editor.css" type="text/css"/>
@@ -18,8 +17,10 @@
   
   <page:title><i18n:text>Bitflux Editor</i18n:text></page:title>
   
-  <jx:set var="configFile" value="${request.getRequestURI()}"/>
-
+  <jx:set var="sourceUrl" value="${usecase.getSourceURL()}"/>
+  <jx:set var="steps" value="${sourceUrl.split('/')}"/>
+  <jx:set var="lastStep" value="${steps[steps.size() - 1]}"/>
+  
   <jx:choose>
     <jx:when test="${usecase.hasErrors()}">
       <page:body>
@@ -27,7 +28,7 @@
       </page:body>
     </jx:when>
     <jx:otherwise>
-      <page:body onload="bxe_start('${configFile}?lenya.module=bxe&amp;lenya.step=config')">
+      <page:body onload="bxe_start('${lastStep}?lenya.module=bxe&amp;lenya.step=config')">
     
         <!-- everything in the following div element will be replaced -->
         <div id="bxe_area">



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org