new TemplateHelper().parseit(r.getInputStream(), r.t);
return r.t;
} catch (Exception e) {
- if (Log.on) Log.log(r.t.fileName, e);
+ if (Log.on) Log.log(r.t == null ? "null" : r.t.fileName, e);
return null;
}
}
public static Res resolveStringToResource(String str, XWT xwt, boolean permitAbsolute) {
// URL
if (str.indexOf("://") != -1) {
- if (permitAbsolute) return Res.fromString(str);
+ // FIXME
+ //if (permitAbsolute) return Res.fromString(str);
Log.log(Template.class, "absolute URL " + str + " not permitted here");
return null;
}
if (staticscript == null) return staticJSScope;
JSFunction temp = staticscript;
staticscript = null;
- temp.cloneWithNewParentJSScope(staticJSScope).call(new JSArray());
+ temp.cloneWithNewParentJSScope(staticJSScope).call(null, null, null, null, 0);
return staticJSScope;
}
for (int i=0; children != null && i<children.size(); i++) {
Box kid = new BoxTree();
((Template)children.elementAt(i)).apply(kid, xwt, pis);
- b.putAndTriggerJSTraps(JSObj.N(b.numchildren), kid);
+ b.putAndTriggerJSTraps(JS.N(b.numchildren), kid);
}
- if (script != null) script.cloneWithNewParentJSScope(pis).call(new JSArray());
+ if (script != null) script.cloneWithNewParentJSScope(pis).call(null, null, null, null, 0);
for(int i=0; keys != null && i<keys.length; i++)
if (vals[i] instanceof String && ((String)vals[i]).charAt(0) == '$') b.putAndTriggerJSTraps(keys[i], pis.get(vals[i]));