summaryrefslogtreecommitdiffstats
path: root/funcweb/funcweb/widget_automation.py
diff options
context:
space:
mode:
authormakkalot <makkalot@gmail.com>2008-08-11 23:18:16 +0300
committermakkalot <makkalot@gmail.com>2008-08-11 23:18:16 +0300
commitf0c042888db84e241d63cf33683644ab83b65437 (patch)
tree988af28b6559e1aa9fa4ab16a192dc57abff7fb2 /funcweb/funcweb/widget_automation.py
parent7e83f3d857bbb43817d703607b25aa6ea1c6d5a6 (diff)
downloadfunc-f0c042888db84e241d63cf33683644ab83b65437.tar.gz
func-f0c042888db84e241d63cf33683644ab83b65437.tar.xz
func-f0c042888db84e241d63cf33683644ab83b65437.zip
the small patch for adding the list*
Diffstat (limited to 'funcweb/funcweb/widget_automation.py')
-rw-r--r--funcweb/funcweb/widget_automation.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/funcweb/funcweb/widget_automation.py b/funcweb/funcweb/widget_automation.py
index 9467f21..9769586 100644
--- a/funcweb/funcweb/widget_automation.py
+++ b/funcweb/funcweb/widget_automation.py
@@ -28,6 +28,8 @@ class WidgetListFactory(object):
'hash':{
'type':"RepeatingFieldSet"},
'list':{
+ 'type':"RepeatingFieldSet"},
+ 'list*':{
'type':"RepeatingFieldSet"}
}
#will contain the input widget created in that class
@@ -50,7 +52,8 @@ class WidgetListFactory(object):
self.method = method
def __add_general_widget(self):
-
+ # a mirror var to show that these are same things
+ mirror_case = {'list*':'list'}
#key is the argument_name and the argument are options
for key,argument in self.__argument_dict.iteritems():
#get the type of the argument
@@ -69,7 +72,10 @@ class WidgetListFactory(object):
if act_special:
#calling for example __add_specialized_string(..)
- getattr(self,"_%s__add_specialized_%s"%(self.__class__.__name__,current_type))(argument,key)
+ if current_type == "list*":
+ getattr(self,"_%s__add_specialized_%s"%(self.__class__.__name__,mirror_case[current_type]))(argument,key)
+ else:
+ getattr(self,"_%s__add_specialized_%s"%(self.__class__.__name__,current_type))(argument,key)
else:
temp_object = getattr(widgets,self.__convert_table[current_type]['default_value'])()
#add common options to it