Re: [xwiki-devs] Xwiki+Simile Exhibit integration // request for help w/ portability issue
On Sat, May 9, 2009 at 10:04 AM, David Huynh <[email protected]> wrote:
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?
That was exactly the problem! Thank you so much, as that's one I would have never spotted myself! FYI, here's what happened: Since I just cut/paste the HTML from view-source on the presidents example on simile-widgets.org, the newlines got interpreted as paragraphs by the wiki-engine in Xwiki. So, I removed the extra newline in Exhibit.Presidents2, and it now works in IE! This is a "gotcha" I frequently hit in Xwiki, although I find the ability to mashup HTML and wikitext in an active document quite useful. Now both the "standalone" http://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents2 and locally-hosted-exhibit http://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents work in IE! Thanks again and also thanks for Exhibit which is just all around great! The updated XAR (zip format) of "Presidents2" example is here: http://nielsmayer.com/xwiki/bin/download/Exhibit/Presidents2/Exhibit.Preside... Length Date Time Name -------- ---- ---- ---- 94080 05-09-09 10:30 Exhibit/Presidents2.xml 2226 05-09-09 10:30 Exhibit/PresidentsSchemaJSON.xml 29379 05-09-09 10:30 Exhibit/PresidentsJSON.xml 544 05-09-09 10:30 package.xml -------- ------- 126229 4 files Niels http://nielsmayer.com PS: After sending the announcement yesterday, I realized there was one issue that makes this example not quite standalone. Exhibit.PresidentsPkg.xar contains a hard-coded google-maps key that you receive when registering your site <http://code.google.com/apis/maps/signup.html>. You'll need to change "gmapkey" setting in object XWiki.JavaScriptExtension[2] on document "Exhibit.Presidents2":
params: { bundle: true, authenticated: false, autoCreate: false, safe: false, gmapkey: "XXXXXXXXXXXXXXXXXXXXXXXXXXXX", views: "timeline,map" }
Until this is changed, you'll get a dialog box from google saying you need to register. When you click away the dialog box, it should load the interface even if not correctly registered. PPS: What does this Exhibit parameter setting do, and what is the correct value: namespace: "http://simile.mit.edu/2006/11/exhibit#", (also in object XWiki.JavaScriptExtension[2] on document "Exhibit.Presidents2)
FYI, a third version of the same example -- http://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents3 -- this time, the JSON data resides directly in the document "Presidents3" object XWiki.JavaScriptExtension[0] and the code to load it into the exhibit database is in object XWiki.JavaScriptExtension[1] ... Unlike the previous example, there's no separate documents containing the exhibit data Exhibit.PresidentsSchemaJSON<http://nielsmayer.com/xwiki/bin/view/Exhibit/PresidentsSchemaJSON?xpage=plain>and Exhibit.PresidentsJSON<http://nielsmayer.com/xwiki/bin/view/Exhibit/PresidentsJSON?xpage=plain>that get loaded by Exhibit from the browser. All data and custom javascript reside in the standalone document which means it loads more quickly, with less updating in the browser, and less server hits. (compare performance to http://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents2 ) The source code is in the "standalone" example XAR (zip) file is at http://nielsmayer.com/xwiki/bin/download/Exhibit/Presidents3/Exhibit.Preside... In order to get rid of the google-maps warning popup, you will need to get your own google maps key <http://code.google.com/apis/maps/signup.html> and replace the gmapkey set in object XWiki.JavaScriptExtension[2]:
params: { bundle: true, authenticated: false, autoCreate: false, safe: false, gmapkey: "XXXXXXXXXXXXXXXXXXXXXXXXXXXX"> , views: "timeline,map" }
Now that I've figured out how to get a standard example working correctly in Exhibit&Xwiki, it's time to take the techniques I developed for "Presidents3" and apply it to my own applications. Niels http://nielsmayer.com
participants (1)
-
Niels Mayer