2003/11/19 02:40:17
[org.ibex.core.git] / src / org / xwt / Template.java
index 25159b4..90f5565 100644 (file)
@@ -89,7 +89,12 @@ public class Template {
 
     // Methods to apply templates ////////////////////////////////////////////////////////
 
-    private Template(Res r) { this.r = r; }
+    private Template(Res r) {
+        this.r = r;
+        String f = r.toString();
+        if (f != null && !f.equals(""))
+            fileName = f.substring(f.lastIndexOf('/')+1, f.endsWith(".xwt") ? f.length() - 4 : f.length());
+    }
 
     /** called before this template is applied or its static object can be externally referenced */
     JSScope getStatic() {