本文整理汇总了Python中pyasm.widget.TableWdg.set_show_property方法的典型用法代码示例。如果您正苦于以下问题:Python TableWdg.set_show_property方法的具体用法?Python TableWdg.set_show_property怎么用?Python TableWdg.set_show_property使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyasm.widget.TableWdg
的用法示例。
在下文中一共展示了TableWdg.set_show_property方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_display
# 需要导入模块: from pyasm.widget import TableWdg [as 别名]
# 或者: from pyasm.widget.TableWdg import set_show_property [as 别名]
def get_display(self):
web = WebContainer.get_web()
widget = Widget()
search_type = web.get_form_value("parent_search_type")
search_id = web.get_form_value("parent_search_id")
if not search_type:
widget.add("RenderSubmitInfo: parent type not found")
return widget
hidden = HiddenWdg("parent_search_type", search_type)
widget.add(hidden)
hidden = HiddenWdg("parent_search_id", search_id)
widget.add(hidden)
sobject = Search.get_by_id(search_type, search_id)
table = TableWdg(search_type, css="embed")
table.set_show_property(False)
table.set_sobject(sobject)
table.remove_widget("render")
table.remove_widget("description")
widget.add(table)
return widget
示例2: get_display
# 需要导入模块: from pyasm.widget import TableWdg [as 别名]
# 或者: from pyasm.widget.TableWdg import set_show_property [as 别名]
def get_display(my):
args = WebContainer.get_web().get_form_args()
# get the args in the URL
search_type = args['search_type']
search_id = args['search_id']
sobject = Search.get_by_search_key("%s|%s" % (search_type,search_id) )
search = Search("prod/sequence_instance")
search.add_filter(sobject.get_foreign_key(), sobject.get_code())
all_instances = search.get_sobjects()
widget = DivWdg()
widget.add_style("width: 95%")
widget.add_style("margin-left: 20px")
table = TableWdg("prod/sequence_instance", "layout", css="minimal")
table.set_show_property(False)
table.set_show_header(False)
table.set_sobjects(all_instances)
table.set_search(search)
widget.add(table)
aux_data = SequenceInstance.get_aux_data(all_instances)
table.set_aux_data(aux_data)
return widget
示例3: _get_sobject_history_wdg
# 需要导入模块: from pyasm.widget import TableWdg [as 别名]
# 或者: from pyasm.widget.TableWdg import set_show_property [as 别名]
def _get_sobject_history_wdg(my):
''' this method is called thru ajax '''
args = WebContainer.get_web().get_form_args()
# get the args in the URL
search_type = args['search_type']
search_id = args['search_id']
#sobject = Search.get_by_id(search_type, search_id)
div = Widget()
search = Search("sthpw/sobject_log")
search.add_filter("search_type", search_type)
search.add_filter("search_id", search_id)
sobjects = search.get_sobjects()
search = Search("sthpw/transaction_log")
search.add_filters("id", [x.get_value("transaction_log_id") for x in sobjects] )
sobjects = search.get_sobjects()
table = TableWdg("sthpw/transaction_log", "table", css='table')
table.set_show_property(False)
table.set_sobjects(sobjects)
div.add(table)
div.add(HtmlElement.br(2))
return div
div.add(assigned_shot_wdg)
div.add(HtmlElement.br(2))
return div
示例4: get_display
# 需要导入模块: from pyasm.widget import TableWdg [as 别名]
# 或者: from pyasm.widget.TableWdg import set_show_property [as 别名]
def get_display(self):
web = WebContainer.get_web()
args = web.get_form_args()
# get the args in the URL
search_type = args['search_type']
search_id = args['search_id']
sobject = Search.get_by_search_key("%s|%s" % (search_type,search_id) )
planner_search_type = self.get_search_type()
# get parent instances first
'''
all_instances = []
parent_code = ""
if sobject.has_value("parent_code"):
parent_code = sobject.get_value("parent_code")
if parent_code != "":
parent = sobject.get_by_code(parent_code)
search = Search(planner_search_type)
search.add_filter(sobject.get_foreign_key(), parent.get_code())
instances = search.get_sobjects()
all_instances.extend(instances)
'''
search = Search(planner_search_type)
search.add_filter(sobject.get_foreign_key(), sobject.get_code())
instances = search.get_sobjects()
#all_instances.extend(instances)
widget = DivWdg()
widget.add( HiddenWdg("planner_search_type", planner_search_type) )
widget.add_style("width: 95%")
widget.add_style("float: right")
table = TableWdg(search_type, "layout", css='minimal')
table.table.set_max_width(use_css=True)
#table.set_sobjects(all_instances)
table.set_search(search)
table.do_search()
table.set_show_property(False)
#aux_data = ShotInstance.get_aux_data(all_instances)
#table.set_aux_data(aux_data)
widget.add(table)
return widget
示例5: _get_sobject_wdg
# 需要导入模块: from pyasm.widget import TableWdg [as 别名]
# 或者: from pyasm.widget.TableWdg import set_show_property [as 别名]
def _get_sobject_wdg(my):
''' this method is called thru ajax '''
args = WebContainer.get_web().get_form_args()
# get the args in the URL
search_type = args['search_type']
sobj_search_type = args['sobj_search_type']
search_id = args['search_id']
view = args['view']
sobject = Search.get_by_id(sobj_search_type, search_id)
content = Widget()
table = TableWdg(search_type, view, css='table')
table.set_show_property(False)
content.add(table)
content.add(HtmlElement.br(2))
search = my._get_sobject_search(sobject, search_type)
sobjects = search.get_sobjects()
if search_type.startswith("sthpw/note"):
# this assumes that a project has submission!
from pyasm.prod.biz import Submission
from pyasm.search import SqlException
try:
notes = Submission.get_all_notes(sobject)
sobjects.extend( notes )
except SqlException:
pass
def compare(x,y):
return cmp( y.get_value("timestamp"), x.get_value("timestamp") )
sobjects.sort(cmp=compare)
table.set_search(search)
table.set_sobjects(sobjects)
return content