Hi XWiki'ers friends,
I've implemented this great wiki engine on my enterprise, and lots of questions appeared. One at a time in different emails:
I've made a new Skin and changed the Logo successfully, but I don't know how to set the relative URL of it, in a way that, regardless the space a user is (Panels, Sandbox, MyDepartmentSpace etc), it points to the xwiki/bin/view/Main space (or other than thatt). I've noticed that it points to the WbHome of the space the user is actually, not the "start-of-everything" page - which I want. I want it static to a specific space.
How can I change this?
Ramon Gomes Brandão
I added page in the xwiki through Rest Api in following way. Would somebody
please advise me how to add user to the xwiki system in the similiar way.
public void add()
{
final String CONTENT = "Content 101";
final String TITLE = "Title 101";
final String PARENT = "Private.WebHome";
ObjectFactory objectFactory = new ObjectFactory();
Page page = objectFactory.createPage();
page.setContent(CONTENT);
page.setTitle(TITLE);
page.setParent(PARENT);
HttpClient httpClient = new HttpClient();
httpClient.getState().setCredentials(AuthScope.ANY, new
UsernamePasswordCredentials("admin", "admin"));
httpClient.getParams().setAuthenticationPreemptive(true);
JAXBContext context;
try {
context = JAXBContext.newInstance("org.xwiki.rest.model.jaxb");
Marshaller marshaller = context.createMarshaller();
Unmarshaller unmarshaller = context.createUnmarshaller();
PutMethod putMethod = new
PutMethod("http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Private/pages/NewPage001");
putMethod.addRequestHeader("Accept",
MediaType.APPLICATION_XML.toString());
StringWriter writer = new StringWriter();
marshaller.marshal(page, writer);
RequestEntity entity;
entity = new StringRequestEntity(writer.toString(),
MediaType.APPLICATION_XML.toString(), "UTF-8");
putMethod.setRequestEntity(entity);
httpClient.executeMethod(putMethod);
} catch (JAXBException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (HttpException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
--
View this message in context: http://xwiki.475771.n2.nabble.com/Adding-user-through-Rest-API-tp5206186p52…
Sent from the XWiki- Users mailing list archive at Nabble.com.
I've imported the .xar in the playground and it works. But in my XWiki (XWiki
Enterprise 2.4-milestone-1.29254) I get:
"Error number 4001 in 4: Error while parsing velocity page
xwiki:Todo.WebHome Wrapped Exception: Failed to evaluate content with id Web
Home"
Here ist the code:
http://xwiki.475771.n2.nabble.com/file/n5204599/ExtendedTodoApplication.txt
ExtendedTodoApplication.txt
If I erase this line:
#set ($count = $xwiki.getXWiki().search("select count(doc) from
XWikiDocument doc ${hql}", $context.context).get(0))
the error message is gone and I can see the table but the app doesn't work
as it should.
Can someone tell me whats wrong?
--
View this message in context: http://xwiki.475771.n2.nabble.com/Extended-Todo-Application-1-3-tp5204599p5…
Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi,
I would like to apply some CSS styling to a panel only.
I have some velocity code creating a <ul> list
I would like to use the CSS as documented on
http://meyerweb.com/eric/css/edge/menus/demo.html
but it should only apply to the panel,
I use the same velocity code also on a document, and there the styling should not be applied
Gerritjan
Hi!,
i want to automate the html export of a space.
How can I trigger the html export from crontab?
Best regards,
H.-Dirk Schmitt
--
------------------------------------------------------------------------
*
H.-Dirk Schmitt <http://www.computer42.org> *
Dipl. Math.
eMail:/dirk.schmitt@computer42.org/
mobile:/+49 177 616 8564/
phone: /+49 2642 99 41 10/
fax: /+49 2642 99 41 15/
Kripper Str. 35, D-53489 Sinzig
I am out of the office until 06/28/2010.
On holiday. I will not have access to email. If you need help with the
wiki, please contact Kim Dillon or Jenny Purushotma. If this is an
emergency, please leave a message on my cell phone. Thank you!
Note: This is an automated response to your message "users Digest, Vol 35,
Issue 54" sent on 6/19/10 6:00:04.
This is the only notification you will receive while this person is away.
Hi xwiki-users,
I created a page called Sandbox.TestMacro with the following content:
* {{test /}}
The page also has a WikiMacro object defined:
{{include document="Sandbox.TestService" context="current" /}}{{groovy}}
import com.test.TestService
out.println( TestService.testMe() )
{{/groovy}}
Sandbox.TestService has the following content in it:
{{include document="Sandbox.TestService2" context="current" /}}{{groovy
output="false"}}
package com.test
class TestService {
def static testMe() {
return "TEST"
}
}
{{/groovy}}
Now, when I render the TestMacro page, I get a few extra <p> inserted before
the text "TEST":
<ul><li><p></p>TEST</li></ul>
This makes the page look weird, since the bullet point text is on a new line
now.. I've also had to put the {{include}} and the {{groovy}} lines
together in the pages above; otherwise, there would just be more <p>'s
inserted.. Is there any way around this? Appreciate any tips!
I am out of the office until 06/18/2010.
Out Thursday...back Friday.
Note: This is an automated response to your message "users Digest, Vol 35,
Issue 51" sent on 6/17/10 6:00:10.
This is the only notification you will receive while this person is away.
I'm attempting to use the Java XML-RPC interface to xwiki, but I'm running
into problems. Specifically, when the xml-rpc library attempts to parse the
response of the rpc call, it's attempting to request a DTD from w3.org,
which returns a 503 status code. W3C is returning the 503 because they are
tired of poorly configured client libraries continually requesting largely
static DTD documents, as described here:
http://www.w3.org/blog/systeam/2008/02/08/w3c_s_excessive_dtd_traffic
Everyone's answer to this problem seems to be "use XML catalogs", but there
is no way that I've found to configure xml catalogs, especially when the
underlying xml parser is wrapped in not one, but two, layers of client
library (xwiki -> apache ws xml rpc).
Anyone run into this issue? Anyone have any possible solutions?
Thanks,
Brian
Hi Nithya, Manish
Have you checked http://platform.xwiki.org/xwiki/bin/view/Features/XWikiRESTfulAPI#HPagereso… ?
In particular :
/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}
HTTP Method: PUT
* Accepted Media types:
o application/xml (Page element)
o text/plain (Only page content)
o application/x-www-form-urlencoded (allowed field names: title, parent, content)
Is something not clear about it ? Not working ?
Thanks,
Jerome
----- Original Message -----
From: "xManish" <shresthamanish(a)gmail.com>
To: users(a)xwiki.org
Sent: Thursday, June 17, 2010 1:42:04 AM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna
Subject: Re: [xwiki-users] How to add a page with contents in xwiki through Rest api???
Nithya Vembu wrote:
>
> But i dont getting clear idea, how can i create a page under space with
> some contents.. and i am not getting any good samples for xwiki rest api.
>
> ...
>
> Kindly anyone give me idea how rest will get differentiate in xwiki
> manner..
>
> Can anyone give me a code snippet for this requirement so that i can
> improve my progress in my project..
>
> Any help greatly appreciated.
>
> Thanks in advance.
>
> Regards,
> Nithya.
>
Hi,
Did you happened to find the solution to your problem?
If yes, would you please share it.
Thanks,
Manish
--
View this message in context: http://xwiki.475771.n2.nabble.com/How-to-add-a-page-with-contents-in-xwiki-…
Sent from the XWiki- Users mailing list archive at Nabble.com.
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users