- CommandUtils.CallCommandWithOneParameter(DeleteAkbNodes.ID,
- DeleteAkbNodes.PARAM_NODE_JCR_ID,
- AkbJcrUtils.getIdentifierQuietly(connectorAlias));
- // for (IFormPart part : form.getParts())
- // if (!formPart.equals(part))
- // part.refresh();
+ try {
+ // Manually check if corresponding node was really removed
+ Session session = connectorAlias.getSession();
+ String absPath = connectorAlias.getPath();
+
+ CommandUtils.CallCommandWithOneParameter(DeleteAkbNodes.ID,
+ DeleteAkbNodes.PARAM_NODE_JCR_ID,
+ AkbJcrUtils.getIdentifierQuietly(connectorAlias));
+
+ if (!session.nodeExists(absPath))
+ form.removePart(formPart);
+
+ } catch (RepositoryException re) {
+ throw new AkbException(
+ "Error while removing connector Alias ", re);
+ }