Hi,
Is it possible to create a new object of a custom class using the RESTful API?
The documentation page only lists the following POST method, which
doesn't accept a class name:
/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/objects[?start=offset&number=n]
I have tried things like the following:
curl -u Admin:admin -X POST -H "Content-type: text/plain" -H "Accept:
application/xml" -d "@test.xml"
http://localhost/xwiki/rest/wikis/xwiki/spaces/Test/pages/Test/objects/XWik…
Where test.xml contains some variation on:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<properties xmlns="http://www.xwiki.org">
<property type="com.xpn.xwiki.objects.classes.TextAreaClass" name="Text">
<attribute value="Text" name="name"/>
<attribute value="Test" name="prettyName"/>
<attribute value="0" name="unmodifiable"/>
<attribute value="0" name="disabled"/>
<attribute value="100" name="size"/>
<attribute value="10" name="rows"/>
<attribute value="" name="customDisplay"/>
<attribute value="Text" name="editor"/>
<attribute value="6" name="number"/>
<attribute value="0" name="picker"/>
<attribute value="" name="validationMessage"/>
<attribute value="" name="validationRegExp"/>
<value>
This is some text.
</value>
</properties>
Curl returns this:
<html>
<head>
<title>Status page</title>
</head>
<body>
<h3>The method specified in the request is not allowed for the resource identifi
ed by the request URI</h3><p>You can get technical details <a href="http://www.w
3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6">here</a>.<br>
Please continue your visit at our <a href="/">home page</a>.
</p>
</body>
</html>
Simpler syntax without the XML file still fails for me. In fact, I
can't seem to even get the basic "create object" method to work, even
without the class. For example:
curl -u Admin:admin -X POST
http://localhost/xwiki/rest/wikis/xwiki/spaces/Test/pages/Test/objects
Just comes back with a "malformed syntax" error.
Is there an example anywhere of how to do this?
Thank you,
Aaron
Hi,
I'm trying to use XWQL query language to select count of authors and would
like to order this by descending order of this count.
I ended up having this work fine :
"select count(myobject.author), myobject.author from Document as doc,
doc.object(Space.MyClass) as myobject group by myobject.author"
But adding " order by count(myobject.author) desc" leads to an error for
translating the query ...
Adding "AS" in the select expression does not seem to work either.
Is this possible in XWQL and how ?
Thanks,
Jeremie
--
View this message in context: http://xwiki.475771.n2.nabble.com/XWQL-order-by-count-tp6904819p6904819.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi,
I am trying to include a FavIcon in my wiki and I've found this
information, but it doesn't help me...
Regards
Yannick
Sylvain Desbureaux wrote:
>* Hi,*>* I don't manage to put a favicon for xwiki. Any clues ?*>* *
Well, a favicon is usually placed in the root of the URL, like
www.myserver.com/favicon.ico
Doing that in a java webapp container usually involves adding that file
not to the xwiki webapp, but to the ROOT webapp. In tomcat, there is a
ROOT directory inside webapps.
Another solution is to put something like this in
webapps/xwiki/skins/albatross/htmlheader.vm:
<link rel="icon" href="$xwiki.getSkinFile("favicon.png")" type="image/png"/>
<link rel="shortcut icon" href="$xwiki.getSkinFile("favicon.png")"
type="image/png"/>
and put a favicon.png (you can change the name, if you want) in
webapps/xwiki/skins/albatross
If you're not using the albatross skin, change the path accordingly.
Sergiu
Hi all,
When I create a page in a Space called "MySpace" using Title "a.b.c" , it
created a page call "c" under the space "a.b". (a.b: c)
Is there anyway I can allow users create document with dot on the Title
please? I would expect the document to be called "MySpace: a.b.c"
Many Thanks
Art
--
View this message in context: http://n2.nabble.com/Creating-a-page-with-dot-on-the-Title-tp1112070p111207…
Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi,
I am interested in trying out xwiki concerto but I am unable to download the
installer jar from its website at
http://concerto.xwiki.org/xwiki/bin/view/Main/DownloadAndInstall.
Does anybody know what is the current state of the xwiki concerto project?
I understand that xwiki concerto was a research project that ran until
sometime in 2008 and I am interested in knowing what progress there's been
on it since then (if any). i.e. does the main xwiki project now maybe
include support for replication of xwiki content in a distributed
environment?
Any insight on this would be much appreciated!
Regards,
PM.
I have a strange situation ...
I imported LightBox Macro and started to use it. All is fine, exept small
thing. When lightbox window with my picture shows, at a bottom-right corner
exist label "close" - this label doesn't work. Looks like not a link ...
Strange, because, example on a page XWiki.LightBox working fine. Maybe
problem with different space (my page stay at a another space)? Other labels
(prev, next) works fine in any cases. I can close popup lightbox window by
clicking main page - but for users it is not normal - they see "close" and
started to clicking it - without any result. Maybe anybody can help me.
Thanks beforehand
Eugen
--
View this message in context: http://xwiki.475771.n2.nabble.com/Close-label-on-a-LightBox-window-not-work…
Sent from the XWiki- Users mailing list archive at Nabble.com.