From 9d6bd72355a784dc8cac21e59fefba150728b655 Mon Sep 17 00:00:00 2001 From: hns Date: Wed, 3 Dec 2003 11:33:56 +0000 Subject: [PATCH] Use getChildElement() rather than getSubnode() to get a child in HopObject.get() - otherwise, child objects are always accessible via id, even if accessname is specified. --- src/helma/scripting/rhino/HopObject.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/helma/scripting/rhino/HopObject.java b/src/helma/scripting/rhino/HopObject.java index aaa716d0..fd356c7b 100644 --- a/src/helma/scripting/rhino/HopObject.java +++ b/src/helma/scripting/rhino/HopObject.java @@ -304,7 +304,10 @@ public class HopObject extends ScriptableObject implements Wrapper { n = getFromNode(id.toString()); // then try to get child object by id if (n == null || n == NOT_FOUND) { - n = jsFunction_getById(id); + n = node.getChildElement(id.toString()); + if (n != null) { + n = Context.toObject(n, core.global); + } } }