Cool, :D
On Thu, Apr 12, 2012 at 5:44 AM, Gonzalo Almeida <[email protected]> wrote:
> I thought may be overriding the ICategorization behavior.. but I
> couldn't find a way to override a behavior
>
> anyone know how can I achieve this in dexterity?
>
This is how i overridden ICategorization subject field with
collective.z3cform.keywordwidget.widget.KeywordFieldWidget
from plone.autoform.interfaces import WIDGETS_KEY
from plone.directives.form.schema import TEMP_KEY
from plone.app.dexterity.behaviors.metadata import ICategorization
from zope import schema as _schema
_directives_values = ICategorization.queryTaggedValue(TEMP_KEY)
_directives_values.setdefault(WIDGETS_KEY, {})
_directives_values[WIDGETS_KEY]['subjects'] =
'collective.z3cform.keywordwidget.widget.KeywordFieldWidget'
_schema.getFields(ICategorization)['subjects'].index_name = 'Subject'
--
Mohd Izhar Firdaus Bin Ismail / KageSenshi
Inigo Consulting (FOSS/Plone Development, Training & Services)
http://www.inigo-tech.com
Fedora Malaysia Contributor & Ambassador
http://blog.kagesenshi.org
92C2 B295 B40B B3DC 6866 5011 5BD2 584A 8A5D 7331
_______________________________________________
Product-Developers mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-product-developers