Hello,
i have a form that is trying to update xwiki object. For whatever reason, it's not
updating. Here is the groovy code. The nearly same code but with "newObject"
instead of "getObject" properly create new entries. I can't find out how to
tell xwiki that the object has changed and need to be updated in database.
if (request.update !=null){
println ("update mode");
obj = doc.getObject('Configuration.NewsClass',request.doEdit.toInteger())
println "$obj " // Here i get "com.xpn.xwiki.api.Object@69506371"
obj.set("linkfr",request.linkfr)
obj.set("titlefr",request.titlefr)
obj.set("linknl",request.linknl)
obj.set("titlenl",request.titlenl)
obj.set("publication",new java.util.Date().parse("dd/MM/yyyy
HH:mm",request.publication))
println obj.get("linkfr"); // Correclty outputs the new value
doc.save("update news entries") // This properly appear in history
println "Saved "+request.doEdit // It says "Saved 53" for example
Regards,
David Delbecq
Show replies by date