Hello all
I would like to use the ajaxSuggest feature to help users inputting data in an input field of a form.
I checked in the tagedit.vm how it works but i can't have a result.
I create that :
---
#set($script=$xwiki.getURL("Main.TestXML")+"?xpage=plain")
<input type="text" name="project" value="" class="panelinput" style="margin:auto;" onfocus="new ajaxSuggest(this, {script:'${script}', varname: 'input', seps:'', offsety: 13} );"/><br>
---
The page Main.TestXML is like that :
---
$response.setContentType("text/xml")
<?xml version="1.0" encoding="UTF-8"?>
<results type="1">
<rs id="1" info="info1">valeur1</rs>
<rs id="2" info="info2">valeur2</rs>
<rs id="3" info="info3">valeur3</rs>
</results>
---
So when the user inputs something like "al", i would like to see the popup with the three values.
I just got a javascript error saying "Object required" on the line with the input field
Christophe Périnaud
Windows Server 2003 SP2 in a VMWare instance
Oracle 10g
Java 1.6.0_12
Xwiki 1.8 from the pack Jetty/HSQL
--------------------------------------------------------------------------------
This e-mail is intended only for the addressee named above. It does not bind the sender, except in the case of an existing written convention with the addressee. This e-mail may contain material that is confidential and privileged for the sole use of the intended recipient. Any review, reliance or distribution by others or forwarding without express permission is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender and delete all copies.
While reasonable precautions have been taken to ensure that this e-mail and any attachments are free from any computer virus or similar defect, no liability will be accepted in that respect. Anyone accessing this e-mail must take their own precautions as to security and virus protection.
KBL European Private Bankers S.A., 43 boulevard Royal L-2955 Luxembourg, R.C.S. Luxembourg B 6395, T (352) 47 97 1
I've been struggling for a while with the dilemma of getting a user into a
group. Let me supply some background on what we've been trying to do with
Xwiki.
We're trying to use Xwiki for an internal collaborative site. Management
has decided that users of the wiki must complete proper training. Without
the training, the user cannot add to the wiki pages.
For authentication, we've connected the wiki to our LDAP server via the
xwik.cfg file. Authenticated users are automatically placed into the
XWikiAllGroup by default. In order to accommodate management
requirements, I created a new user group... let's call it
"TrainedUsersGroup".
Once authenticated, users are placed into the Webhome page of the wiki.
I've placed Velocity script on the Webhome page to check if the user is in
the TrainedUsersGroup. If the user is not in the group, the user is
redirected to the NoAccess.WebHome page.
On the NoAccess.Webhome page another check is made to determine if the
user is in the TrainedUsersGroup. If the user is not in the group, a call
is made to a Groovy class (on another page in the Groovy namespace). The
groovy code executes a system call to grep on the Linux system running the
Xwiki against a CSV file pulled from an intranet web report. The passed
user's login (which is the same as the LDAP user id) is checked against
this file. If the returned grep output shows that the training has been
completed, the NoAccess.WebHome page will attempt to add the user to the
TrainedUsersGroup. If the user is added to the TrainedUsersGroup as
determined after another check, the user is redirected back to the
originating WebHome page.
This mechanism works great if the user accessing the pages is an admin.
However, if the user is a regular user everything except the addition to
the group works. Instead, the code to place the user in the group displays
on the page. It does not run and put the user into the TrainedUsersGroup.
This is no good for our needs in which we must restrict Xwiki access for
non-trained users.
(My original goal was to connect to our Oracle database and based upon the
user id determine directly if the user has completed the training. I've
had luck with a simple Groovy script running on my desktop and on the
Linux server. However, from within the Xwiki Groovy console or on a page,
I get no output. Therefore, I have abandoned the Oracle query check via
Groovy.)
I've been researching the Xwiki user list for weeks. I've poured over
xwiki documentation. I've peeked at wiki page source. I've done all this
in an attempt to figure out how to get a user to place himself into a
group. I've found a lot of confusing and contradicting information.
Programming rights are mentioned. The only place I found the ability to
set this right was in the xwiki administration. I can't determine if the
problem is even related to programming rights. I've put a debug statement
on the NoAccess.WebHome page to print whether the user visiting the page
has programming rights. In all cases it display that they do. Yet, only
admins can add themselves to the TrainedUsersGroup. This doesn't work for
me. I need to automatically add the visiting user to the TrainedUsersGroup
once the training has been validated.
What is the problem? Why won't the user go into the group? Is there a
better way of doing this? Any help, code snippets or suggestions would be
appreciated.
Thanks.
Dean Weber
Sr Software Engineer II
Raytheon Technical Services Company LLC
The XWiki development team is pleased to announce the release of XWiki Office 1.0 Milestone RC1.
XWiki Office is a XWiki.org project that provides integration between Microsoft Office and XWiki servers.
Go grab it at:
- http://www.xwiki.org/xwiki/bin/view/Main/Download#HXWikiOffice
For more information about XOffice go at:
- http://xoffice.xwiki.org/xwiki/bin/view/Main/
Main improvements introduces in version 1.0 RC1:
- Faster Word startup
- Fixed page publishing issues
- Better & cleaner output
- Improved html tables
- Better lists and bullets
- Cleaned grammar and spelling output
- Small improvements on UI dialogs.
All active XWord M3 clients and snapshot instances will be automatically updated to the latest version.
For details about this release see the Release Notes at:
- http://www.xwiki.org/xwiki/bin/view/Main/ReleaseNotesXOffice10RC1
You can also view the roadmap here:
- http://xoffice.xwiki.org/xwiki/bin/view/Main/Roadmap
Thanks
-The XWiki dev team
Jonathan --
See http://nielsmayer.com/xwiki/bin/view/Sandbox/Calc and
http://nielsmayer.com/xwiki/bin/view/Sandbox/Calc?viewer=code (
http://nielsmayer.com/xwiki/bin/download/Sandbox/Calc/Sandbox.Calc.xar )
The above took about 1 minute to do, basically cutting and pasting the code
as-is from the article below into a new document, adding one line at the
beginning to get it to include the Javascript I pasted into
XWiki.JavaScriptExtension[0] in the object editor and that's it). Let me
know if you want help getting this example running on
http://jonathanmayer.info (you're going to need to see me do the
JavaScriptExtension trick at least once )... from there, you can add new
functions or whatever to learn about javascript programming on the web.
http://www.maconstateit.net/Tutorials/JSDHTML/JSDHTML09/jsdhtml09-05.htm
A Simple Calculator
Use of buttons to create a simple JavaScript calculator is demonstrated
below. The "Calculator" button opens the calculator in a ModelessDialog
window that remains on top while providing access to the underlying Web
page. The layout below shows the same calculator with a "Formula" textbox
that is normally hidden but is revealed here to show the calculations that
take place behind the scenes.
JavaScript Calculator Formula: *Figure 9-34.* A simple
JavaScript calculator.
The XHTML code and button event handlers are shown below. The calculator is
formatted inside a table to control its layout.
<table border="7">
<tr>
<td colspan="4" style="font-family:comic sans ms; text-align:center;
color:white; background-color:gray; font-size:9pt">
JavaScript Calculator
</td>
</tr>
<tr>
<td colspan="3"><input id="Answer" type="text" style="width:100px;
text-align:right"></td>
<td><input type="button" style="width:30px" value="="
onclick="EnterEqual()"></td>
</tr>
<tr>
<td><input type="button" style="width:30px" value="1"
onclick="EnterNumber(this.value)"></td>
<td><input type="button" style="width:30px" value="2"
onclick="EnterNumber(this.value)"></td>
<td><input type="button" style="width:30px" value="3"
onclick="EnterNumber(this.value)"></td>
<td><input type="button" style="width:30px" value="+"
onclick="EnterOperator(this.value)"></td>
</tr>
<tr>
<td><input type="button" style="width:30px" value="4"
onclick="EnterNumber(this.value)"></td>
<td><input type="button" style="width:30px" value="5"
onclick="EnterNumber(this.value)"></td>
<td><input type="button" style="width:30px" value="6"
onclick="EnterNumber(this.value)"></td>
<td><input type="button" style="width:30px" value="-"
onclick="EnterOperator(this.value)"></td>
</tr>
<tr>
<td><input type="button" style="width:30px" value="7"
onclick="EnterNumber(this.value)"></td>
<td><input type="button" style="width:30px" value="8"
onclick="EnterNumber(this.value)"></td>
<td><input type="button" style="width:30px" value="9"
onclick="EnterNumber(this.value)"></td>
<td><input type="button" style="width:30px" value="*"
onclick="EnterOperator(this.value)"></td>
</tr>
<tr>
<td><input type="button" style="width:30px" value="C"
onclick="EnterClear()"></td>
<td><input type="button" style="width:30px" value="0"
onclick="EnterNumber(this.value)"></td>
<td><input type="button" style="width:30px" value="."
onclick="EnterNumber(this.value)"></td>
<td><input type="button" style="width:30px" value="/"
onclick="EnterOperator(this.value)"></td>
</tr>
</table>
<input id="Formula" type="hidden"/>
*Listing 9-22.* Code to format and style the calculator.
Notice the final <input id="Formula" type="hidden"/> field. The
type="hidden" attribute creates a standard textbox that is hidden from view.
In the example above, this control is given the attribute type="text" in
order to make it visible so you can see the formulas being created by the
button clicks.
Four functions are called by the buttons. All of the number keys call
function EnterNumber(), passing the number value of the button; the
arithmetic operator keys call function EnterOperator(), passing the operator
symbol; the "=" key calls function EnterEqual(); and the "C" key calls
function EnterClear().
<script type="text/javascript">
var op = false;
var eq = false;
function EnterNumber(Number)
{
if (op == false) {
document.getElementById("Formula").value += Number;
document.getElementById("Answer").value += Number; }
else {
document.getElementById("Answer").value = Number;
op = false;
if (eq == true) {
document.getElementById("Formula").value = Number;
eq = false; }
else {
document.getElementById("Formula").value += Number;
}
}
}
function EnterOperator(Operator)
{
if (document.getElementById("Formula").value != "") {
document.getElementById("Answer").value =
eval(document.getElementById("Formula").value);
document.getElementById("Formula").value =
eval(document.getElementById("Formula").value) + Operator;
op = true;
eq = false;
}
}
function EnterEqual()
{
if (document.getElementById("Formula").value != "") {
document.getElementById("Answer").value =
eval(document.getElementById("Formula").value);
document.getElementById("Formula").value =
eval(document.getElementById("Formula").value);
op = true;
eq = true;
}
}
function EnterClear()
{
document.getElementById("Answer").value = "";
document.getElementById("Formula").value = "";
op = false;
eq = false;
}
</script>
*Listing 9-23.* Script for the calculator.
Niels
http://nielsmayer.com
The XWiki development team is pleased to announce the release of XWiki
Enterprise 1.9.
Go grab it at http://www.xwiki.org/xwiki/bin/view/Main/Download
Final release of the XWiki Enterprise 1.9 version.
Main changes:
* UI improvements
** Quick Jump to any Page navigation
** Faster Save and Continue using AJAX
** Improved Full Screen editing
** New Live Table UI
** Improved comments UI and functionality
** Multiple attachment upload in one request
** New UI for the Class and Object editors
** Improved toolbar in the wiki editor
** Preliminary support for Autosave
* PDF export improvements
* JavaScript improvements
* Switched to UTF-8 as the default encoding
* Mailsender improvements
* New Office Importer feature: document splitting
* XWiki 2.0 Syntax is enabled by default
For more information see the Release notes at:
http://www.xwiki.org/xwiki/bin/view/Main/ReleaseNotesXWikiEnterprise19
Thanks,
The XWiki dev team
Hello:
I am deploy to set up XWiki 1.8.4 war to use a JBoss DataSource in version
4.2.2 GA and have so far been unsuccessful.
I have followed the directions in the Admin Guide but keep getting an error:
10:32:02,237 ERROR [[action]] Servlet.service() for servlet action threw
exception
com.xpn.xwiki.XWikiException: Error number 3 in 0: Could not initialize main
XWiki context
Wrapped Exception: Error number 3001 in 3: Cannot load class
com.xpn.xwiki.store.migration.hibernate.XWikiHibernateMigrationManager from
param xwiki.store.migration.manager.class
Wrapped Exception: Error number 0 in 3: Exception while hibernate execute
Wrapped Exception: Could not find datasource: java:/jdbc/XWikiDS
This error was highlighted in another posting from 3rd April regarding XWiki
version 1.6.2:
http://lists.xwiki.org/pipermail/notifications/2009-April/042752.html
Below I have included text from my web.xml, my jboss-web.xml and
hibernate.conf.xml
jboss-web.xml:
<jboss-web>
<resource-ref>
<res-ref-name>XWikiDS</res-ref-name>
<jndi-name>java:XWikiDS</jndi-name>
</resource-ref>
</jboss-web>
web.xml:
<resource-ref>
<description>DB Connection</description>
<res-ref-name>XWikiDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
hibernate.conf.xml
<hibernate-configuration>
<session-factory>
<!-- DataSource properties -->
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="connection.datasource">java:XWikiDS</property>
<mapping resource="xwiki.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
</session-factory>
</hibernate-configuration>
Can anyone please advise me if this is a bug in xwiki or if I have something
wrong with my configuration?
Thanks so much.
David
___________________________________________________________________
STRATEGY · TECHNOLOGY · VIDEO
___________________________________________________________________
phone: +44 (0)20 7580 9488 fax: +44 (0)20 7580 9489
mobile: +44 (0)7533 635 116 email: david.thompson(a)nativ.tv
___________________________________________________________________
web: http://nativ.tv blog: http://nativ.tv/futurevideo
___________________________________________________________________
Hi,
I inserted Text "Text" in the title field of a page. When i edit the page
again the "Text" part disappears.
Tried other special characters (; @) and everything seems to work normal. So
its only the " character that makes problems.
(XWiki 1.8.4, syntax 2.0, language: german)
Is there a way to have heading levels 3 or above also used as titel when the
title field is empty?
Thanks
hel.
-----
hel(a)hel.at
--
View this message in context: http://n2.nabble.com/Special-Characters-in-Titel-tp3024569p3024569.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
Will Xwiki 1.9 default new pages to 2.0 syntax?
If not, can someone detail the steps needed to change the Wiki defaults so
new pages are created with 2.0 syntax?
Thanks,
--
Glenn