jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <jukka.zitt...@gmail.com>
Subject Re: Adding jcr:title and jcr:description properties
Date Wed, 03 Mar 2010 13:50:28 GMT
Hi,

On Wed, Mar 3, 2010 at 11:24 AM, Nils Weinander
<nils.weinander@mogul.com> wrote:
>   Node containerNode = rootNode.addNode(id, jcrConstants.getNT_FOLDER());
>   containerNode.addMixin("mix:title");
>   containerNode.setProperty("jcr:title", title);
>   containerNode.setProperty("jcr:description", description);
>   session.save();

Try replacing the last line with:

    rootNode.getSession().save();

As discussed, you're probably saving the wrong session.

PS. See constants like NodeType.NT_FOLDER, NodeType.MIX_TITLE and
Property.JCR_DESCRIPTION in JCR 2.0.

BR,

Jukka Zitting

Mime
View raw message