本文整理汇总了Python中web_container.WebContainer.get_event_container方法的典型用法代码示例。如果您正苦于以下问题:Python WebContainer.get_event_container方法的具体用法?Python WebContainer.get_event_container怎么用?Python WebContainer.get_event_container使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类web_container.WebContainer
的用法示例。
在下文中一共展示了WebContainer.get_event_container方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _get_display
# 需要导入模块: from web_container import WebContainer [as 别名]
# 或者: from web_container.WebContainer import get_event_container [as 别名]
def _get_display(my):
WebContainer.set_security(FakeSecurity())
page = my.get_page_widget()
# create some singletons and store in container
cmd_delegator = WebContainer.get_cmd_delegator()
# add the event container
event_container = WebContainer.get_event_container()
from pyasm.widget import TopWdg, BottomWdg
top = TopWdg()
bottom = BottomWdg()
page = my.get_page_widget()
web = WebContainer.get_web()
from widget import Widget
widget = Widget()
widget.add(top)
widget.add(page)
# widget.add( my.get_form_wdg() )
widget.add(bottom)
# widget.add(warning_report)
widget.add(cmd_delegator)
# create a web app and run it through the pipeline
from web_app import WebApp
web_app = WebApp()
return web_app.get_display(widget)
示例2: add_event_caller
# 需要导入模块: from web_container import WebContainer [as 别名]
# 或者: from web_container.WebContainer import get_event_container [as 别名]
def add_event_caller(my, event, event_name):
'''calls a registered event which in turn calls all of its
listeners'''
event_container = WebContainer.get_event_container()
function = event_container.get_event_caller(event_name)
my.add_event(event, function)
示例3: add_onload_script
# 需要导入模块: from web_container import WebContainer [as 别名]
# 或者: from web_container.WebContainer import get_event_container [as 别名]
def add_onload_script(script):
''' this does not work on Login screen'''
event = WebContainer.get_event_container()
event.add_listener(BaseAppServer.ONLOAD_EVENT, script)