2014-05-20 13:38 GMT+02:00 walid yaich <[email protected]>:

> Thanks,
>
> I prefer the listener, because i don't want the user to edit the object,
> the object revision will be set by admin when he/she push "approve" to set
> the revision to show by default.
>
> The listener works fine now, but i can't find how to add an object to a
> page in groovy, i want to this in groovy : #set($obj = $doc.newObject(
> "XWiki.SomeClass")) , a helpful link as always please ?
>
>
Hi,
Groovy has the same default bindings as velocity, so you could write:

def obj = doc.newObject("XWiki.SomeClass")


>
>
>
>
> 2014-05-20 10:44 GMT+01:00 [email protected] <[email protected]>:
>
> > Hi Walid,
> >
> > Maybe this could help:
> >
> >
> http://www.xwiki.org/xwiki/bin/view/FAQ/How+can+I+create+a+new+page+based+on+a+form
> >
> > If your users use this form to create pages, the pages they create will
> > automatically have the proper XObjects added to them and they’ll directed
> > in inline mode when creating the page, allowing them to fill the XObject
> > data.
> >
> > Thanks
> > -Vincent
> >
> > On 19 May 2014 at 22:16:01, walid yaich ([email protected]) wrote:
> >
> > Hello,
> >
> > First of all, Merci bcp Vincent for this How to implement "Approved
> > Revisions"?<
> >
> http://www.xwiki.org/xwiki/bin/view/FAQ/How+to+implement+%22Approved+Revisions%22
> >
> >
> >
> >
> > I was able to choose which revision to display by following the "how to",
> > now i need to add the object automatically to any page in my wiki or at
> > least any page in a given space
> >
> > Thanks in advance :)
> >
> >
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs
>
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to