get_widget

get_widget(class_name, args={}, values={})

Get a defined widget

params:

class_name - the fully qualified class name of the widget

keyparams:

args - keyword arguments required to create a specific widget

values - form values that are passed in from the interface

return:

string - html form of the widget

example:

class_name = 'tactic.ui.panel.TableLayoutWdg'

args = {

'view': 'task_list',

'search_type': 'sthpw/task',

}

filter = [{"prefix":"main_body","main_body_enabled":"on","main_body_column":"project_code","main_body_relation":"is","main_body_value":"{$PROJECT}"}, {"prefix":"main_body","main_body_enabled":"on","main_body_column":"search_type","main_body_relation":"is not","main_body_value":"sthpw/project"}]

from simplejson import dumps

values = {'json': dumps(filter)}

widget_html = server.get_widget(class_name, args, values)