href skin is now searched in object path of the object on which
href was invoked, not in URL path of the request.
This commit is contained in:
parent
cb6d350588
commit
7eddb2e9c1
1 changed files with 11 additions and 15 deletions
|
@ -990,25 +990,21 @@ public class HopExtension {
|
||||||
if (hrefSkin != null) {
|
if (hrefSkin != null) {
|
||||||
// we need to post-process the href with a skin for this application
|
// we need to post-process the href with a skin for this application
|
||||||
// first, look in the object href was called on.
|
// first, look in the object href was called on.
|
||||||
Prototype proto = app.getPrototype (n);
|
INode sn = n;
|
||||||
Skin skin = null;
|
Skin skin = null;
|
||||||
if (proto != null) {
|
while (skin == null && sn != null) {
|
||||||
|
Prototype proto = app.getPrototype (sn);
|
||||||
|
if (proto != null)
|
||||||
skin = proto.getSkin (hrefSkin);
|
skin = proto.getSkin (hrefSkin);
|
||||||
if (skin != null)
|
if (skin == null)
|
||||||
return renderSkin (skin, basicHref, (ESNode) thisObject);
|
sn = sn.getParent ();
|
||||||
}
|
}
|
||||||
for (int i=reval.reqPath.size()-1; i>=0; i--) {
|
|
||||||
ESNode esn = (ESNode) reval.reqPath.getProperty (i);
|
|
||||||
INode sn = esn.getNode ();
|
|
||||||
proto = app.getPrototype (sn);
|
|
||||||
if (proto != null) {
|
|
||||||
skin = proto.getSkin (hrefSkin);
|
|
||||||
if (skin != null) {
|
if (skin != null) {
|
||||||
|
ESNode esn = reval.getNodeWrapper (sn);
|
||||||
return renderSkin (skin, basicHref, esn);
|
return renderSkin (skin, basicHref, esn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
return new ESString (basicHref);
|
return new ESString (basicHref);
|
||||||
}
|
}
|
||||||
private ESString renderSkin (Skin skin, String path, ESNode obj) throws EcmaScriptException {
|
private ESString renderSkin (Skin skin, String path, ESNode obj) throws EcmaScriptException {
|
||||||
|
|
Loading…
Add table
Reference in a new issue