Re: [xwiki-users] Trouble with velocity script to list Object properties

2008-04-21 Thread Sergiu Dumitriu
[Ricardo Rodriguez] Your EPEC Network ICT Team wrote: But, please, why obj.name=doc.fullName is required? If I remove this conditions, the query retrieve only a couple of documents with the defined properties populated and a bunch of empty ones. As with any query language, select from A, B

Re: [xwiki-users] Trouble with velocity script to list Object properties

2008-04-21 Thread Sergiu Dumitriu
Tjaart van Wijck wrote: Guillaume, That worked! Thanks a lot for the help. Yet, I still don't understand why the HQL string below does not yield the correct results: $query = select obj from BaseObject obj where obj.className='Contacts.ContactClass' Can someone explain how XWiki

Re: [xwiki-users] Trouble with velocity script to list Object properties

2008-04-21 Thread Sergiu Dumitriu
Tjaart van Wijck wrote: a) A class definition is essentially a special type of wiki page that defines the class structure (i.e. properties). Yes, but here special means just that it contains a class definition, as otherwise nothing makes it special. Any document can host a class, just add

Re: [xwiki-users] Trouble with velocity script to list Object properties

2008-04-16 Thread [Ricardo Rodriguez] Your EPEC Network ICT Team
A brief update: http://dev.xwiki.org/xwiki/bin/view/Design/XWiki+Query+Language+Specification?language=en Greetings, Ricardo -- Ricardo Rodríguez Your EPEC Network ICT Team ___ users mailing list users@xwiki.org

Re: [xwiki-users] Trouble with velocity script to list Object properties

2008-04-16 Thread [Ricardo Rodriguez] Your EPEC Network ICT Team
[Ricardo Rodriguez] Your EPEC Network ICT Team wrote: A brief update: http://dev.xwiki.org/xwiki/bin/view/Design/XWiki+Query+Language+Specification?language=en Greetings, Ricardo Still another entry. Sorry, I forgot it in my previous message:

Re: [xwiki-users] Trouble with velocity script to list Object properties

2008-04-15 Thread [Ricardo Rodriguez] Your EPEC Network ICT Team
Hi Tjaart, all, Tjaart van Wijck wrote: I have created the class Contacts.ContactClass. This class has three string properties firstname, surname and phone1. I have also created two instances of this class and filled out the attributes. Now, it should be straight forward to write a Velocity

Re: [xwiki-users] Trouble with velocity script to list Object properties

2008-04-15 Thread Guillaume Lerouge
Hi Ricardo, I have created the class Contacts.ContactClass. This class has three string properties firstname, surname and phone1. I have also created two instances of this class and filled out the attributes. Now, it should be straight forward to write a Velocity script to seach for

Re: [xwiki-users] Trouble with velocity script to list Object properties

2008-04-15 Thread [Ricardo Rodriguez] Your EPEC Network ICT Team
Guillaume Lerouge wrote: Obviously I've been writing too fast thus proposing a mistaken solution :-) I'll check on stuff I've used before and try to get back with a _working_ suggestion ;-) Guillaume Thanks! -- Ricardo Rodríguez Your EPEC Network ICT Team

Re: [xwiki-users] Trouble with velocity script to list Object properties

2008-04-15 Thread Tjaart van Wijck
Hi, My problem is still unresolved. I have followed the suggestions from the FAQ post: http://www.xwiki.org/xwiki/bin/view/FAQ/HowToListDocumentsWithACertainPropertyValue And rewrote the code as follows: #set($query=select obj from BaseObject obj where obj.className='Contacts.ContactClass')

Re: [xwiki-users] Trouble with velocity script to list Object properties

2008-04-15 Thread Guillaume Lerouge
Hi Tjaart, Here we go at last : #set($query=select obj from BaseObject obj where obj.className='Contacts .ContactClass') #set($results=$xwiki.searchDocuments($query, 10, 1)) #foreach($item in $results) #set ($itemdoc = $xwiki.getDocument($item)) #set ($itemobject =

Re: [xwiki-users] Trouble with velocity script to list Object properties

2008-04-15 Thread Tjaart van Wijck
Hi Guillaume, Thanks for the advise but it still doesn't work. I've implemented: #set($query=select obj from BaseObject obj where obj.className='Contacts.ContactClass') #set($results=$xwiki.searchDocuments($query, 10, 1)) #foreach($item in $results) #set ($itemdoc = $xwiki.getDocument($item))

Re: [xwiki-users] Trouble with velocity script to list Object properties

2008-04-15 Thread Tjaart van Wijck
Guillaume, That worked! Thanks a lot for the help. Yet, I still don't understand why the HQL string below does not yield the correct results: $query = select obj from BaseObject obj where obj.className='Contacts.ContactClass' Can someone explain how XWiki traverses documents and objects to

Re: [xwiki-users] Trouble with velocity script to list Object properties

2008-04-14 Thread Guillaume Lerouge
Hi Tjaart, I have created the class Contacts.ContactClass. This class has three string properties firstname, surname and phone1. I have also created two instances of this class and filled out the attributes. Now, it should be straight forward to write a Velocity script to seach for all