Welcome to the Lobeo Module Server project. Please feel free to submit bugs related to it.
FS#305 - dynamically create a js file (in memory?) to launch webapps
Attached to Project:
LMS
Opened by Guillaume (Guillaume) - Wednesday, 25 January 2012, 14:58 GMT
Last edited by Guillaume (Guillaume) - Wednesday, 23 January 2013, 10:09 GMT
Opened by Guillaume (Guillaume) - Wednesday, 25 January 2012, 14:58 GMT
Last edited by Guillaume (Guillaume) - Wednesday, 23 January 2013, 10:09 GMT
|
Detailsdynamically create a js file (in memory?) to launch webapps
The file should be like that: require('....MyApp'); WTK.load(MyApp, 'myapp.xml'); OR it might be cleaner to provide a way to start an entry-point directly by passing some js code like that : JavaScriptContext newContext = context.executeNewEntryPoint("require('....MyApp');WTK.load(MyApp, 'myapp.xml');"); --------------------------------------------------- --------------------------------------------------- The generated code must be like that : require('com.lobeo.lms.wtk.ApplicationFactory'); require('com.toto.MyApp'); var Factory = function() { this.inherits(ApplicationFactory); } Factory.prototype.getDescriptor = function() { return "MyApp.descriptor.xml"; } Factory.prototype.instantiate = function(params) { return new MyApp(params); } WebToolkit.load(new Factory()); |
This task depends upon