Home | Trees | Index | Help |
|
---|
Package nevow :: Module rend :: Class ConfigurableFactory |
|
Page
Method Summary | |
---|---|
Configurable factory for use when self is a configurable; aka it implements IConfigurable or one or more TypedInterface subclasses. | |
Configurable factory for use when self.original is a configurable; aka it implements IConfigurable or one or more TypedInterface subclasses. | |
formless.webform.renderForms calls locateConfigurable on the IConfigurableFactory instance it retrieves from the context. |
Class Variable Summary | |
---|---|
Implements |
__implemented__ = <implementedBy nevow.rend.Configurable...
|
ClassProvides |
__providedBy__ = <zope.interface.declarations.ClassProvi...
|
ClassProvides |
__provides__ = <zope.interface.declarations.ClassProvide...
|
Method Details |
---|
configurable_(self, context)Configurable factory for use when self is a configurable; aka it implements IConfigurable or one or more TypedInterface subclasses. Usage:
>>> class IFoo(TypedInterface):
... def bar(): pass
... bar = autocallable(bar)
...
>>> class Foo(Page):
... implements(IFoo)
...
... def bar():
... print "bar called through the web!"
...
... def render_forms(self, ctx, data):
... return renderForms() # or renderForms('')
...
... docFactory = stan(render_forms).
|
configurable_original(self, ctx)Configurable factory for use when self.original is a configurable; aka it implements IConfigurable or one or more TypedInterface subclasses. Usage:
>>> class Foo(Page):
... def __init__(self):
... self.original = SomeConfigurable()
... def render_forms(self, ctx, data):
... return renderForms('original')
... docFactory = stan(render_forms)
|
locateConfigurable(self, context, name)formless.webform.renderForms calls locateConfigurable on the IConfigurableFactory instance it retrieves from the context. It passes the "name" that was passed to it, so if renderForms() was placed in the DOM, locateConfigurable will be called with name = ''; if renderForms('foo') was placed in the DOM, locateConfigurable will be called with name = 'foo'. This default implementation of locateConfigurable looks for a configurable_* method corresponding to the name which was passed. |
Class Variable Details |
---|
__implemented__
|
__providedBy__
|
__provides__
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Wed Jan 24 20:46:22 2007 | http://epydoc.sf.net |