On Sun, Jul 19, 2009 at 6:55 PM, Juanjo Conti<[email protected]> wrote: > I have notice that when an error occur in a LiveElement (lost > connection or not handled exception in the server) an error message is > displayed in the browser. Is there an explicit way to use this error > showing mechanism to display errors from my application? This stuff > seems not covered in Athena documentation.
The error dialog you're noticing comes from Nevow.Athena.PageWidget.showErrorDialog (which is defined in Nevow/nevow/js/Nevow/Athena/__init__.js). The PageWidget is the root JavaScript class that controls everything that's going on on the page. If you want to customize this, you should subclass Nevow.Athena.PageWidget in your application, and override showErrordDialog. On the Python side of things, you need to subclass nevow.athena.LivePage, and set your subclass's jsClass attribute to the name of your PageWidget subclass. I would not recommend trying to implement everything PageWidget does itself, since it does quite a lot and its interface isn't completely documented anywhere. This could definitely be better documented. Can you contribute a documentation patch that explains that stuff I just said? :-) _______________________________________________ Twisted-web mailing list [email protected] http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
