Hi,
I want to carry out an action on a node in the process of commiting it.
So the preCommit(node) looks like:
super.preCommit(node);
Cloud cloud = CloudFactory.getCloud();
NodeIterator iNodes= cloud.getList(node.getStringValue("number")
, "evenement,posrel1,deelnemers_categorie,posrel2,evenement_type"
, "posrel1.number,posrel1.pos,posrel2.pos", null, null, null, null,
false).nodeIterator();
if(iNodes.hasNext()) {
....
}
This works perfect for already existing nodes.
However, for nodes that are new, this results in an error of type:
nodetype of node ... could not be found. Which is not so surprising.
Questions:
1. Is there an equivalent to preCommit which is carried out after
commiting the node (something like postCommit ?)
2. Is there a way by which in the preCommit can be detected whether the
node already exists?
Thanks in advance,
Bye, Henk.