Hi, On Feb 17, 2010, at 12:52 PM, Hernández Cuchí, Francisco Ricardo wrote:
> Thanks for all, > > The last problem I have, it's that in the versiÓn i am using actually 1.7.1, > when I use the following code: > > #set ($hql = ", BaseObject as obj where obj.name=doc.fullName and > obj.className='XWiki.TodoClass' and obj.name<>'XWiki.TodoClassTemplate' order > by doc.date asc ")" I get an error. Also with the example queries. I think it > could be a problema of the obsolete versiÓn. > > I would like to upgrade, but I have the problem that the hsql database is > really huge (i began using the exampleand kept on). And I do not know how to > "upgrade" the database schema to a xwiki 2.x that I have in Oracle. If the > tables are not the same, then the only posibility is to do it through xar > files, but i get constantly java heap errors. See http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Installation#HUpgradingXWikiCore Thanks -Vincent > > Regards and thanks for all the good work, > > Francisco > > > > -----Mensaje original----- > De: [email protected] [mailto:[email protected]] En nombre de > Sergiu Dumitriu > Enviado el: miércoles, 17 de febrero de 2010 11:44 > Para: XWiki Users > Asunto: Re: [xwiki-users] How to get the creation date of a document > > On 02/17/2010 11:13 AM, Guillaume Lerouge wrote: >> Hi, >> >> 2010/2/17 Hernández CuchÖ, Francisco Ricardo<[email protected]> >> >>> 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. > > Be careful, small m = minutes, large M = month. You can see all the > formatting letters here: > http://java.sun.com/j2se/1.5.0/docs/api/java/text/SimpleDateFormat.html > >> Guillaume >> >> >>> Francisco >>> >>> -----Mensaje original----- >>> De: [email protected] [mailto:[email protected]] 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 _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
