added exception handling in Requesthandler, added WebWidgetsException

This commit is contained in:
Peter Schojer
2008-06-06 08:24:57 +00:00
parent e8111249e5
commit d2eaf40e88
8 changed files with 152 additions and 4 deletions

View File

@@ -114,6 +114,15 @@ void PageRenderer::renderHead(const Renderable* pRenderable, const RenderContext
ostr << "<script type=\"text/javascript\">";
ostr << "Ext.onReady(function() {";
ostr << "Ext.QuickTips.init();";
ostr << "Ext.Ajax.on({'requestexception':function(conn, resp, obj){";
ostr << "Ext.Msg.show({";
ostr << "title:'Server Error',";
ostr << "msg:resp.statusText,";
ostr << "buttons:Ext.Msg.OK,";
ostr << "icon:Ext.MessageBox.ERROR";
ostr << "});";
ostr << "}});";
// always nest a panel around, so we can get rid of dynamic casts to check for parent type
ostr << "new Ext.Panel({renderTo:'p" << pPage->id() << "',border:false,bodyBorder:false";
if (!pPage->beforeRender.jsDelegates().empty() || !pPage->afterRender.jsDelegates().empty())

View File

@@ -142,13 +142,13 @@ void Utility::initialize(ResourceManager::Ptr ptr, const Poco::Path& extJSDir)
ptr->appendJSInclude(Poco::Path(aDir, "ext-base.js"));
ptr->appendJSInclude(Poco::Path(aDir, "ext-all.js"));
ptr->appendJSInclude(Poco::Path(aDir, "DDView.js"));
ptr->appendJSInclude(Poco::Path(aDir, "MultiSelect.js"));
ptr->appendJSInclude(Poco::Path(aDir, "Multiselect.js"));
Poco::Path cssAll("resources/css/ext-all.css");
cssAll.makeFile();
ptr->appendCSSInclude(Poco::Path(aDir, cssAll));
ptr->appendCSSInclude(Poco::Path(aDir, "MultiSelect.css"));
ptr->appendCSSInclude(Poco::Path(aDir, "Multiselect.css"));
}