I have the following code in one of my pages and it does what I am expecting
however I'd like to try and generalize it some.
#set ($hql = ", BaseObject as obj where obj.name = doc.fullName and
obj.className = 'CPA_FAQs.FAQClass' and doc.space='MySpace'")
#set($recentDocs = $xwiki.searchDocuments($hql, 5, 0))
#if($recentDocs.size() > 0)
<ol>
#foreach($entry in $recentDocs)
#set($faqDoc = $xwiki.getDocument('MySpace', $entry))
<li>[$faqDoc.question>$faqDoc.fullName]</li>
#end
</ol>
#else
#info($noFAQs)
#end
In this example is $entry an instance of com.xpn.xwiki.api.Object? If so, is
there a way to get the space from it without doing
$xwiki.getDocument('MySpace', $entry)? I would like to generalize that
statement so I can re-use the code for any documents in any space as opposed
to having to hard-code the space.
Thanks!
.:. Kevin
--
View this message in context:
http://n2.nabble.com/Working-with-query-results...-tp2162883p2162883.html
Sent from the XWiki- Users mailing list archive at
Nabble.com.