[Product-Developers] Different NamedVocabulary for each instance of product

Johannes Schwenk johannes.schwenk at gmail.com
Tue Sep 30 18:25:07 UTC 2008


Hello,

I am using archgenxml-2.1 and ArgoUML to design my content type. My system 
configuration:

Plone 3.1.4
CMF 2.1.1
Zope (Zope 2.10.6-final, python 2.4.4, linux2)
Python 2.4.4 (#1, Jan 28 2008, 15:57:09) [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)]
PIL 1.1.6

I am developing a content type which requires a tree-like vocabulary for each 
instance. I know about the tagged values 'vocabulary:name' 
and 'vocabulary:type' to get a vocabulary from ATVocabularyManager assigned 
to a field. But this produces something like:

    StringField(
        name='VocabName',
        mutator='setVocabulary',
        widget=StringField._properties['widget'](
            label='Vocabname',
            label_msgid='PloneCategorizer_label_VocabName',
            i18n_domain='PloneCategorizer',
        ),
    ),
    LinesField(
        name='Vocab',
        widget=PicklistWidget(
            label='Vocab',
            label_msgid='PloneCategorizer_label_Vocab',
            i18n_domain='PloneCategorizer',
        ),
        write_permission="ManagePortal",
        vocabulary=NamedVocabulary("""default"""),
    ),

in the schema of the type. I would like to (re-)set the 'vocabulary' attribute 
of the 'Vocab' field every time the value of the 'VocabName' field changes. 
Is that possible and how could I do this?

Sorry, I'm still new to this and struggling hard ;-)!

Johannes




More information about the Product-Developers mailing list