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/Exhibi…
Exhibit.PresidentsJSON<http://nielsmayer.com/xwiki/bin/view/Exhibit/Pres…
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.Presid…
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