Ignore:
Timestamp:
7 Mar 2012, 08:27:35 (13 years ago)
Author:
uli
Message:

Register our own ObjectWidgets? as defaults for MultiValObjects?. This
is intermediate state and will change soon.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/branches/ulif-schoolgrades/src/waeup/sirp/widgets/objectwidget.py

    r7321 r7769  
    6060        return SIRPObjectWidgetView(self, request)
    6161
     62
    6263class SIRPObjectDisplayWidget(SIRPObjectWidget):
    6364
     
    7273    def _setUpWidgets(self):
    7374        return self._setUpDisplayWidgets()
     75
     76import grok
     77from zope.schema.interfaces import IObject
     78from zope.formlib.interfaces import IInputWidget
     79from zope.publisher.interfaces.browser import IBrowserRequest
     80from waeup.sirp.applicants.applicant import ResultEntry
     81from waeup.sirp.schema.interfaces import IMultiValObject
     82
     83#@grok.adapter(IObject, IBrowserRequest)
     84@grok.adapter(IMultiValObject, IBrowserRequest)
     85@grok.implementer(IInputWidget)
     86def obj_input_widget(obj, req):
     87    return SIRPObjectWidget(obj, req, ResultEntry)
     88
     89#@grok.adapter(IObject, IBrowserRequest)
     90@grok.adapter(IMultiValObject, IBrowserRequest)
     91@grok.implementer(IDisplayWidget)
     92def obj_display_widget(obj, req):
     93    return SIRPObjectDisplayWidget(obj, req, ResultEntry)
     94#grok.adapts(IObject, IBrowserRequest)
Note: See TracChangeset for help on using the changeset viewer.