See below

Antonio

2008/5/15 Vincent Massol <[EMAIL PROTECTED]>:

> Hi Antonio,
>
> On May 15, 2008, at 9:42 PM, Antonio Goncalves wrote:
>
> > Thanks Jean-Vincent it works. Two more questions.
> >
> > 1) On the API (
> >
> http://platform.xwiki.org/xwiki/bin/download/DevGuide/API/xwiki%2Dcore%2D1.3.2%2Djavadoc.zip/index.html<http://platform.xwiki.org/xwiki/bin/download/DevGuide/API/xwiki-core-1.3.2-javadoc.zip/index.html>
> )
> > it says that the method getWeb is deprecated and that we should use
> > getSpace. But when I do the following it doesn't work (doc.space
> > instead of
> > doc.web) :
> >
> > #set($query="where doc.*space*='Main'")
> > #set($results = $xwiki.searchDocuments($query, 5, 0))
> > #foreach ($item in $results)
> > * $item  <br/>
> > #end
> >
> > Looking at the API this should work no ?
>
> no :)
>
> This javadoc is about the XWiki Java API. The string you're using for
> the query is not calling Java code. It's just a HQL string for doing &
> query.


Ok. I really thought both things were related. I though doc was just an
instance of the Document class.


> 2) the code  ** $item  <br/>*  just gives me the title of the page,
> and what
> if I want to include the entire content of each page. How can I do
> that ?

Check the javadoc for the Document object.
>
> You'll get the Document object like this: $xwiki.getDocument($item)
>
> Note that there are lots of code snippets that should provide examples
> on this in code.xwiki.org, in the snippets area. Let us know where
> you'd have expected help on this in xwiki.org so that we can fix it.



One thing that really would help is to be able to search for code. If you go
to code.xwiki.org and search for the string "getDocument" no result is
found.


>
>
> Thanks
> -Vincent
>
> > 2008/5/15, Jean-Vincent Drean <[EMAIL PROTECTED]>:
> >>
> >> On Thu, May 15, 2008 at 6:33 PM, Antonio Goncalves
> >> <[EMAIL PROTECTED]> wrote:
> >>>
> >>> so I've tried several queries but in vain. I would like to do
> >>> something
> >> like
> >>> that :
> >>>
> >>> #set($query="where spaces='MySpace'")
> >>> #set($results = $xwiki.searchDocuments($query, 5, 0))
> >>> #foreach ($item in $results)
> >>> * $item  <br/>
> >>> #end
> >>>
> >>> Any idea ?
> >>>
> >>
> >> Hi,
> >>
> >> You can try this :
> >>
> >> #set($query="where doc.web='Main'")
> >> #set($results = $xwiki.searchDocuments($query, 5, 0))
> >> #foreach ($item in $results)
> >> * $item  <br/>
> >> #end
> >>
> >> Other examples are available here :
> >> http://platform.xwiki.org/xwiki/bin/view/DevGuide/velocityHqlExamples
> >>
>  _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>



-- 
--
Antonio Goncalves ([EMAIL PROTECTED])
Software architect

Paris JUG leader : www.parisjug.org
Web site : www.antoniogoncalves.org
Blog: jroller.com/agoncal
LinkedIn: www.linkedin.com/in/agoncal
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to