forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r629511 - /forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/panels/common-fo.panel.xml
Date Wed, 20 Feb 2008 15:42:07 GMT
Author: thorsten
Date: Wed Feb 20 07:41:40 2008
New Revision: 629511

URL: http://svn.apache.org/viewvc?rev=629511&view=rev
Log:
Fixing out of bounce when no / is in the path.

Modified:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/panels/common-fo.panel.xml

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/panels/common-fo.panel.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/panels/common-fo.panel.xml?rev=629511&r1=629510&r2=629511&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/panels/common-fo.panel.xml
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/panels/common-fo.panel.xml
Wed Feb 20 07:41:40 2008
@@ -18,7 +18,15 @@
 <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
   xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
   <jx:set var="end" value="${getRequest.lastIndexOf('/')}"/>
-  <jx:set var="path" value="${getRequest.substring(0,end)}"/>
+  <jx:choose>
+    <jx:when test="${end>0}">
+      <jx:set var="path" value="${getRequest.substring(0,end)}"/>
+    </jx:when>
+    <jx:otherwise>
+      <jx:set var="path" value="${getRequest}"/>
+    </jx:otherwise>
+  </jx:choose>
+  
 <!-- Settings specific to PDF output. -->
   <forrest:contract name="layout-master-set">
     <forrest:property name="config">



Mime
View raw message