You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Antonio Jean Claude <jc...@sopragroup.com> on 2003/11/28 18:07:33 UTC

SlideAPI: setProperty does not add PropertyNode to ObjectNode

Hello,

I'm trying to add properties (PropertyNode) to ObjectNodes by using the SlideAPI.
(See piece of code below).
I don't get any Exception, but no property is added? Am I missing something obvious?
I'm using Slide2.0.

Thanks in advance for your help,

JClaude


    public void setProperty(String uri, String propertyName, String propertyValue) throws Exception {
            try{
                token.begin();
                ObjectNode on = getStructure().retrieve(slideToken,uri);
                NodeRevisionDescriptors revisionDescriptors = content.retrieve(slideToken, uri);
                NodeRevisionDescriptor  revisionDescriptor = content.retrieve(slideToken, revisionDescriptors);
                revisionDescriptor.setProperty(propertyName, propertyValue);
                token.commit();
            }catch(Exception se){
                token.rollback();
                System.out.println(se);
            throw se;
            }
    }



Re: SlideAPI: setProperty does not add PropertyNode to ObjectNode

Posted by Martin Holz <ho...@fiz-chemie.de>.
"Antonio Jean Claude" <jc...@sopragroup.com> writes:

> I'm trying to add properties (PropertyNode) to ObjectNodes by using the SlideAPI.
> (See piece of code below).
> I don't get any Exception, but no property is added? Am I missing something obvious?


You should store the revision descriptor, after changing it.


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org