First of all, to all developers, congratulations to Xwiki!  It is by
far the best piece of software I've seen in a while.  The introduction
to "what is it?", "what can it do?" and the install and running
process were just fantastic.

Right now I'm entering the stage where I want to write my own
application using Velocity, and I'm realizing that there is one or two
orders of magnitude to little Xwiki documentation around, and existing
documentation is often faulty or outdated.  Instead, I'll try to ask
my questions in this place.


I have two instances (InstanceA, InstanceB) of class HowTo, and I want
to display the rendered content of InstanceB in InstanceA in a info
box.  The class/instances have been generated analogously to the
FAQapplication tutorial.

If I do InstanceB.getRenderedContent(), it will return the rendered
content of InstanceA, not InstanceB.  Assuming I need to set the $doc
context, I tried to include in InstanceA:

#set ($doc = $xwiki.getDocument("Space.InstanceB"))

and would hope the InstanceB context would be used for rendering $doc.
But instead it cyclically and repeatedly renders InstanceA in itself, until the
engine refuses to render more levels.

I've also tried $xwiki.renderText and giving it unrendered InstanceB
text and the InstanceB document as arguments, but get the same effect.

Some more details: I work as Admin, so have programming rights. I have
also tried
$context.setDoc($xwiki.getDocument("Space.InstanceB")), which seems to
 have no effect, and also #info($doc.getContent()), which returns the raw class
template (which, by the way) uses includeForm(...))

Any ideas?

users mailing list

Reply via email to