Although I was previously able to do a hack integration with Simile's
Exhibit and Xwiki, it was too heinous to actually live with. A cleaner
solution, using Xwiki's "skin extensions" for stylesheets and javascript now
works. The "clean" solution required hosting my own copy of Exhibit based on
checking out from the trunk the latest copy of "Exhibit." Hosting my own
copy of Exhibit seems to be problematic, as the version of Exhibit I checked
out from svn/trunk has issues such as (1) a non-working minified jquery that
needed to be replaced w/ original, and (2) portability issue on IE (see
below) on which I need help/advice.

Here's my example of Xwiki/Exhibit integration:
http://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents
Here's the original example from which above was derived:
http://simile-widgets.org/exhibit/examples/presidents/presidents.html

Xwiki Source Code:
Presidents<http://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents?viewer=code>
Data used by example:
PresidentsSchemaJSON<http://nielsmayer.com/xwiki/bin/view/Exhibit/PresidentsSchemaJSON?xpage=plain>,
PresidentsJSON<http://nielsmayer.com/xwiki/bin/view/Exhibit/PresidentsJSON?xpage=plain>

Attached, because there's no easy way to view these, the contents of
XWiki.StyleSheetExtension[0] and XWiki.JavaScriptExtension[0] -- these are
objects attached to the underlying Xwiki document
http://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents which cause the
appropriate magic to happen in the header via calls to
$xwiki.ssx.use("$doc.fullName") and $xwiki.jsx.use("$doc.fullName").

It's all explained in the preamble for
http://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents?viewer=code :

> ## Note that to get this whole thing working requires jquery NOT FROM
> EXHIBIT SVN TRUNK
> ##( http://nielsmayer.com/js/exhibit/api/scripts/jquery-1.3.2.min.js )
> ## Instead, preload
> http://nielsmayer.com/xwiki/resources/js/exhibit/api/scripts/jquery-1.3.2.min.js
> ## for details see
> http://nielsmayer.com/xwiki/resources/js/exhibit/api/scripts/jquery-1.3.2.min.js.README
> $xwiki.jsfx.use("js/exhibit/api/scripts/jquery-1.3.2.min.js")##
> ## Note that
> http://nielsmayer.com/xwiki/resources/js/exhibit/api/exhibit-api.jsdifferent
> ## to trunk  http://nielsmayer.com/js/exhibit/api/exhibit-api.js
> $xwiki.jsfx.use("js/exhibit/api/exhibit-api.js")##
> ## though
> http://nielsmayer.com/xwiki/resources/js/Simile/Exhibit/webapp/styles.cssworks
>  the line below does not:
> ##$xwiki.ssfx.use("js/simile/Exhibit/webapp/styles.css")##same loaded from
> XWiki.StyleSheetExtension[0] via ssx.use.
> $xwiki.ssx.use("$doc.fullName")##
> $xwiki.jsx.use("$doc.fullName")##
>
------------

ISSUE AND REQUEST FOR HELP:

In IE, after the simile busy-spinner has popped up indicating a successful
load of Exhibit, the following errors happen, causing three successive
dialog boxes:

(1) "Caught exception: ColorCoder: Error processing configuration of coder
Details: 'firstChild.nodeValue' is null or not an object

(2) Caught exception: undefined
Details: 'firstChild.nodeValue' is null or not an object

(3) IE error: Line 1831, char 52, Error: object expected

Suggestions on which version of "Exhibit" or "Simile-Ajax-API" to use in
order to get rid of this error would be appreciated. It is interesting to
note that the "trunk" version of the same example
http://trunk.simile-widgets.org/exhibit/examples/presidents/presidents.htmlworks
fine in IE.

Is this the same issue noted previously:
http://www.mail-archive.com/[email protected]/msg00385.html
http://www.mail-archive.com/[email protected]/msg00391.html
http://www.mail-archive.com/[email protected]/msg00846.html???
----------

TODO:

One last remaining hack is that I put the following in the headers

> <link rel="exhibit/data" type="application/json"
> href="$xwiki.getURL("Exhibit.PresidentsSchemaJSON","view","xpage=plain")" />
> <link rel="exhibit/data" type="application/json"
> href="$xwiki.getURL("Exhibit.PresidentsJSON","view","xpage=plain")" />
>
via the "Exhibit" space's "HTTP Meta Information" administration setting (
http://nielsmayer.com/xwiki/bin/admin/Exhibit/WebPreferences?editor=spaceadmin&section=Presentation&space=Exhibit).
I would like to figure out a way to set these values directly in
javascript inside the document itself (or inside additional instances of
XWiki.JavaScriptExtension) rather than having them read as external json
files, e.g. http://www.mail-archive.com/[email protected]/msg02434.html
http://www.nabble.com/JSON-created-locally-td17507332.html
http://www.patrickgmj.net/node/161

-- Niels.
http://nielsmayer.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SIMILE Widgets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/simile-widgets?hl=en
-~----------~----~----~----~------~----~------~--~---

/* $xwiki.ssfx.use("js/simile/Exhibit/webapp/styles.css") did not work, all that did was the line below anyways. Note external dependency. */
@import url("http://trunk.simile-widgets.org/styles/common.css";);
/* Modified from http://trunk.simile-widgets.org/exhibit/examples/presidents/styles.css */
body {
    color:          #222;
    background-color: #fff;
}
#frame {
    width: 100%;
    height: 100%;
    padding: 0px;
    margin: 0px;
    border-collapse: collapse;
}
#frame tr {
    vertical-align: top;
}
#content {
    height: 100%;
    width: 80%;
    padding: 1em;
    background-color: #D8DADE;
}
#content h1 {
    color: #523015;
    border-bottom: 1px solid #cc0000;
}
#sidebar {
    height: 100%;
    width: 20%;
    white-space: nowrap;
/*  background-color: #fff;
    background-image: url("http://trunk.simile-widgets.org/exhibit/examples/presidents/images/whitehouse.jpg";);
    background-position: bottom right;
    background-repeat: no-repeat;
*/  border-left: 1px solid #ccc;
    padding: 1em;
}
#view-panel {
    margin-top: 1em;
}
#view-panel table {
    border-spacing: 0px;
    border-collapse: collapse;
}
#view-panel h1 {
    border: none;
    font-size: 120%;
}
#view-panel h1 {
    border: none;
    background: none;
    padding: 0;
    margin: 1em 0;
}
#view-panel h2 {
    border: none;
    background: none;
    padding: 0;
    margin: 0.5em;
}
.item {
    border: 1px solid #aaa;
    padding: 0.3em;
}
div.thumbnail {
    border:     1px solid #aaa;
    padding:    1em;
    margin:     1em;
    width:      100px;
    height:     130px;
    text-align: center;
}
div.map-lens {
    width:      200px;
    height:     200px;
    text-align: center;
}
div.thumbnail div {
    height:     100px;
    overflow:   hidden;
}        
div.exhibit-facet-body {
    background-color: #E3E6EC;
    border: 1px solid #B8B8BB;
}
div.exhibit-facet-header {
    color: #523015;
    background-color: white;
}

Attachment: Presidents.JavaScriptExtension.js
Description: JavaScript source

Reply via email to