| View previous topic :: View next topic |
| Author |
Message |
matek994
Joined: 01 Jan 1970 Posts: 6
|
Posted: Thu Aug 20, 2009 3:16 pm Post subject: load model/view from memory dom |
|
|
Hi,
I would like to set the model to a dom that exists in memory, i.e. not to be loaded via a url, is that possible?
Mats |
|
| Back to top |
|
 |
cedsav Site Admin
Joined: 03 Jan 2006 Posts: 990
|
Posted: Tue Aug 25, 2009 9:00 pm Post subject: |
|
|
Hi Mats,
Freja doesn't provide a method for this, but you could try something like this:
var xml = "<some><xml/></some>";
var model = new Freja.Model(null, Freja._aux.createQueryEngine());
model.document = Freja._aux.loadXML(xml);
model.ready = true;
Freja.AssetManager.models.push(model);
Freja._aux.signal(model, "onload");
(not tested, sorry) |
|
| Back to top |
|
 |
|