Are you sure that renameNode() updates this.path accordingly? All the
if block does is to update the node's name property.
Philipp
On 18.09.2009, at 09:24, Bert Leunis wrote:
Hello guys,
I get alerts now every time I change the name of a node in the
GenericDataAdminTree. I does not matter if the node is content or a
folder. It alerts “can’t rename node bla/bla”, but then the node IS
actually renamed. It is all due to this method in the class
mentioned:
public String renameNode(String newLabel) throws
AccessDeniedException, ExchangeException, PathNotFoundException,
RepositoryException {
String result = super.renameNode(newLabel);
if (!getHierarchyManager().isNodeData(this.getPath())) {
Content current =
getHierarchyManager().getContent(this.getPath());
Content dialogConfig =
DialogHandlerManager
.getInstance().getDialogConfigNode(getDialogName());
String nameField = "name";
if
(dialogConfig.hasNodeData(DataConsts.NODE_NAME_FIELD)) {
nameField =
dialogConfig.getNodeData(DataConsts.NODE_NAME_FIELD).getString();
}
NodeDataUtil.getOrCreateAndSet(current, nameField,
current.getName());
current.save();
}
return result;
}
The first line of the method does the correct renaming, but then at
line 3, the error occurs. I have been staring at this code for a bit
now, but I have no clue to what it actually should be performing? If
I take the whole if-block out, everything seems to be working fine.
Any help is appreciated!
Bye, Bert
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------
Best regards,
Philipp Bärfuss
Magnolia International Ltd.
---------------------------------------
Meet us at the Magnolia Conference
http://www.magnolia-cms.com/conference
---------------------------------------
Magnolia® - Simple Open Source Content Management
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------