Hi, you just need to make sure the callback is executed in the context of the page, then this.getContent() will work.
Regards, Daniel On 14.02.2015 14:34, Frédéric wrote: > Hi, > > So, I'm working on my little home automation client app, and I have a > little problem... > > This client app will be build according to the server information. I > first have to get a config (json) from that server, parse it, and then > create the pages/widgets based upon what I find in the config. > > My problem is how to organize my code to do that? I started from the > mobile showcase code. The Application object creates the pages. It also > creates a Json store (through a service object, based on code I found > in the tutorials), and fetch data. > > The problem is that the datas are retreived asynchronously, ans are not > available when I create the pages, so they can't create their widgets. > > I tried to fire a "loded" event from my service, and the pages listen > to that event. In their callback routine, they ask the service object > the infos they need, and create widgets. > > But it does not work, as I can't add these widgets to the page from the > callback; this.getcontent() does not exists... > > So, how to do that? > > Thanks, > ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
