提交 bd54f999 编写于 作者: K Kohsuke Kawaguchi

properly capture the currentDescriptorByNameUrl (when <l:renderOnDemand> is nested twice)

上级 6eccb542
......@@ -24,6 +24,7 @@
package hudson.widgets;
import hudson.Util;
import hudson.model.Descriptor;
import hudson.model.DescriptorByNameOwner;
import hudson.util.IOException2;
import hudson.util.PackedMap;
......@@ -74,10 +75,7 @@ public class RenderOnDemandClosure {
variables.put(v,context.getVariable(v));
// capture the current base of context for descriptors
StaplerRequest req = Stapler.getCurrentRequest();
Ancestor a = req.findAncestor(DescriptorByNameOwner.class);
currentDescriptorByNameUrl = a.getUrl();
currentDescriptorByNameUrl = Descriptor.getCurrentDescriptorByNameUrl();
this.variables = PackedMap.of(variables);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册