Mimel,
I tried to implement this using NodeTreeContentProvider.getHasChildren(), but the behaviour is same.
When the tree is formed, the get children method for the parent/child node gets called.
Suppose I have three parent nodes. I overrode the getHasChildren method in my provider class to return true or false based on a predefined condition.
public boolean getHasChildren() {
// TODO Auto-generated method stub
boolean returnVal =false;
DepObjNode currRow =(DepObjNode) this.getCurrentRow();
if(currRow.getType()==“header”){
returnVal= true;
}
else {
returnVal= false;
}
Logger.getLogger(DepObjProvider.class.getName()).log(Level.INFO, "inside getHasChildren of "+currRow.getId());
return returnVal;
}
Now I also overrode the getChildren method in my Node class to return children based on the NodeId.
The problem is whenever the tree is rendering for the first time. It shows the parent nodes with plus sign but along with that it is calling the getChildren Method for each of them. Is there any way, then when I click on the + sign, I want to call only the getChildren of the node, I clicked on ?
#webMethods#webMethods-BPMS#MWS-CAF-Task-Engine