[xwiki-devs] retrieving XWIKI-generated page via javascript without headers
Good day, community Yet one question: I want to retrieve xwiki page without header and footes via javascript, to save in dom-node. Now I search a principal way how to do this. I see two possible ways: A -- write special 'zero' skin // unfortunelly, I see that documentation on skins is outdated: in installation of svn version I see that velocity templates are situated outside skin. B -- try to use xwiki XML/RPC interface. (or may be add JSON-ORB as servlet) So, questions: - what approach (from this two) is prefferrable ? - where is documentation on xwiki XML/RPC interface ? Or some example of usage ? Are anybody tried to use XML/RPC interface from javascript. ? - may be still possible to reload (returning to first approach) view.vm template in skin. If yes - how ? P.S. (More detailed explanation what I want on code level: i. e. I want to write in xwiki page something like: <script> function update() { new Ajax.Reaqest('/xwiki.home/bin/view/My.Page', 'post' parameters { A: $('form.A').value, B: $('form.B').value, skin: 'zero' } onSuccess: function(transport) { $('result').innerHTML=transport.response; } ); } </script> <form> <input name='A' id='form.A' > <input name='B' id='form.B' > <button name='DO' onClick="update();" > </form> <div id="result"> </div> -- Ruslan Shevchenko GradSoft. http://www.gradsoft.ua
rssh wrote:
Good day, community
Yet one question: I want to retrieve xwiki page without header and footes via javascript, to save in dom-node.
Now I search a principal way how to do this. I see two possible ways:
A -- write special 'zero' skin // unfortunelly, I see that documentation on skins is outdated: in installation of svn version I see that velocity templates are situated outside skin.
B -- try to use xwiki XML/RPC interface. (or may be add JSON-ORB as servlet)
So, questions: - what approach (from this two) is prefferrable ? - where is documentation on xwiki XML/RPC interface ? Or some example of usage ? Are anybody tried to use XML/RPC interface from javascript. ? - may be still possible to reload (returning to first approach) view.vm template in skin. If yes - how ?
P.S. (More detailed explanation what I want on code level: i. e. I want to write in xwiki page something like:
<script> function update() { new Ajax.Reaqest('/xwiki.home/bin/view/My.Page', 'post' parameters { A: $('form.A').value, B: $('form.B').value, skin: 'zero' } onSuccess: function(transport) { $('result').innerHTML=transport.response; } ); } </script> <form> <input name='A' id='form.A' > <input name='B' id='form.B' > <button name='DO' onClick="update();" > </form> <div id="result"> </div>
You can use xpage=plain -- Sergiu Dumitriu http://purl.org/net/sergiu/
On Wed, 11 Jun 2008 19:45:55 +0200, Sergiu Dumitriu wrote
rssh wrote:
Good day, community
Yet one question: I want to retrieve xwiki page without header and footes via javascript, to save in dom-node.
.....
You can use xpage=plain \
Thanks, great ! [XWiki have near all featires which I need :) ] Yet one question: xpage=plain still return header and footer in case of non-existent page. This is a bug (?) [So I will fire issue] or exists some logic behind this ?
-- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Ruslan Shevchenko GradSoft. http://www.gradsoft.ua
rssh wrote:
On Wed, 11 Jun 2008 19:45:55 +0200, Sergiu Dumitriu wrote
rssh wrote:
Good day, community
Yet one question: I want to retrieve xwiki page without header and footes via javascript, to save in dom-node.
..... You can use xpage=plain \
Thanks, great ! [XWiki have near all featires which I need :) ]
Yet one question: xpage=plain still return header and footer in case of non-existent page.
This is a bug (?) [So I will fire issue] or exists some logic behind this ?
It is a bug, see http://jira.xwiki.org/jira/browse/XWIKI-1669 I started working on, and I know what needs to be changed, but I have to split my time in too many directions, and this is not one of the top priorities. -- Sergiu Dumitriu http://purl.org/net/sergiu/
participants (2)
-
rssh -
Sergiu Dumitriu