Niels Mayer wrote:
> On Wed, May 6, 2009 at 11:25 AM, Niels Mayer <[email protected]
> <mailto:[email protected]>> wrote
> <http://n2.nabble.com/Xwiki%2BSimile-Exhibit-integration----request-for-help-w--portability-issue-td2823091.html>:
>
> Here's my example of Xwiki/Exhibit integration:
> http://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents
>
>
> I now have an improved version
> http://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents2
>
> The main advantage of this version is that it should function
> "standalone" without installing the Simile widgets locally. Unlike
> "Presidents" which uses a local, modified copy of the Exhibit trunk,
> "Presidents2" loads from api.simile-widgets.org
> <http://api.simile-widgets.org> .
>
> *Attached, *the 35K Xar (Zip/Jar format) containing the standalone
> demo, comprising three documents: Exhibit.Presidents2 and data-files
> Exhibit.PresidentsSchemaJSON and Exhibit.PresidentsJSON. You should be
> able to import these into your xwiki installation and get a working
> demo of Exhibit. (note that since the javascript in
> Exhibit.Presidents2's object XWiki.JavaScriptExtension[2] loads
> external javascript, the server and the clients accessing must be
> connected to the network for this to work).
>
> *Resolved*, one issue:
>
> 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 ...
>
>
> This is replaced with some JavaScript residing in
> XWiki.JavaScriptExtension[0]:
>
> insertExhibitDataLink(window.document,
> "/xwiki/bin/view/Exhibit/PresidentsSchemaJSON?xpage=plain");
> insertExhibitDataLink(window.document,
> "/xwiki/bin/view/Exhibit/PresidentsJSON?xpage=plain");
>
> (Next version, Presidents3, will replace loading these two extra
> javascript files and instead put the javascript data directly into
> XWiki.JavaScriptExtension[0], replacing insertExhibitDataLink() calls.)
>
> *Unresolved*, the IE portability issue, an Exhibit bug? 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
>
>
> Note that this issue is independent of "trunk" versus "stable"
> versions of Exhibit.
> http://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents uses a local
> copy of "trunk"
> http://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents2 uses
> api.simile-widgets.org <http://api.simile-widgets.org>
> Both have the same problem with a null dereference from
> "node.firstChild.nodeValue.trim()", which occurs in
> api/scripts/ui/coders/color-coder.js function
> Exhibit.ColorCoder.createFromDOM() :
>
> try {
> var node = configElmt.firstChild;
> while (node != null) {
> if (node.nodeType == 1) {
> coder._addEntry(
> Exhibit.getAttribute(node, "case"),
> node.firstChild.nodeValue.trim(),
> Exhibit.getAttribute(node, "color"));
> }
> node = node.nextSibling;
> }
> } catch (e) {
> SimileAjax.Debug.exception(e, "ColorCoder: Error
> processing configuration of coder");
> }
>
>
Niels,
Looking at the HTML source, I see
<div ex:role="coder" ex:coderClass="Color"
id="party-colors">
<span ex:color="red">Republican</span>
<span ex:color="blue">Democratic</span><p/>
<span ex:case="others" ex:color="#aaa">Other
parties</span>
<span ex:case="mixed" ex:color="#eee">Many
parties</span>
<span ex:case="missing" ex:color="#444">No party</span>
</div>
I think the <p/> is causing problem. Could you remove it and see if that
helps?
David
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---