[Checkins] SVN: z3c.formext/branches/sagblmi-morecomponent/src/z3c/formext/component. output allowBlank attribute when rendering combobox
Laurent Mignon
Laurent.Mignon at softwareag.com
Tue Jan 19 05:05:46 EST 2010
Log message for revision 108251:
output allowBlank attribute when rendering combobox
Changed:
U z3c.formext/branches/sagblmi-morecomponent/src/z3c/formext/component.py
U z3c.formext/branches/sagblmi-morecomponent/src/z3c/formext/component.txt
-=-
Modified: z3c.formext/branches/sagblmi-morecomponent/src/z3c/formext/component.py
===================================================================
--- z3c.formext/branches/sagblmi-morecomponent/src/z3c/formext/component.py 2010-01-19 06:43:52 UTC (rev 108250)
+++ z3c.formext/branches/sagblmi-morecomponent/src/z3c/formext/component.py 2010-01-19 10:05:46 UTC (rev 108251)
@@ -205,6 +205,7 @@
if self.widget.prompt:
emptyText = [self.widget.promptMessage]
config.update(dict(
+ allowBlank = not self.widget.required,
hiddenName = config['name']+':list',
triggerAction = 'all',
editable = True,
Modified: z3c.formext/branches/sagblmi-morecomponent/src/z3c/formext/component.txt
===================================================================
--- z3c.formext/branches/sagblmi-morecomponent/src/z3c/formext/component.txt 2010-01-19 06:43:52 UTC (rev 108250)
+++ z3c.formext/branches/sagblmi-morecomponent/src/z3c/formext/component.txt 2010-01-19 10:05:46 UTC (rev 108251)
@@ -221,7 +221,8 @@
... IFieldWidget)
>>> choiceWidget.update()
>>> pprint(interfaces.IExtJSComponent(choiceWidget).getConfig())
- {'editable': True,
+ {'allowBlank': False,
+ 'editable': True,
'emptyText': [u'no value'],
'fieldLabel': u'Choice',
'forceSelection': True,
@@ -245,7 +246,8 @@
... IFieldWidget)
>>> choiceWidget.update()
>>> pprint(interfaces.IExtJSComponent(choiceWidget).getConfig())
- {'editable': True,
+ {'allowBlank': True,
+ 'editable': True,
'emptyText': [u'no value'],
'fieldLabel': u'Choice (Not Required)',
'forceSelection': True,
@@ -650,7 +652,8 @@
Here is a select widget
>>> pprint(config['items'][3])
- {'editable': True,
+ {'allowBlank': True,
+ 'editable': True,
'emptyText': [u'no value'],
'fieldLabel': u'Gender',
'forceSelection': True,
More information about the checkins
mailing list