* Mark node clean in init() before invoking onInit() so we have a chance to
modify the node in onInit() and having the changes written back to db.
This commit is contained in:
parent
4b72017330
commit
4c50f96e3e
1 changed files with 4 additions and 4 deletions
|
@ -160,6 +160,10 @@ public final class Node implements INode, Serializable {
|
||||||
// set lastmodified and created timestamps and mark as clean
|
// set lastmodified and created timestamps and mark as clean
|
||||||
created = lastmodified = System.currentTimeMillis();
|
created = lastmodified = System.currentTimeMillis();
|
||||||
|
|
||||||
|
if (state != CLEAN) {
|
||||||
|
markAs(CLEAN);
|
||||||
|
}
|
||||||
|
|
||||||
// Invoke onInit() if it is defined by this Node's prototype
|
// Invoke onInit() if it is defined by this Node's prototype
|
||||||
if (dbm != null) {
|
if (dbm != null) {
|
||||||
try {
|
try {
|
||||||
|
@ -173,10 +177,6 @@ public final class Node implements INode, Serializable {
|
||||||
nmgr.nmgr.app.logError("Error invoking onInit()", x);
|
nmgr.nmgr.app.logError("Error invoking onInit()", x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state != CLEAN) {
|
|
||||||
markAs(CLEAN);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue