jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edgar Poce <edgarp...@gmail.com>
Subject Re: renaming an item
Date Thu, 14 Apr 2005 18:05:28 GMT
Brian Moseley wrote:
>> void rename(Item item, String newName) {
>>   item.getSession().move(item.getPath(), item.getParent().getPath() +
>> "/" + newName);
>> }
> ahh... that works for me. thanks.
> 
Just a comment, it only works with nodes whose depth is higher than 1. 
If the depth is equal to 1 you have to remove the slash.

regards
edgar

Mime
View raw message