Package twisted :: Package web :: Package woven :: Module model :: Class MethodModel |
[frames | no frames]

## Class MethodModel

    Model --+
            |
           MethodModel

Known Subclasses:
  `_RequestHack`, `FormDisplayModel`, `LivePage`, `Page`

Look up submodels with wmfactory_* methods.

Method Summary
| ``getSubmodel`(self, request, name)` Get the submodel `name' of this model.
| ``submodelCheck`(self, request, name)` Allow any submodel for which I have a submodel.
| ``submodelFactory`(self, request, name)` Call a wmfactory_name method on this model.
Inherited from Model
| ``__init__`(self, *args, **kwargs)`
| ``__getstate__`(self)`
| ``addSubview`(self, name, subview)`
| ``addView`(self, view)` Add a view for the model to keep track of.
| ``dataWillChange`(self)`
| ``getData`(self, request)`
| ``initialize`(self, *args, **kwargs)` Hook for subclasses to initialize themselves without having to mess with the __init__ chain.
| ``invalidateCache`(self)` Invalidate the cache for this object, so the next time getData is called, it's getter method is called again.
| ``lookupSubmodel`(self, request, submodelName)` Look up a full submodel name.
| ``notify`(self, changed)` Notify all views that something was changed on me.
| ``removeView`(self, view)` Remove a view that the model no longer should keep track of.
| ``setData`(self, request, data)`
| ``setGetter`(self, getter)`
| ``setSetter`(self, setter)`
| ``setSubmodel`(self, request, name, value)` Set a submodel on this model.

Class Variable Summary
Inherited from Model
`list` | `allowed_names` = `[]`
`list` | `protected_names` = `['initialize', 'addView', 'addSubview'...`

Method Details

### getSubmodel(self, request=None, name=None) Get the submodel `name' of this model. If I ever return a Deferred, then I ought to check for cached values (created by `setSubmodel`) before doing a regular Deferred lookup. Overrides: `twisted.web.woven.model.Model.getSubmodel` (inherited documentation)

### submodelCheck(self, request, name) Allow any submodel for which I have a submodel. Overrides: `twisted.web.woven.model.Model.submodelCheck`

### submodelFactory(self, request, name) Call a wmfactory_name method on this model. Overrides: `twisted.web.woven.model.Model.submodelFactory`

Generated by Epydoc 2.0 on Sat Oct 25 00:55:04 2003 | http://epydoc.sf.net