Dynamisches vocabulary für SelectionWidget

Nico Grubert <[email protected]>
Newsgroups gmane.comp.web.zope.german
Message-ID <[email protected]>
Hallo zusammen

Ich habe einen Plone Content-Typen, der in etwa so aussieht:

-------------------------------------------------------------------------
navSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema((

     atapi.StringField('ldap_users',
         required = False,
         searchable = False,
         label = u"Users",
         widget = atapi.SelectionWidget(label = u'Users'),
         vocabulary = getLDAPUsersDisplayList,
         ),
     ),

))

finalizeATCTSchema(navSchema, folderish=True, moveDiscussion=False)

class nav(base.ATCTContent):
     """Describe a nav item.
     """

     implements(Inav)

     portal_type = "nav"
     _at_rename_after_creation = True
     schema = navSchema
-------------------------------------------------------------------------

Für das vocabulary würde ich gern eine Funktion 
'getLDAPUsersDisplayList' aufrufen, die mit Daten aus dem "acl_users" 
UserFolder der Plone Site die entsprechende DisplayList generiert.

Wie und wo definiere ich die getLDAPUsersDisplayList Methode nun, so 
dass ich sie für das Vocabulary verwenden kann?


Besten Dank im voraus
Nico


_______________________________________________
zope mailing list
[email protected]
https://mail.dzug.org/mailman/listinfo/zope
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.