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: [email protected] <mailto:[email protected]> 
> 
>  
> 
> **********************************************************************************************
> 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
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to