Hi,
Indeed you are lacking an AnnotationClass here
You should use
AnnotationClasses.AnnotationClass
-> begin
-> end
-> selection
-> author
-> date
Then you should make sure you persist your annotation using this object..
Once you have that you would get them by doing
$doc.getObject("AnnotationClasses.AnnotationClass")
or better
$doc.use("AnnotationClasses.AnnotationClass")
$doc.getValue("begin")
Ludovic
antoine SEILLES wrote:
>
> Now my objects are persistents. But i don't know how to access their
> properties.
> Should i create an annotation class through the XWiki class editor?
> It seems that in my database, none of the properties of my annotations
> are stored.
>
> I define an annotation for a document:
> $xwiki.annotation.addNewAnnotation($doc,"blablablaAnnotation",0,10,"blablaSelection","auteur")
>
>
> I retrieve all annotations of a document:
> #set($annots=$doc.getObjects("annotation"))
> And i try to get the selection field of my annotations:
> #foreach($annot in $annots)
> "$annot.get("selection")"
> #end
>
> But all i have is "".
>
> What should i do?
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs
--
Ludovic Dubost
Blog: http://blog.ludovic.org/
XWiki: http://www.xwiki.com
Skype: ldubost GTalk: ldubost
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs