Changeset 12329 for main/waeup.ikoba/trunk/src/waeup
- Timestamp:
- 27 Dec 2014, 09:47:46 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/interfaces.py
r12324 r12329 31 31 contextual_reg_num_source, GenderSource, nats_vocab, 32 32 ConCatProductSource, CustomerDocumentSource, 33 ProductOptionSource )33 ProductOptionSourceFactory) 34 34 35 35 … … 314 314 title = _(u'Options/Fees'), 315 315 value_type = schema.Choice( 316 source=ProductOptionSource (),316 source=ProductOptionSourceFactory(), 317 317 required = True, 318 318 ), -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/vocabularies.py
r12324 r12329 22 22 from zope.catalog.interfaces import ICatalog 23 23 from zope.interface import implements, directlyProvides 24 from zope.schema.interfaces import ISource, IContextSourceBinder25 from zope.schema.interfaces import ValidationError 24 from zope.schema.interfaces import ( 25 ISource, IContextSourceBinder, ValidationError) 26 26 from zc.sourcefactory.basic import BasicSourceFactory 27 27 from zc.sourcefactory.contextual import BasicContextualSourceFactory 28 from zc.sourcefactory.source import FactoredContextualSource 29 from zc.sourcefactory.interfaces import IContextualSource 28 30 from waeup.ikoba.sourcefactory import SmartBasicContextualSourceFactory 29 31 from waeup.ikoba.interfaces import SimpleIkobaVocabulary, SUBMITTED, VERIFIED … … 161 163 return "%s - %s" % (value.document_id, value.title) 162 164 163 class ProductOptionSource(BasicContextualSourceFactory): 165 166 class IProductOptionSource(IContextualSource): 167 """A source operating in context. 168 169 This is a marker interface needed for the registration of the 170 IkobaSequenceWidget when using the List-Choice-ProductOptionSourceFactory 171 field combination primarily in IContract as a replacement for 172 the SourceOrderedMultiSelectWidget. 173 """ 174 175 176 class ProductOptionSource(FactoredContextualSource): 177 178 implements(IProductOptionSource) 179 180 181 class ProductOptionSourceFactory(BasicContextualSourceFactory): 164 182 """A product option source delivers all options belonging to 165 183 a selected product. 166 184 """ 185 186 source_class = ProductOptionSource 167 187 168 188 def getValues(self, context): -
main/waeup.ikoba/trunk/src/waeup/ikoba/widgets/overrides.zcml
r11949 r12329 43 43 /> 44 44 45 <!-- Register IkobaSequenceWidget for ProductOptionSource --> 46 <adapter 47 for="zope.schema.interfaces.IList 48 waeup.ikoba.customers.vocabularies.IProductOptionSource 49 zope.publisher.interfaces.browser.IBrowserRequest" 50 provides="zope.formlib.interfaces.ISimpleInputWidget" 51 factory="waeup.ikoba.widgets.sequencewidget.IkobaSequenceWidget" 52 permission="zope.Public" 53 /> 54 45 55 </configure>
Note: See TracChangeset for help on using the changeset viewer.