After updating the wiki from v6.4.2 to v6.4.3 we have run into an issue.
Upon clicking "edit" button to edit a page the page will get stuck loading the page.
This has been reported to happen on multiple occasions.
Thanks,
Jeff Anderson
ü P.R.I.D.E.<http://pridedallas.com/> IT Analyst
* jeffanderson(a)pridedallas.com
* (214) 420 7818
Hello,
i like the REST-API and have a library in Java which works perfect. Now i
want to use the RESTful API in Javascript. But i am new to javascript and
tried a lot, but nothing seems to work. Is there a simple example in
javascript with the rest-api?
I don't get what i am doing wrong, because i am not good in javascript.
I tried
require(['jquery'], function ($) {
$.ajax({
accepts: {xml: 'text/xml', text: 'text/plain'},
url: 'http://HOST/xwiki/rest',
type: 'GET',
dataType: 'xml',
contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
converters: {'text xml': jQuery.parseXML},
crossDomain: true,
async: true,
username: 'username',
password: 'apassword',
success: function(data){
alert("Success: "+JSON.stringify(data));
},
error: function(data){
alert("Error: "+ JSON.stringify(data));
}
});
});
Also i tried
var httpRequest = new XMLHttpRequest();
httpRequest.open('PUT', 'http://HOST/xwiki/rest');
httpRequest.setRequestHeader('Accept', 'application/xml');
httpRequest.send( null );
alert( JSON.stringify(httpRequest.responseText) );
httpRequest.onreadystatechange = function(){
if(this.readyState == 4){
if(this.status == 200){
alert(this.responseText);
}
else{
alert(this.statusText);
}
}
}
I recognized a difference in ajax when i switched to jsonp because i tried
on localhost. But anyway my example work when i use my server outside.
Can you help me?
Regards,
Matthias
--
View this message in context: http://xwiki.475771.n2.nabble.com/Javascript-RESTful-tp7594084.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
I'd like to be able to generate pure JSON from a wiki page, to use in other pages via AJAX. To that end I created a page with the following content:
{{velocity wiki="false"}}
$response.setContentType('application/json')
{
"greeting" : "Hello",
"location": "World"
}
{{/velocity}}
Calling this via /xwiki/bin/get/Sandbox/JsonTest I get the following code:
<p><br/>{<br/>"greeting" : "Hello",<br/>"location": "World"<br/>}</p>
I get the same via /xwiki/bin/view/AlertDB/JsonTest?xpage=plain.
If I remove the $response.setContentType('application/json')
https://dev.alertnessdb.net/xwiki/bin/view/AlertDB/JsonTest?xpage=plain
Currently, I'm using something like this to generate a list of pages whose
prefix is "Prefix:" and link to them:
{velocity}} (((
#foreach ($row in $services.query.hql("select doc.name, doc.fullName from
XWikiDocument doc where doc.space.hidden = false and doc.space not in
('XWiki', 'Sandbox', 'Main', 'Macros') and doc.name like
'Prefix:%'").execute())
* **[[$row[0].replaceFirst("Prefix: *", "").replaceAll("~",
"~~~~").replaceAll("[\x20-\x7f&&[^a-zA-Z0-9 ~]]",
"~~$0")>>doc:$row[1].replaceAll("~", "~~").replaceAll("[\x5b\x5d|]", "\\$0
<file:///\\$0> ")]]**
#end
))) {{/velocity}}
I have tested with some heavy test cases like
Prefix:
~~~!!!```@@@$$$%%%^^^&&&***((()))___----+++==={{{}}}[[[]]]\\\|||:::;;;'''"""
???///...>>>,,,<<<
And what I have above works correctly (both showing the title and linking to
the document). I only work on a few hard test cases, though, so I'm not sure
if I missed anything.
Is there a method that does all this automatically? Or is there a better
approach to this?
I have a Groovy script that takes input from a form textarea. I'd like to prevent html (and JS) markup from being submitted and, if HTML is submitted, strip it out. Is there a tool already packaged within XWiki to do this, or should I look to an external package like Jericho?
Thanks,
Bryn
Hello,
I'm looking for advice about a way to add some tags on saved page with class.
What I have:
- a sheet page with an object Class ( with an object class + properties) + a template page
- a velocity code in a page AddMyTag to add some tags on some page with this URL parameters:
$!request.PageSource, $!request.ClassName
What I'm trying to do, is: when a user save a page, a tag is added. The tag to add is coming from a properties value (last character on property name is _Tag).
If I call my 'AddMyTag' page, tags are correctly added on PageSource.
To resume:
- the user save HisPage
- HisPage add tags from a properties value (name xxx_Tag)
My problem is "how can I launch" automaticelly my 'AddMyTag' page when a user record PageSource?
I tried with Ajax with
document.observe("xwiki:actions:save", function(event){ (http://platform.xwiki.org/xwiki/bin/view/DevGuide/JavaScriptAPI#HActioneven…) but the problem is: sometime xxx_Tag property value is updated after my AJAX call (and the old tag is attached on page).
A the moment, I'm looking for another way, I read http://extensions.xwiki.org/xwiki/bin/view/Extension/WikiComponent+Module
But documentation indicate: "The goal is to listen ... DocumentUpdatingEvent events (note that these events are fired before the page is saved and thus our code doesn't need to perform the save itself ..."
Then I can not use this method either because I must add tag from new value from my _Tag properties.
How can I launch a velocity script on a document after document is saved (to add some tag from the document itself)?
Thxs for any help
Pascal B
I would like to create a form for a international audience (multi language)
So I created a AppWithinMinutes app.
I would like that my users can Multiselect from a list that is a selection
of objects based on a class.
So i created a class (with AppWithinMinutes:
Class properties
Short Text (shortText1: String)
Long Text (longText1: TextArea)
Long Text (longText2: TextArea)
Database List (databaseList1: Database List)
The databaseList1 has the following properties:
DisplayType: checkbox
Multiple Select: true
XWiki Class Name: XWiki.UIExtensionClass
Id Field Name: name ()
Value Field Name: name
The first issue I get that I get all objects of the class. I hoped to add a
selection by adding this query:
from doc.object(XWiki.UIExtensionClass) as obj where
lower(obj.extensionPointId) like '%cdlsworld.standardized.questionaires%'
and ('wiki' = obj.scope) order by obj.name
But how can I add this?
The second issue that I hoped to be able to use for the option to add the
translated value
$services.localization.get('$value')
I'm sorry but i can't find any option like "icon theme".
Am I in the wrong dialog(see the screenshots in the attachments)?
2015-04-03 12:27 GMT+02:00 Georg Hirn <georg.hirn(a)gmail.com>:
> I'm sorry but i can't find any option like "icon theme".
> Am I in the wrong dialog(see the screenshots in the attachments)?
>
> 2015-04-03 11:32 GMT+02:00 Marius Dumitru Florea <
> mariusdumitru.florea(a)xwiki.com>:
>
>> On Thu, Apr 2, 2015 at 12:12 AM, Georg Hirn <georg.hirn(a)gmail.com> wrote:
>> > Hi,
>> >
>>
>> > I have changed the skin of my xwiki(6.4.3) installation from calibri to
>> > flamingo.
>>
>> Flamingo is the default skin since XWiki 6.2 so why did you have to
>> switch from Colibri? Did you do an upgrade from a previous version (<
>> 6.2)? It's always important to mention if the problem is on a clean
>> install or after an upgrade.
>>
>> Thanks,
>> Marius
>>
>> > When I refreshed the page there were some errors. On some buttons
>> > the icons were drawn multiple, see the picture in the attachment.
>> > I tired to update to the latest stable xwiki version (7.0) but nothing
>> > changed.
>> > Could anybody help me please?
>> >
>> > Thanks,
>> > Georg
>> > _______________________________________________
>> > 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
>>
>
>
Hello!
I'm trying to use XWIki for purposes for company documentation and data.
My first step is to setup XWiki for HR Department, and for now I have
problems with that.
Can you please help me?
1. How can I make some kind of Address Book? We need a place, where we
can put in all contacts of our current team, their photo, emails, tel.
numbers, skype, etc.
2. Is it possible to place this kind of information on dashboard?
3. Is there any way to place an announcement, so all xwiki users will
see it?
--
*Faithfully yours,Andreev Vladislav*
*Head Project Manager*
*Cleveroad Inc.*