diff options
author | makkalot <makkalot@gmail.com> | 2008-06-16 00:50:32 +0300 |
---|---|---|
committer | makkalot <makkalot@gmail.com> | 2008-06-16 00:50:32 +0300 |
commit | 4b367a5d5759c7c2b2307ffb195172d8b87f5e74 (patch) | |
tree | 9412e39e2e871ecaecea9847c8b8e0064325d41d /funcweb | |
parent | f1dedb34e548f3a9249835ba09dab1192eb16946 (diff) | |
download | third_party-func-4b367a5d5759c7c2b2307ffb195172d8b87f5e74.tar.gz third_party-func-4b367a5d5759c7c2b2307ffb195172d8b87f5e74.tar.xz third_party-func-4b367a5d5759c7c2b2307ffb195172d8b87f5e74.zip |
adding the minion,module,method as hidden fields
Diffstat (limited to 'funcweb')
-rw-r--r-- | funcweb/funcweb/widget_automation.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/funcweb/funcweb/widget_automation.py b/funcweb/funcweb/widget_automation.py index 68b4108..412da34 100644 --- a/funcweb/funcweb/widget_automation.py +++ b/funcweb/funcweb/widget_automation.py @@ -32,7 +32,7 @@ class WidgetListFactory(object): } #will contain the input widget created in that class - def __init__(self,argument_dict): + def __init__(self,argument_dict,minion=None,module=None,method=None): """ Initiated with argument_dict of a method to return back a WidgetsList object to be placed into a form object @@ -43,6 +43,11 @@ class WidgetListFactory(object): self.__argument_dict = argument_dict self.__widget_list={} + + #these fields will be passed ass hidden so we need them + self.minion = minion + self.module = module + self.method = method def __add_general_widget(self): @@ -76,6 +81,16 @@ class WidgetListFactory(object): #print "That have the object :",getattr(self.__widget_list["list_default"],"default") + #adding the hidden fields (that part wass adde later can be made more generic) + if self.minion: + self.__widget_list['minion']= getattr(widgets,'HiddenField')(name="minion",value=self.minion,default=self.minion) + if self.module: + self.__widget_list['module']= getattr(widgets,'HiddenField')(name="module",value=self.module,default=self.module) + if self.method: + self.__widget_list['method']= getattr(widgets,'HiddenField')(name="method",value=self.method,default=self.method) + + + def __add_specialized_string(self,argument,argument_name): """ Specialized option adder, called when the type:string is used |