ContentActions.createNode(linker,getGwtToolbarItem().getTitle(),nodeTypes, useMainNode);
}
}
public void handleNewLinkerSelection() {
LinkerSelectionContext lh = linker.getSelectionContext();
GWTJahiaNode n;
if (useMainNode) {
n = lh.getMainNode();
} else {
n = lh.getSingleSelection();
}
if (n != null) {
boolean isValidParent = false;
for (String s : parentTypesAsList) {
isValidParent = n.getNodeTypes().contains(s) || n.getInheritedNodeTypes().contains(s);
if (isValidParent) {
break;
}
}
setEnabled(isValidParent
&& !lh.isLocked()
&& PermissionsUtils.isPermitted("jcr:addChildNodes", lh.getSelectionPermissions()));
} else {
setEnabled(false);
}
}