Handling custom events in widgets

Handling custom events in widgets


Hi, all.
I'm trying to figure out how to develop UI widgets. Here is an example
of what i want to implement http://paste.pocoo.org/show/136745/
In two words. I want to run '_render' method after the 'loaded' event
has been fired (data loading is an asynchronous action in my case).
But my solution doesn't works. Could you help me, please?