320 req.form['value'] = pdef['default'] # XXX hack to pass the default value |
320 req.form['value'] = pdef['default'] # XXX hack to pass the default value |
321 vocab = pdef['vocabulary'] |
321 vocab = pdef['vocabulary'] |
322 if vocab is not None: |
322 if vocab is not None: |
323 if callable(vocab): |
323 if callable(vocab): |
324 # list() just in case its a generator function |
324 # list() just in case its a generator function |
325 vocabfunc = lambda e: list(vocab(propkey, req)) |
325 vocabfunc = lambda **kwargs: list(vocab(propkey, req)) |
326 else: |
326 else: |
327 vocabfunc = lambda e: vocab |
327 vocabfunc = lambda **kwargs: vocab |
328 w = StaticComboBoxWidget(self, 'EProperty', self.schema['value'], 'String', |
328 w = StaticComboBoxWidget(self, 'EProperty', self.schema['value'], 'String', |
329 vocabfunc=vocabfunc, description=tr(pdef['help']), |
329 vocabfunc=vocabfunc, description=tr(pdef['help']), |
330 **attrs) |
330 **attrs) |
331 else: |
331 else: |
332 w = widget_factory(self, 'EProperty', self.schema['value'], pdef['type'], |
332 w = widget_factory(self, 'EProperty', self.schema['value'], pdef['type'], |