Hi Martin I can't check right now, but I'm pretty sure that there is no set(field, value) method on BaseObject. If I recall correctly this is the API Object's method. Try using setDateValue(field, value) instead. Hope this helps Edo On Tue, Aug 2, 2011 at 9:37 PM, Martin Evans <website@studenthubs.org> wrote:
Does anyone know why this code doesn't run? It runs if I comment out the line on which I have typed //<<
The result of df.parse is a Date object and the property "Active" is of the date type.
{{groovy}} def obj = doc.getDocument().getObject("Events.EventClass") def df = new java.text.SimpleDateFormat("yyyy-MM-dd") obj.set("Active",df.parse("2001-02-03")) //<< {{/groovy}}
Thanks, Martin _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users