Hi, 2010/2/17 Hernández Cuchí, Francisco Ricardo <francisco.hernan...@oepm.es>
> Thanks! I just got it. > > And to format the dato to be dd-mm-yyyy? > $xwiki.formatDate($todoDoc.creationDate, 'dd-MM-yyyy') or something like that, you can check the API. Guillaume > Francisco > > -----Mensaje original----- > De: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] En nombre de > Marius Dumitru Florea > Enviado el: miércoles, 17 de febrero de 2010 8:37 > Para: XWiki Users > Asunto: Re: [xwiki-users] How to get the creation date of a document > > Hi Hernández, > > Hernández Cuchí wrote: > > Hello, > > > > > > > > > I am rewriting the "todo" example list to be suitable for my company. I > would like to show in the list the date of creation of the documents. How > can i get it? > > See > > http://platform.xwiki.org/xwiki/bin/download/DevGuide/API/xwiki-core-2.2-javadoc.jar/com/xpn/xwiki/api/Document.html#getCreationDate%28%29 > > > > > > > > > The code is something like: > > > > > > > > <table id="todoTable" class="grid sortable filterable doOddEven" > cellpadding="0" cellspacing="0" border="0"> > > > > <tr class="sortHeader"> > > > > <th class="unsortable selectFilter">Fecha</th> > > > > <th>Resumen</th> > > > > <th>Status</th> > > > > <th>Persona</th> > > > > <th>Pestaña</th> > > > > <th class="unsortable selectFilter">Descripcion</th> > > > > </tr> > > > > #foreach ($todo in $todos) > > > > <tr> > > > > #set ($todoDoc = $xwiki.getDocument($todo)) > > > > #set ($todoObj = $todoDoc.getObject("XWiki.TodoClass")) > > > > <td>[$todoObj.TargetDate>$todo]</td> > > > > <td>[$todoObj.Resumen>$todo]</td> > > > > <td>[$todoObj.Status>$todo]</td> > > > > <td>[$todoObj.Persona>$todo]</td> > > > > <td>[$todoObj.Pestana>$todo]</td> > > > > <td>$todoObj.Descripcion</td> > > > > > > > > </tr> > > > > #end > > > > </table> > > > > > > > > > So get from the todoobj the creation date. > > You can't get it from the object, afaik, but from the document: > > $todoDoc.creationDate > > Hope this helps, > Marius > > > > > > > > > Regards, > > > > > > > > Francisco > > > > > > > > -- > > > > Francisco Hernández Cuchí > > > > Jefe de Servicios Sistemas de Información > > > > OFICINA ESPAÑOLA DE PATENTES Y MARCAS > > > > C\ Paseo de la Castella 75 > > > > tlf: 913496844 > > > > mail: francisco.hernan...@oepm.es <mailto:francisco.hernan...@oepm.es> > > > > > > > > > ********************************************************************************************** > > IMPORTANTE: El contenido de este correo y ficheros adjuntos es > confidencial y está dirigido únicamente > > para el destinatario/s. > > Si Ud recibe este correo por error, por favor póngase en contacto con su > administrador de correo o con el > > emisor immediatamente y no difunda su contenido a nadie ni haga copias. > > *** Este correo ha sido escaneado de virus y contenido malicioso *** > > > ********************************************************************************************** > > _______________________________________________ > > users mailing list > > users@xwiki.org > > http://lists.xwiki.org/mailman/listinfo/users > _______________________________________________ > users mailing list > users@xwiki.org > http://lists.xwiki.org/mailman/listinfo/users > > ********************************************************************************************** > IMPORTANTE: El contenido de este correo y ficheros adjuntos es confidencial > y está dirigido únicamente > para el destinatario/s. > Si Ud recibe este correo por error, por favor póngase en contacto con su > administrador de correo o con el > emisor immediatamente y no difunda su contenido a nadie ni haga copias. > *** Este correo ha sido escaneado de virus y contenido malicioso *** > > ********************************************************************************************** > > _______________________________________________ > users mailing list > users@xwiki.org > http://lists.xwiki.org/mailman/listinfo/users > -- Guillaume Lerouge Product Manager - XWiki SAS Skype: wikibc Twitter: glerouge http://guillaumelerouge.com/ _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users