Part of twisted.web.woven.controller View Source View In Hierarchy
Known subclasses: twisted.web.woven.controller.LiveController, twisted.web.woven.input.InputHandler, twisted.web.woven.page.Page, twisted.web.woven.template.DOMController
Implements interfaces: twisted.web.woven.interfaces.IControllerA Controller which handles to events from the user. Such events are `web request', `form submit', etc.
I should be the IResource implementor for your Models (andregisterControllerForModel
makes this so).
Method | __init__ | Initialize. |
Method | setupControllerStack | Undocumented |
Method | importControllerLibrary | Import the given object or module into this Controllers's |
Method | getSubcontroller | Look for a controller named "controllerName" to handle the node |
Method | setSubcontrollerFactory | Set the callable "factory", which takes a model and should |
Method | setView | Set the view that this controller is related to. |
Method | setNode | Undocumented |
Method | setUp | |
Method | getChild | Look for a factory method to create the object to handle the |
Method | getDynamicChild | This method is called when getChild cannot find a matching wchild_* |
Method | wchild_index | By default, we return ourself as the index. |
Method | render | Trigger any inputhandlers that were passed in to this Page, |
Method | makeView | Undocumented |
Method | renderView | Undocumented |
Method | gatheredControllers | Undocumented |
Method | aggregateValid | Undocumented |
Method | aggregateInvalid | Undocumented |
Method | process | Undocumented |
Method | setSubmodel | Undocumented |
Method | handle | By default, we don't do anything |
Method | exit | We are done handling the node to which this controller was attached. |
Method | domChanged | Undocumented |
Method | pageRenderComplete | Override this to recieve notification when the view rendering |
Inherited from Resource:
Method | listStaticNames | Undocumented |
Method | listStaticEntities | Undocumented |
Method | listNames | Undocumented |
Method | listEntities | Undocumented |
Method | listDynamicNames | Undocumented |
Method | listDynamicEntities | Undocumented |
Method | getStaticEntity | Undocumented |
Method | getDynamicEntity | Undocumented |
Method | delEntity | Undocumented |
Method | reallyPutEntity | Undocumented |
Method | getChildWithDefault | Retrieve a static or dynamically generated child resource from me. |
Method | getChildForRequest | Undocumented |
Method | putChild | Register a static child. |
Method | render_HEAD | Default handling of HEAD method. |
Look for a controller named "controllerName" to handle the node "node". When a node <div controller="foo" /> is present in the template, this method will be called with controllerName set to "foo".
Return None if this Controller doesn't want to provide a Subcontroller for the given name.Set the callable "factory", which takes a model and should return an InputHandler, to be called by the default implementation of getSubview when the controllerName "name" is present in the template.
This would generally be used like this:view.setSubcontrollerFactory("foo", MyFancyInputHandlerClass)This is equivalent to:
def wcfactory_foo(self, request, node, m): return MyFancyInputHandlerClass(m)Which will cause an instance of MyFancyInputHandlerClass to be instanciated when template node <div controller="foo" /> is encountered.
Parameters | request | (type: twisted.web.server.Request
) |
Parameters | name | The name of the child being requested. (type: string ) |
request | The HTTP request being handled.
(type: twisted.web.server.Request
) |
Parameters | name | The name of the child being requested. (type: string ) |
request | The HTTP request being handled.
(type: twisted.web.server.Request
) |