Back to the Form Assembly Home
formassembly.com Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist 
 ProfileProfile   Log inLog in 

load model/view from memory dom

 
Post new topic   Reply to topic    formassembly.com Forum Index -> Freja - General Discussion
View previous topic :: View next topic  
Author Message
matek994



Joined: 01 Jan 1970
Posts: 6

PostPosted: Thu Aug 20, 2009 3:16 pm    Post subject: load model/view from memory dom Reply with quote

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
View user's profile Send private message
cedsav
Site Admin


Joined: 03 Jan 2006
Posts: 990

PostPosted: Tue Aug 25, 2009 9:00 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    formassembly.com Forum Index -> Freja - General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group