Ok, I think this is just a race condition, with the event listener typically being registered after the livetable has been created and populated. Explicitly refreshing the table with the following makes the rows display correctly:
var lt = window[lt_name];
var end = lt.limit;
var start = Math.max(lt.lastOffset, 1);
lt.clearCache();
lt.getRows(start, end, start, end);
So instead, here's another question for LiveTable gurus: Is there a way to prevent a livetable from updating? I'd like to place the LiveTable in a div that is initially hidden, and I only want it to be active when the div is made visible.
Thanks,
Bryn
> -----Original Message-----
> From: Bryn Jeffries
> Sent: Saturday, 29 August 2015 6:28 AM
> To: XWiki Users
> Subject: Livetable events
>
>
> I've been following the instructions in
> http://platform.xwiki.org/xwiki/bin/view/DevGuide/LiveTable to modify the
> contents of a livetable, with the following jQuery:
>
> require(['jquery', 'xwiki-events-bridge'], function($) {
> document.observe("xwiki:livetable:newrow", function(ev) {
> $('.working').each(function () {
> var txt = $(this).text();
> if (txt== "true") {
> $(this).append($("<span>", {
> class: "glyphicon glyphicon-ok"
> }))
> } else if (txt == "false") {
> $(this).append($("<span>", {
> class: "glyphicon glyphicon-remove"
> }))
> }
> });
> document.fire("xwiki:livetable:ready", {});
> });
> });
>
> However, this only appears to work once I cause the livetable to update after
> it has loaded the first time (e.g. by sorting a column). How do I get it to run
> the first time?
>
> Also, what is the purpose of the last line?:
> document.fire("xwiki:livetable:ready", {}); This appears in the example code
> "Display ratings in the Livetable on row event", but doesn't obviously affect
> anything if I remove it.
I've been following the instructions in http://platform.xwiki.org/xwiki/bin/view/DevGuide/LiveTable to modify the contents of a livetable, with the following jQuery:
require(['jquery', 'xwiki-events-bridge'], function($) {
document.observe("xwiki:livetable:newrow", function(ev) {
$('.working').each(function () {
var txt = $(this).text();
if (txt== "true") {
$(this).append($("<span>", {
class: "glyphicon glyphicon-ok"
}))
} else if (txt == "false") {
$(this).append($("<span>", {
class: "glyphicon glyphicon-remove"
}))
}
});
document.fire("xwiki:livetable:ready", {});
});
});
However, this only appears to work once I cause the livetable to update after it has loaded the first time (e.g. by sorting a column). How do I get it to run the first time?
Also, what is the purpose of the last line?:
document.fire("xwiki:livetable:ready", {});
This appears in the example code "Display ratings in the Livetable on row event", but doesn't obviously affect anything if I remove it.
I tried installing different skin, and the process doesn't seem to work.
I installed Leiothrix and Silverdrop using the extensions manager.
When I tried to switch the skin on the administration page it didn't
seem to work ("You don't have rights to edit this page"?).
At one point I was able to set the skin back to XWiki.DefaultSkin and
all was OK, but now I've got to the stage that pages don't display at
all. I can't even get a login page.
How to reset the skin back to default?
Tim
I'm wanting to use container (tomcat) authentication with XWiki so that
I can use a single sign on solution, using the instructions found here:
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Authentication#HContain…
I managed to get something basic set up and the authentication is
working (the container challenges me for username/password) but when the
XWiki page displays it is completely unstyled (though I see my username
in the content so the authentication is being picked up) and it displays
an "Error. You are not allowed to view this document or perform this
action" error message in the page.
So its looking like XWiki is not picking up (or generating) some
resources it needs for that authenticated user (presumably because it
did not go through the user registration process).
Or is it expected some specific role to be assigned to the user?
What's the trick to get this working correctly?
And on a related topic, is there a way to get XWiki to understand
additional user credentials such as their real name e.g. from the
authentication token or whatever?
Thanks
Tim
Hi!
Please, is it possible to customise a XWiki.StyleSheetExtension object to
apply different properties to different actions in the same page?
For instance, I would like to use different #mainContentArea { margin-top:
; } values when viewing, or editing a page, i.e. Home.WebHome, or creating
new pages in that Home space.
Thanks for your help!
Ricardo
--
Ricardo Rodríguez
Research Management and Promotion Technician
Technical Secretariat
Health Research Institute of Santiago de Compostela (IDIS)
http://www.idisantiago.es
description: forking opensource hardware project (opensourceecology.org -> “fabfarm”)
owner name: AndrewRoberts
wiki name: fabfarm.myxwiki.org
Sent from Windows Mail
I download the xwiki war file i.e xwiki-enterprise-web-7.2-milestone-2 with
db as Oracle.
Here the configuration in hibernate.cfg.file
<property name="connection.url">jdbc:oracle:thin:@localhost
:1521:orcl</property>
<property name="connection.username">xwiki</property>
<property name="connection.password">xwiki</property>
<property
name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property
name="dialect">org.hibernate.dialect.Oracle10gDialect</property>
<property name="connection.SetBigStringTryClob">true</property>
<property name="jdbc.batch_size">0</property>
<property name="jdbc.use_streams_for_binary">false</property>
<property name="dbcp.poolPreparedStatements">true</property>
<property name="dbcp.maxOpenPreparedStatements">20</property>
<mapping resource="xwiki.oracle.hbm.xml"/>
<mapping resource="feeds.oracle.hbm.xml"/>
<mapping resource="activitystream.hbm.xml"/>
<mapping resource="instance.hbm.xml"/>
<mapping resource="mailsender.oracle.hbm.xml"/>
But when i hit the url in browser i get below error
XWiki initialization failed!
Exception thrown during job execution
class java.lang.AbstractMethodError: null
at
org.apache.commons.dbcp2.DelegatingConnection.isValid(DelegatingConnection.java:914)
at
org.apache.commons.dbcp2.DelegatingConnection.isValid(DelegatingConnection.java:914)
at
org.apache.commons.dbcp2.PoolableConnection.validate(PoolableConnection.java:283)
at
org.apache.commons.dbcp2.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:357)
at
org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2304)
at
org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2287)
at
org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2038)
at
org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1533)
at
com.xpn.xwiki.store.DBCPConnectionProvider.configure(DBCPConnectionProvider.java:215)
at
org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:143)
at
org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:84)
at
org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:459)
at
org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:90)
at
org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2863)
at
org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2859)
at
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1870)
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.initHibernate(XWikiHibernateBaseStore.java:253)
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.checkHibernate(XWikiHibernateBaseStore.java:681)
at
com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:842)
at
com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:299)
at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1562)
at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1609)
at
org.xwiki.configuration.internal.AbstractDocumentConfigurationSource.getBaseObject(AbstractDocumentConfigurationSource.java:209)
at
org.xwiki.configuration.internal.AbstractDocumentConfigurationSource.getBaseProperty(AbstractDocumentConfigurationSource.java:219)
at
org.xwiki.configuration.internal.AbstractDocumentConfigurationSource.getPropertyValue(AbstractDocumentConfigurationSource.java:315)
at
org.xwiki.configuration.internal.AbstractDocumentConfigurationSource.getProperty(AbstractDocumentConfigurationSource.java:272)
at
org.xwiki.annotation.internal.DefaultAnnotationConfiguration.getAnnotationClassReference(DefaultAnnotationConfiguration.java:120)
at
org.xwiki.annotation.internal.AnnotationClassDocumentInitializer.getDocumentReference(AnnotationClassDocumentInitializer.java:67)
at com.xpn.xwiki.XWiki.initializeMandatoryDocument(XWiki.java:1042)
at com.xpn.xwiki.XWiki.initializeMandatoryDocuments(XWiki.java:1021)
at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:966)
at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:887)
at com.xpn.xwiki.XWiki.<init>(XWiki.java:876)
at
com.xpn.xwiki.internal.XWikiInitializerJob.runInternal(XWikiInitializerJob.java:117)
at
org.xwiki.job.internal.AbstractJob.runInContext(AbstractJob.java:209)
at org.xwiki.job.internal.AbstractJob.run(AbstractJob.java:192)
at java.lang.Thread.run(Thread.java:724)
I am using jdk 6, tomcat 7
I am not sure what is missing here ?
Thanks and Regards
Mohit
Hello,
I try to import the content from a JSPWiki to XWiki with the history. I
managed to import the content, but not the history.
The generated XAR from the export contains my page in XML format :
<?xml version='1.0' encoding='UTF-8'?>
<xwikidoc version="1.1">
<web>Import JSPWiki</web>
<name>6.1WikiPage</name>
<language/>
<defaultLanguage/>
<translation>0</translation>
<creator>Import JSPWiki</creator>
<creationDate>1439990795525</creationDate>
<author>DupontJean</author>
<version>1</version>
<title>6.1WikiPage</title>
<syntaxId>xwiki/2.1</syntaxId>
<hidden>true</hidden>
<content>La page dédiée à la version 6.1.</content>
<author>DupontJean</author>
<version>2</version>
<title>6.1WikiPage</title>
<syntaxId>xwiki/2.1</syntaxId>
<hidden>true</hidden>
<content>La page dédiée à la version 6.1. Infos dispo à l'adresse suivante
: http://infos.com</content>
<author>DanielD</author>
<version>3</version>
<title>6.1WikiPage</title>
<syntaxId>xwiki/2.1</syntaxId>
<hidden>false</hidden>
<content>La page dédiée à la version 6.1. Infos dispo à l'adresse suivante
: http://new-infos.com</content>
</xwikidoc>
When I import this XAR on XWiki, i only have the last version (version 3) of
the history.
I looked how XWiki generate XAR file when you export a page with the
history.
It looks like that :
<?xml version='1.0' encoding='UTF-8'?>
<xwikidoc version="1.1">
<web>Sandbox</web>
<name>TestPage1</name>
<language/>
<defaultLanguage>en</defaultLanguage>
<translation>0</translation>
<creator>XWiki.Admin</creator>
<creationDate>1252454400000</creationDate>
<versions>head 2.1;
access;
symbols;
locks; strict;
comment @# @;
2.1
date 2015.08.18.17.23.18; author XWiki_2EAdmin; state full;
branches;
next 1.1;
1.1
date 2015.07.28.15.16.57; author XWiki_2EAdmin; state diff;
branches;
next ;
desc
@@
2.1
log
@@
text
@<?xml version="1.0" encoding="UTF-8"?>
<xwikidoc>
<web>Sandbox</web>
<name>TestPage1</name>
<language></language>
<defaultLanguage>en</defaultLanguage>
<translation>0</translation>
<parent>Sandbox.WebHome</parent>
<creator>XWiki.Admin</creator>
<author>XWiki.Admin</author>
<customClass></customClass>
<contentAuthor>XWiki.Admin</contentAuthor>
<creationDate>1252454400000</creationDate>
<date>1439911398000</date>
<contentUpdateDate>1439911398000</contentUpdateDate>
<version>2.1</version>
<title>Sandbox Test Page 1</title>
<defaultTemplate></defaultTemplate>
<validationScript></validationScript>
<comment></comment>
<minorEdit>false</minorEdit>
<syntaxId>xwiki/2.0</syntaxId>
<hidden>false</hidden>
<content>Click on **"Edit"** and modify the contents of this page, then
click on **"Save & View"** to see how they look like on your page!
= Here's some dummy text to show you what the page looks like =
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
non proident, sunt in culpa qui officia deserunt mollit anim id
est</content></xwikidoc>
@
1.1
log
@Install extension [org.xwiki.platform:xwiki-platform-sandbox-7.0]
@
text
@d14 3
a16 3
<date>1438089417000</date>
<contentUpdateDate>1438089417000</contentUpdateDate>
<version>1.1</version>
d20 1
a20 1
<comment>Install extension
[org.xwiki.platform:xwiki-platform-sandbox-7.0]</comment>
d28 1
a28 1
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
non proident, sunt in culpa qui officia deserunt mollit anim id est
laborum.</content></xwikidoc>
@
</versions>
<parent>Sandbox.WebHome</parent>
<author>XWiki.Admin</author>
<contentAuthor>XWiki.Admin</contentAuthor>
<date>1439911398000</date>
<contentUpdateDate>1439911398000</contentUpdateDate>
<version>2.1</version>
<title>Sandbox Test Page 1</title>
<comment/>
<minorEdit>false</minorEdit>
<syntaxId>xwiki/2.0</syntaxId>
<hidden>false</hidden>
<content>Click on **"Edit"** and modify the contents of this page, then
click on **"Save & View"** to see how they look like on your page!
= Here's some dummy text to show you what the page looks like =
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
non proident, sunt in culpa qui officia deserunt mollit anim id
est</content>
</xwikidoc>
Obviously it is not the same format and I don't understand this format, can
someone explain me how it is generated, and how I can modify my file to
import it on XWiki correctly.
--
Quentin
--
View this message in context: http://xwiki.475771.n2.nabble.com/Import-JSPWiki-history-tp7595692.html
Sent from the XWiki- Users mailing list archive at Nabble.com.