Hi!
I'm tryng to create in Zope3 a "select tag" with this code:
voc=SimpleVocabulary.fromValues(lst)
repository_choice=Choice(title=u'Repository',
vocabulary='voc')
repository_list=List(__name__='replist', title=u'Repositories',
description=u'The repositories',
value_type=repository_choice)
field = Int(__name__='numero', title=u'Nume ro', min=0, max=10)
request = TestRequest(form={'repository_list.replist': u'9'})
widget = SelectWidget(repository_list, request)
widget.hasInput()
widget.getInputValue()
a= widget().replace(' ', '\n ')
print a
n.b. lst is a generic list
but it take this error:
And, where i can find a GOOD document for using widget? Zope3 book is very bad...
Please help me
I'm tryng to create in Zope3 a "select tag" with this code:
voc=SimpleVocabulary.fromValues(lst)
repository_choice=Choice(title=u'Repository',
vocabulary='voc')
repository_list=List(__name__='replist', title=u'Repositories',
description=u'The repositories',
value_type=repository_choice)
field = Int(__name__='numero', title=u'Nume ro', min=0, max=10)
request = TestRequest(form={'repository_list.replist': u'9'})
widget = SelectWidget(repository_list, request)
widget.hasInput()
widget.getInputValue()
a= widget().replace(' ', '\n ')
print a
n.b. lst is a generic list
but it take this error:
__init__() takes exactly 4 arguments (3 given)
How i correct this code?And, where i can find a GOOD document for using widget? Zope3 book is very bad...
Please help me
Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3
_______________________________________________ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users