Hi, Sergiu Dumitriu
I tried your way like this:
{{velocity output='false'}}
$response.setContentType('application/xml')
#set ($out = $response.getOutputStream())
#set ($s = "<?xml version='1.0' encoding='ISO-8859-1'?><test>test
done</test>")
$out.write($s.getBytes('ISO-8859-1'))
{{/velocity}}
But this still has the same parsing error:
XML Parsing Error: no element found
Location:
http://localhost:8080/xwikim/bin/get/Geo/hellotest?outputSyntax=plain
Line Number 1, Column 1:
^
I tried both from the ajax call and the link:
http://localhost:8080/xwikim/bin/get/Main/hellotest?outputSyntax=plain
and I got the same error.
Any more clue?
Thanks for your help.
Dave
On Sat, Mar 24, 2012 at 10:41 AM, Sergiu Dumitriu <sergiu(a)xwiki.com> wrote:
> On 03/24/2012 09:33 AM, du du wrote:
>
>> Hi, Thomas,
>>
>> Thanks for your response, I changed to this url:
>>
>> http://localhost:8080/xwikim/**bin/get/Main/hellotest?**
>> outputSyntax=plain<http://localhost:8080/xwikim/bin/get/Main/hellotest?outputSyntax=plain>
>>
>> But I got responseXML containing this error:
>>
>> XML Parsing Error: no element found Location:
>> http://localhost:8080/xwikim/**bin/get/Main/hellotest?**
>> outputSyntax=plain<http://localhost:8080/xwikim/bin/get/Main/hellotest?outputSyntax=plain>Line
>> Number 1, Column 1:
>>
>> then I changed to this velocity code:
>>
>> {{velocity output='false'}}
>> $response.setContentType('**application/xml')
>> #set ($out = $response.getOutputStream())
>>
>> $out.write("<?xml version='1.0' encoding='ISO-8859-1'?><test>**test
>> done</test>")
>>
>
> $out is an OutputStream, which doesn't have a write(String) method. You
> must give it a byte[] argument, so this works:
>
> #set ($s = "<?xml version='1.0' encoding='ISO-8859-1'?><test>**test
> done</test>")
> $out.write($s.getBytes('ISO-**8859-1'))
>
>
> $out.flush()
>> ##$out.close()
>> {{/velocity}}
>>
>> Still the same parsing error, any clue?
>>
>> Thanks
>>
>> Dave
>>
>>
>>
>> On Sat, Mar 24, 2012 at 4:38 AM, Thomas Mortagne
>> <thomas.mortagne(a)xwiki.com>**wrote:
>>
>> On Sat, Mar 24, 2012 at 3:23 AM, du du<dddu88(a)gmail.com> wrote:
>>>
>>>> Hi, all,
>>>>
>>>> I followed this link:
>>>> http://platform.xwiki.org/**xwiki/bin/DevGuide/**WritingComponents<http://platform.xwiki.org/xwiki/bin/DevGuide/WritingComponents>
>>>> created a component which return xml data.
>>>> Also I created a hellotest page inside the main space, and wrote the
>>>> following velocity code:
>>>>
>>>> {{velocity output='false'}}
>>>> $response.setContentType('**application/xml')
>>>>
>>>> #set ($xmldata= $services.hello.getHelloXML())
>>>> $xmldata
>>>>
>>>> ##$context.setFinished(true)
>>>> #set ($out = $response.getOutputStream())
>>>> $out.write($xmldata)
>>>> $out.flush()
>>>>
>>>> {{/velocity}}
>>>>
>>>> I tested this code, I can get the xml data, now I use this ajax code to
>>>> retrieve the xml data:
>>>>
>>>> var xmlhttp = GetXmlHttp();
>>>> if (xmlhttp) {
>>>> xmlhttp.open("GET", url, true);
>>>> xmlhttp.onreadystatechange = function () {
>>>> if (xmlhttp.readyState == 4) {
>>>> xmlResult = xmlhttp.responseText;
>>>> ......
>>>> xmlhttp.send(null);
>>>> }
>>>> The url I used is:
>>>> url = '
>>>> http://localhost:8080/xwikim/**bin/view/Main/hellotest?**
>>>> outputSyntax=plain<http://localhost:8080/xwikim/bin/view/Main/hellotest?outputSyntax=plain>
>>>> '
>>>>
>>>> when I debug with firefox to see the data inside xmlhttp either
>>>> responseText or response, they were all a html document for the
>>>> hellotest
>>>> with the tags like body, div, etc, it is basically helltest.html file if
>>>> you view the source code of this html page. I tried to change the output
>>>>
>>> to
>>>
>>>> true, the result is the same.
>>>>
>>>
>>> That's because with this URL you get UI around your content (whatever
>>> is the syntax of your content), for this kind of use case you should
>>> use /get/ action instead of /view/.
>>>
>>>
>>>> Question: how can I get the xml data? where am I wrong?
>>>>
>>>> Thanks very much in advance.
>>>>
>>>>
>
> --
> Sergiu Dumitriu
> http://purl.org/net/sergiu/
> ______________________________**_________________
> devs mailing list
> devs(a)xwiki.org
> http://lists.xwiki.org/**mailman/listinfo/devs<http://lists.xwiki.org/mailman/listinfo/devs>
>
Hi, all,
I followed this link:
http://platform.xwiki.org/xwiki/bin/DevGuide/WritingComponents
created a component which return xml data.
Also I created a hellotest page inside the main space, and wrote the
following velocity code:
{{velocity output='false'}}
$response.setContentType('application/xml')
#set ($xmldata= $services.hello.getHelloXML())
$xmldata
##$context.setFinished(true)
#set ($out = $response.getOutputStream())
$out.write($xmldata)
$out.flush()
{{/velocity}}
I tested this code, I can get the xml data, now I use this ajax code to
retrieve the xml data:
var xmlhttp = GetXmlHttp();
if (xmlhttp) {
xmlhttp.open("GET", url, true);
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4) {
xmlResult = xmlhttp.responseText;
......
xmlhttp.send(null);
}
The url I used is:
url = '
http://localhost:8080/xwikim/bin/view/Main/hellotest?outputSyntax=plain'
when I debug with firefox to see the data inside xmlhttp either
responseText or response, they were all a html document for the hellotest
with the tags like body, div, etc, it is basically helltest.html file if
you view the source code of this html page. I tried to change the output to
true, the result is the same.
Question: how can I get the xml data? where am I wrong?
Thanks very much in advance.
Dave
Hello XWiki experts,
how do you debug:
org.xwiki.component.manager.ComponentLookupException: Can't find descriptor for the component [role = [org.xwiki.logging.LoggerManager] hint = [default]]
It seems to prevent startup of my XWiki.
thanks in advance
Paul
Yeah, that 'view' and 'allow' thing was an optionen before... But this doesn't fixes the issue...
Example: Person a is a registered writer... he should write some pages and might edit them later... but noone else should be able to edit or see that page until its released by a moderator for the public viewers and other registered members...
I think this will be a case for a own extension if xwiki fills our other needs ... but thx anyway :)
--
Kevin Böhme <k.boehme(a)gci.de>
Handelsregister Dortmund HRB 7037
Geschäftsführer: Holger Kluth
> -----Ursprüngliche Nachricht-----
> Von: Edo Beutler mailto:ebeutler@synventis.com
> Gesendet: 23.03.2012 16:28:49
> An: XWiki Users mailto:users@xwiki.org
> Betreff: Re: [xwiki-users] Moderation / Comments & Pages
>
> Hi Kevin
>
> For pages you just have to set the rights accordingly: 'allow' 'view'
> and 'edit' for moderator and author. This implies every one else can't
> view the page.
> I think for comments it might be a bit trickier since they are saved
> in an object on the commented page. If nobody knows about an extention
> for that you might have to write one ;-)
>
> Hope this helps
> Edo
>
> On Fri, Mar 23, 2012 at 9:17 AM, Kevin Böhme <k.boehme(a)gci.de> wrote:
> > Hi list,
> >
> > we're taking a look at xwiki right now and aren't able to find a way to moderate comments and new pages... Is there any module that makes this possible?
> >
> > The goal: Let users create comments and pages and just show them if the page is confirmed... BUT the author should be able to see this page and make more edits while the page isn't free to view by third party...
> >
> > Any ideas?
> >
> > --
> > Kevin Böhme <k.boehme(a)gci.de>
> > _______________________________________________
> > users mailing list
> > users(a)xwiki.org
> > http://lists.xwiki.org/mailman/listinfo/users
> _______________________________________________
> users mailing list
> users(a)xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
Hi list,
we're taking a look at xwiki right now and aren't able to find a way to moderate comments and new pages... Is there any module that makes this possible?
The goal: Let users create comments and pages and just show them if the page is confirmed... BUT the author should be able to see this page and make more edits while the page isn't free to view by third party...
Any ideas?
--
Kevin Böhme <k.boehme(a)gci.de>
A message from Amsterdam, the Netherlands :)
JAMSTERDAM is a irregular invite-only jamming session held in Amsterdam,
the Netherlands. The group's origin lies with CouchSurfing and now it's
growing organically based on member introductions.
Now that we've completed our first 10 jam sessions successfully we are
looking for a proper wiki to collaborate on as a group and store bits of
knowledge about jamming along the way.
myxwiki username: andrew AT jamsterdam DT org
desired name: jamsterdam.myxwiki.org
It would really help us if we could install a plugin such as
http://extensions.xwiki.org/xwiki/bin/view/Extension/Social+Login but I'll
figure that out if possible at a later date :)
Thank you very much for your services, we hope you will accept us!!
Hello,
I'm trying to use the lightbox.js to provide a nice UI for creating new
custom pages/objects.
Note : it's not the Lightbox application or macro, but the javascript from
lightbox.js ...
Idea is to provide a page with following use-case :
- user clicks on "create" button
- a pop-up (new Lightbox(a,b,c)) is opened
- content of this Lightbox is a new page in inline edit mode, on newly
created object fields
- user should be able to save or cancel (something like user registration)
What I don't know is what to provide to Lightbox parameters in order to
achieve that.
For the first url, I've given something like
'/xwiki/bin/edit/Space/MyNewPage?editor=inline&template=MyTemplate&sheet=MySheet&xpage=plain'.
But in this case, the modal pop-up contains the fields in inline mode, but
without the buttons to save/cancel/preview/...
Another question is what to provide as saveurl and redirecturl (2 last
parameters of Lightbox) ?
Thanks for help,
Jeremie
--
View this message in context: http://xwiki.475771.n2.nabble.com/Using-Lightbox-to-create-new-page-objet-t…
Sent from the XWiki- Users mailing list archive at Nabble.com.