Ashutosh,
You can delay the construction of the exhibit until later. First, set
the autoCreate URL parameter to false
<script
src="http://static.simile.mit.edu/exhibit/api-2.0/exhibit-api.js?autoCreate=false"></script>
Then when you need to create an exhibit, do something like this:
var database = Exhibit.Database.create();
Exhibit.ExhibitJSONImporter.load("data-file.json", database, function() {
var exhibit = Exhibit.create();
var div = document.createElement("div");
div.setAttribute("ex:role", "view");
document.body.appendChild(div);
var view = Exhibit.UI.createFromDOM(div, exhibit.getUIContext());
exhibit.setComponent("the-view", view);
});
Cheers,
David
Ashutosh Chauhan wrote:
> Dear All,
>
> I am trying to develop a web desktop something like:
> http://extjs.com/deploy/dev/examples/desktop/desktop.html . Now I want
> to run an exhibit application inside one of the windows. Window gets
> created first time it is launched and not at the time page loads. I
> presume exhibit can run only on body onload event and that means it
> cant be called later. As a result, when i create window later on,
> exhibit doesnt run.
> Is this indeed the limitation of exhibit or it is wrong thinking on my
> part? Any possible solutions?
>
> Cheers,
> Ashutosh.
> ------------------------------------------------------------------------
>
> _______________________________________________
> General mailing list
> [email protected]
> http://simile.mit.edu/mailman/listinfo/general
>
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general