* Use res.skinpath to find hrefSkin when post-processing hrefs.

Fixes bug 450.
This commit is contained in:
hns 2006-01-11 09:40:26 +00:00
parent fc0edbb269
commit e7bca045d1

View file

@ -706,12 +706,15 @@ public final class RhinoCore implements ScopeProvider {
// first, look in the object href was called on. // first, look in the object href was called on.
Skin skin = null; Skin skin = null;
Object handler = obj; Object handler = obj;
// get the currently active rhino engine and render the skin
Context cx = Context.getCurrentContext();
RhinoEngine engine = (RhinoEngine) cx.getThreadLocal("engine");
while (handler != null) { while (handler != null) {
Prototype proto = app.getPrototype(handler); Prototype proto = app.getPrototype(handler);
if (proto != null) { if (proto != null) {
skin = proto.getSkin(hrefSkin); skin = engine.getSkin(proto.getName(), hrefSkin);
} }
if (skin != null) { if (skin != null) {
@ -722,10 +725,6 @@ public final class RhinoCore implements ScopeProvider {
} }
if (skin != null) { if (skin != null) {
// get the currently active rhino engine and render the skin
Context cx = Context.getCurrentContext();
RhinoEngine engine = (RhinoEngine) cx.getThreadLocal("engine");
engine.getResponse().pushStringBuffer(); engine.getResponse().pushStringBuffer();
HashMap param = new HashMap(); HashMap param = new HashMap();
param.put("path", basicHref); param.put("path", basicHref);