Fix delete() to call super.delete() and handling of subnodeRelation property
to call the subnodeRelation methods on the wrapped node.
This commit is contained in:
parent
b6fb19c935
commit
28c6810fb0
1 changed files with 10 additions and 0 deletions
|
@ -460,6 +460,11 @@ public class HopObject extends ScriptableObject {
|
||||||
if (node == null) {
|
if (node == null) {
|
||||||
super.put(name, start, value);
|
super.put(name, start, value);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
if ("subnodeRelation".equals(name)) {
|
||||||
|
node.setSubnodeRelation(value == null ? null : value.toString());
|
||||||
|
}
|
||||||
|
|
||||||
if (value instanceof NativeJavaObject) {
|
if (value instanceof NativeJavaObject) {
|
||||||
value = ((NativeJavaObject) value).unwrap();
|
value = ((NativeJavaObject) value).unwrap();
|
||||||
}
|
}
|
||||||
|
@ -528,6 +533,7 @@ public class HopObject extends ScriptableObject {
|
||||||
* @param name ...
|
* @param name ...
|
||||||
*/
|
*/
|
||||||
public void delete(String name) {
|
public void delete(String name) {
|
||||||
|
super.delete(name);
|
||||||
if ((node != null)) {
|
if ((node != null)) {
|
||||||
node.unset(name);
|
node.unset(name);
|
||||||
}
|
}
|
||||||
|
@ -563,6 +569,10 @@ public class HopObject extends ScriptableObject {
|
||||||
return getInternalProperty(name);
|
return getInternalProperty(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ("subnodeRelation".equals(name)) {
|
||||||
|
return node.getSubnodeRelation();
|
||||||
|
}
|
||||||
|
|
||||||
IProperty p = node.get(name);
|
IProperty p = node.get(name);
|
||||||
|
|
||||||
if (p != null) {
|
if (p != null) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue