web/views/cwproperties.py
changeset 6069 d7cef08aad27
parent 5877 0c7b7b76a84f
child 6141 b8287e54b528
equal deleted inserted replaced
6068:3bbc79a39d3a 6069:d7cef08aad27
   351         self.help = pdef['help']
   351         self.help = pdef['help']
   352         vocab = pdef['vocabulary']
   352         vocab = pdef['vocabulary']
   353         if vocab is not None:
   353         if vocab is not None:
   354             if callable(vocab):
   354             if callable(vocab):
   355                 # list() just in case its a generator function
   355                 # list() just in case its a generator function
   356                 self.choices = list(vocab(form._cw))
   356                 self.choices = list(vocab())
   357             else:
   357             else:
   358                 self.choices = vocab
   358                 self.choices = vocab
   359             wdg = Select()
   359             wdg = Select()
   360         elif pdef['type'] == 'String': # else we'll get a TextArea by default
   360         elif pdef['type'] == 'String': # else we'll get a TextArea by default
   361             wdg = TextInput()
   361             wdg = TextInput()