本文整理汇总了Python中pyasm.widget.TableWdg.set_id方法的典型用法代码示例。如果您正苦于以下问题:Python TableWdg.set_id方法的具体用法?Python TableWdg.set_id怎么用?Python TableWdg.set_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyasm.widget.TableWdg
的用法示例。
在下文中一共展示了TableWdg.set_id方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: init
# 需要导入模块: from pyasm.widget import TableWdg [as 别名]
# 或者: from pyasm.widget.TableWdg import set_id [as 别名]
def init(my):
# get the args in the URL
args = WebContainer.get_web().get_form_args()
search_type = args['search_type']
search_id = args['search_id']
sobject = Search.get_by_id(search_type, search_id)
main_div = DivWdg()
main_div.add_style("width: 95%")
main_div.add_style("float: right")
my.add(main_div)
if isinstance(sobject, Shot):
content_id ='summary_story_%s' %sobject.get_id()
title_id = 'story_head_%s' %sobject.get_id()
story_div = DivWdg(id=content_id)
story_div.add_style('display','block')
story_head = HtmlElement.h3("Storyboard")
my.add_title_style(story_head, title_id, content_id)
main_div.add(story_head)
main_div.add(story_div)
storyboard_table = TableWdg("prod/storyboard", "summary", css='minimal')
search = Search("prod/storyboard")
search.add_filter( sobject.get_foreign_key(), sobject.get_code() )
sobjects = search.get_sobjects()
storyboard_table.set_sobjects(sobjects)
story_div.add(storyboard_table)
# add reference material
search = Search("sthpw/connection")
search.add_filter("src_search_type", search_type)
search.add_filter("src_search_id", search_id)
connections = search.get_sobjects()
if connections:
content_id ='summary_ref_%s' %sobject.get_id()
title_id = 'ref_head_%s' %sobject.get_id()
ref_head = HtmlElement.h3("Reference")
my.add_title_style(ref_head, title_id, content_id)
ref_div = DivWdg(id = content_id)
ref_div.add_style('display','block')
for connection in connections:
thumb = ThumbWdg()
thumb.set_name("snapshot")
dst_search_type = connection.get_value("dst_search_type")
dst_search_id = connection.get_value("dst_search_id")
dst = Search.get_by_id(dst_search_type, dst_search_id)
thumb.set_sobject(dst)
ref_div.add(thumb)
main_div.add(ref_head)
main_div.add(ref_div)
task_head = HtmlElement.h3("Tasks")
content_id ='summary_task_%s' %sobject.get_id()
title_id = 'task_head_%s' %sobject.get_id()
my.add_title_style(task_head, title_id, content_id)
main_div.add(task_head)
task_div = DivWdg(id=content_id)
task_div.add_style('display','block')
main_div.add(task_div)
search = Search("sthpw/task")
#if process != "":
# search.add_filter("process", process)
search.add_filter("search_type", search_type)
search.add_filter("search_id", search_id)
#search.set_limit(4)
task_table = TableWdg("sthpw/task", "summary", css='minimal')
task_table.set_id('sthpw/task%s' % search_id)
task_table.set_search(search)
task_div.add(task_table)
content_id ='summary_hist_%s' %sobject.get_id()
title_id = 'hist_head_%s' %sobject.get_id()
hist_head = HtmlElement.h3("Checkin History")
my.add_title_style(hist_head, title_id, content_id)
hist_div = DivWdg(id=content_id)
hist_div.add_style('display','block')
#.........这里部分代码省略.........