本文整理汇总了Python中pyasm.biz.Pipeline.get_process_select_data方法的典型用法代码示例。如果您正苦于以下问题:Python Pipeline.get_process_select_data方法的具体用法?Python Pipeline.get_process_select_data怎么用?Python Pipeline.get_process_select_data使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyasm.biz.Pipeline
的用法示例。
在下文中一共展示了Pipeline.get_process_select_data方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _add_options
# 需要导入模块: from pyasm.biz import Pipeline [as 别名]
# 或者: from pyasm.biz.Pipeline import get_process_select_data [as 别名]
def _add_options(my):
''' add the options to the select '''
search_type = my._get_search_type()
if not search_type:
return
# get all processes if no search type is given
proj_code = Project.extract_project_code(search_type)
is_group_restricted = False
if my.has_empty:
my.add_first_option()
else:
from asset_filter_wdg import ProcessFilterWdg
if ProcessFilterWdg.has_restriction():
is_group_restricted = True
process_names, process_values = Pipeline.get_process_select_data(\
search_type, is_filter=my.is_filter, project_code=proj_code,\
is_group_restricted=is_group_restricted, sobject = my._sobject)
my.set_option("values", process_values)
my.set_option("labels", process_names)
if not my.is_filter:
behavior = {
'type': 'onchange',
'cbjs_action': "if (bvr.src_el.value=='')\
{alert('Please choose a valid process.');}" }
示例2: get_context_data
# 需要导入模块: from pyasm.biz import Pipeline [as 别名]
# 或者: from pyasm.biz.Pipeline import get_process_select_data [as 别名]
def get_context_data(my, search_type=None):
'''get the list of contexts that can be checked in with this widget'''
# usually there is no pipeline for prod/shot_instance
#search_type = my.search_type
labels, values = Pipeline.get_process_select_data(search_type, \
project_code=Project.get_project_code())
return labels, values