CustomWidgetFactory passes wrong arguments to a MultiCheckBoxWidget
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 3 |
Fix Released
|
Critical
|
Unassigned |
Bug Description
I want to use a MultiCheckBoxWidget as a custom widget for a field that is a List with value_type Choice.
In Zope 3.1 this only worked if I subclassed my own widget and made sure that the vocabulary from the value_type was passed.
In Zope 3.2 this should be fixed, but it doesn't work as expected. The widget gets the value_type instead of the value_type's vocabulary passed.
See the following lines in zope/app/
def __call__(self, context, request):
# Sequence widget factory
if ICollection.
args = (context, context.value_type, request) + self.args
# Vocabulary widget factory
elif IChoice.
args = (context, context.vocabulary, request) + self.args
Replacing line 111
args = (context, context.value_type, request) + self.args
by
args = (context, context.
fixes my problem. I don't know if this causes new problems somewhere else.
Changes: submitter email, importance (medium => critical), new comment
I think this has been addressed.