Hello XWikiers,

I am troubled with XWiki's objects and documents save operations by a 
programme, groovy or velocity.
The following doesn't seem to work for me:

// <%

import com.xpn.xwiki.api.Document;
import com.xpn.xwiki.api.Object;
import com.xpn.xwiki.api.XWiki;

//XWiki xwiki;

Document doc = xwiki.getDocument("space.www");
// set to write mode (i.e. activate cloned back-end)
doc.setTitle(doc.getTitle());

Object obj = doc.getObject("Space.ClassName");
obj.set("propName",1);
doc.save("Fiddling");

doc = xwiki.getDocument("space.www");
println("propName: " + 
doc.getObject("Space.ClassName").getProperty("propName").getValue());

// %>

It does create a new history step at each display of this page but I can't seem 
to be able to set the property propName (which is of type boolean).
The property always displays as value-less (e.g. in the object editor).

thanks for clues and advice for saving xwiki objects.

paul

_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to