I have a class in one of my spaces that has instances of itself attached. Eg.
MySpace
MySpace.TopicsClass
MySpace.TopicsClass[0]
MySpace.TopicsClass[1]
How can I get the class from the space? I've tried:
#set ($hql = ", BaseObject as obj where obj.name = doc.fullName and
obj.className = 'FranchiseTax.TopicsClass' and
doc.space='FranchiseTax'")
#set($topics = $xwiki.searchDocuments($hql))
Topics comes back with one item, which I can see by displaying
$topics.get(0) and it prints out MySpace.TopicsClass. So it appears to have
returned a string name of the document, however when I try:
#set($topicObj = $xwiki.getDocument($topics.get(0)))
Nothing is set into $topicObj. Do I have to do something different if the
thing I am trying to get is a class and not a document? Once I have the
class how do I get the collection of associated objects?
Thanks!
.:. Kevin
--
View this message in context:
http://n2.nabble.com/Get-class-from-space-and-retrieve-list-of-attached-obj…
Sent from the XWiki- Users mailing list archive at
Nabble.com.