Thank you Luca I'll try this But i might need help because i'm new to XWiki + velocity... and although what you said does sound very simple and basic... i just don't know how to get it... -> defining the class that hold the status property : done -> find out the tutorial for creating simple application : not yet -> the way to apply the content of the tutorial to my need : not yet (but somehow frightening) -> finding a way to make sure that every doc has one object of type status : i'm not there yet :p but your advices should be very useful.
Thank you anyway. Cordialement Best Regards MAI Phương Trâm Nouvelles Frontières Informatique ===================== NOUVELLES FRONTIERES 74, rue de Lagny API 4A10 93107 MONTREUIL CEDEX +33(0)1 48 51 81 21 -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Luca Anca Sent: Wednesday, June 08, 2011 6:53 PM To: XWiki Users Subject: Re: [xwiki-users] Add Progress info on document And I think you'll need these functions at some point: http://nexus.xwiki.org/nexus/service/local/repositories/releases/archive/com/xpn/xwiki/platform/xwiki-core/3.0/xwiki-core-3.0-javadoc.jar/!/com/xpn/xwiki/api/Document.html#createNewObject%28java.lang.String%29 (If I understood correctly the first mail, this was the problem). On Wed, 2011-06-08 at 18:43 +0200, Luca Anca wrote: > On Wed, 2011-06-08 at 16:55 +0200, MAI QUOC, Phuong-Tram wrote: > > i can't access to .vm templates > > are they on the server or are they available through XWiki front ? > > No, you don't need access to the .vm templates, you just need to be able > to write a piece of velocity code in the Document information panel, for > example. > > The idea is this: > > 1/ you define your class that holds the status property. You don't need > to create template for it or class sheet > 2/ in the document information panel, you write a little piece of > velocity to get the status object from the current document and allow > you to edit it (look at the tutorial for creating a simple application, > you should have there code samples about how to get an object of a > specific type from a document) > 3/ you need a way to make sure that every document that you create has > one object of type status in it. For this, for example, you can > a) in the code that displays the status (I assume you display it > somewhere, right?) if the current document does not have a status > object, create one and save the document > b) create a template "status document" using the templates mechanism > (see the template administration section) and then create new documents > with that template > > That's how I would do it, and I can't see a reason why it won't work, if > I understood correctly your requirements. > > Have fun, > Anca > > > > > -----Original Message----- > > From: [email protected] [mailto:[email protected]] On Behalf > > Of Guillaume Lerouge > > Sent: Wednesday, June 08, 2011 3:48 PM > > To: XWiki Users > > Subject: Re: [xwiki-users] Add Progress info on document > > > > Hi, > > > > using objects is the right way to go. > > > > Then you can edit the edit panels through .vm templates in order to > > display > > a field that would allow your users to edit the value of the status > > field. > > > > Guillaume > > > > On Tue, Jun 7, 2011 at 18:32, MAI QUOC, Phuong-Tram < > > [email protected]> wrote: > > > > > Hello > > > > > > > > > > > > I'd like to add for each page a way to track down if the page is a > > > "ongoing" status, is a "completed" status or is a "needFeedBack" > > status > > > for example. > > > > > > Of course, the list of statuses should be configurable so i can put > > > mine. > > > > > > > > > > > > My first idea was to create a class and add this object to each page > > but > > > > > > > > > -> i have created the class + classSheet + classTemplate but i see > > then > > > that i can create new documents. > > > > > > > > > > > > Actually, I want the status to be embedded in the page edit mode, in a > > > panel for example, and that would be better if it is embedded in the > > > Document Information panel, just as the Tag field > > > > > > > > > > > > So I try to add raw html in this but i don't know how to create a new > > > "status" property to the document. > > > > > > > > > > > > If i use the "tag" property, i'm worrying about mixing two tag > > fields... > > > > > > > > > > > > anyway, i've read and re-read the XWiki online documentation but i > > can't > > > find anything just like this. > > > > > > > > > > > > PS -> of course, i'll have later a page per status with the list of > > all > > > documents in each statuses... (just like tag pages) > > > > > > > > > > > > thank you for your help > > > > > > _______________________________________________ > > > users mailing list > > > [email protected] > > > http://lists.xwiki.org/mailman/listinfo/users > > _______________________________________________ > > users mailing list > > [email protected] > > http://lists.xwiki.org/mailman/listinfo/users > > _______________________________________________ > > users mailing list > > [email protected] > > http://lists.xwiki.org/mailman/listinfo/users > > > _______________________________________________ > users mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/users _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
