[xwiki-users] XWiki Lucene plugin search result and getObject()

Sergiu Dumitriu sergiu.dumitriu at gmail.com
Thu Aug 23 15:53:52 CEST 2007


Are you sure you got the right document? You can write $doc.fullName
to see what is the name of the document.

Are you sure you do have such an object? Open the document in the
browser and go to the object editor to check that.

Are you sure you are using the right class name? Isn't there a wrong
letter, or something?

On 8/21/07, Rajendra Prasad.M <rajncst at yahoo.co.in> wrote:
> Hi,
>
> In the XWiki application I developed, I am using Lucene plugin for search.
> Once the search result comes I am getting the document as follows:
>
> #set($myDoc = $xwiki.getDocument($item.name))
>
> When I print $myDoc it prints
> "com.xpn.xwiki.api.Document at 1f16eab".
> So I assume I am getting the document all right. Now I want to get the
> Object of the document so that I can display the properties of that
> document. But the following code doesn't work.
>
> #set($myObj = $myDoc.getObject("xxxx.xxxxClass"))
>
> $myObj doesn't contain the object after the above code is executed.
>
> Any idea what's the problem?
>
> Any help is much appreciated,
>
> - Raj
>
>

Sergiu
-- 
http://purl.org/net/sergiu




More information about the users mailing list