本文整理汇总了Python中Rule.Rule.bind方法的典型用法代码示例。如果您正苦于以下问题:Python Rule.bind方法的具体用法?Python Rule.bind怎么用?Python Rule.bind使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Rule.Rule
的用法示例。
在下文中一共展示了Rule.bind方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from Rule import Rule [as 别名]
# 或者: from Rule.Rule import bind [as 别名]
def __init__ (self, refresh, refresh_header, vsrv, rule, apply):
CTK.Container.__init__ (self)
pre = 'vserver!%s!rule!%s!match' %(vsrv, rule)
rule = Rule (pre)
rule.bind ('changed', refresh.JS_to_refresh() + refresh_header.JS_to_refresh())
rule.bind ('submit_success', refresh.JS_to_refresh() + refresh_header.JS_to_refresh())
self += CTK.RawHTML ("<h2>%s</h2>" % (_('Matching Rule')))
self += CTK.Indenter (rule)
示例2: __init__
# 需要导入模块: from Rule import Rule [as 别名]
# 或者: from Rule.Rule import bind [as 别名]
def __init__ (self, refresh, refresh_header, vsrv, rule, apply):
CTK.Container.__init__ (self)
pre = 'vserver!%s!rule!%s!match' %(vsrv, rule)
rule = Rule (pre)
rule.bind ('changed', refresh.JS_to_refresh() + refresh_header.JS_to_refresh())
rule.bind ('submit_success', refresh.JS_to_refresh() + refresh_header.JS_to_refresh())
self += CTK.RawHTML ("<h2>%s</h2>" % (_('Matching Rule')))
self += CTK.Indenter (rule)
# Trigger the 'update_rule_list' so the Rule list sibling
# widget is updated.
#
rule.bind ('submit_success', rule.JS_to_trigger('update_rule_list'))