开发者

Archetypes AutoCompleteWidget for Plone4

My custom archetypes content types need autocomplete widget, but I do not ye开发者_运维技巧t find Plone 4 compatible product on this. Any suggestion? Or, if I have to upgrade those old widget products, any good examples or resources to hint?


I'm using Products.AutocompleteWidget 1.3 in a plone 4.0.7 project that has been migrated from 3.3.x and it works out well. So no need to upgrade it.

relatedTopicsField = ReferenceField(
        name = 'relatedTopics',
        relationship = 'belongsToTopics',
        multiValued = True,
        isMetadata = True,
        index = 'KeywordIndex',
        write_permission = ModifyPortalContent,
        allowed_types = ['MyType'],
        vocabulary_factory = 'my.types.TopicVocabulary',
        enforceVocabulary = 1,
        required = True,
        widget = AutocompleteWidget(
            label = _(u"Topics"),
            description = _(u"Choose the topics this item is related to."),
            visible = {'edit' : 'visible', 'view' : 'invisible' },
            actb_timeout = 50000,
            actb_lim = 7,
            )
        )
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜