On Tue, Nov 22, 2011 at 11:14 AM, jerem jeremie.bousq...@gmail.com wrote:
Hello,
I'm trying to execute a page from another page.
The executed page has some groovy and velocity, does some queries, and as
output attaches a computed file to itself (and outputs some success or error
message to page content).
Executing it means just showing the page, as a result the attachment gets
increased version.
Now I want to do the same but calling it from another page. This is what I
did :
xwiki.getDocument('Space.MyPageToExecute').getRenderedContent()
What about:
{{include document=Space.MyPageToExecute context=new /}}
See http://extensions.xwiki.org/xwiki/bin/view/Extension/Include+Macro .
Hope this helps,
Marius
This returns my success message, but nothing gets attached. Is there any
chance that this could work ? I checked the rights of my user (set correct
user in context before the setAttachment()) but I could not make it work ...
Am I forced to write my page as a groovy class to achieve this ?
Thanks,
Jeremie
--
View this message in context:
http://xwiki.475771.n2.nabble.com/Executing-a-page-from-another-page-tp7019817p7019817.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users