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 | |
---|---|
MetaInterface |
__implements__ = formless.iformless.IConfigurableFactory |
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(self): pass bar = autocallable(bar) class Foo(Page): __implements__ = IFoo, def bar(self): 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. |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Fri Mar 11 00:37:45 2005 | http://epydoc.sf.net |