Home | Trees | Index | Help |
|
---|
Package twisted :: Package web :: Package woven :: Module controller :: Class Controller |
|
Collection
--+ |Constrained
--+ |ConfigCollection
--+ |Resource
--+ | Controller
DOMController
,
InputHandler
,
LiveController
,
Page
A 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 Summary | |
---|---|
__init__(self,
m,
inputhandlers,
view,
controllers,
templateDirectory)
| |
aggregateInvalid(self,
request,
input,
data)
| |
aggregateValid(self,
request,
input,
data)
| |
domChanged(self,
request,
widget,
node)
| |
We are done handling the node to which this controller was attached. | |
gatheredControllers(self,
v,
d,
request)
| |
Look for a factory method to create the object to handle the next segment of the URL. | |
This method is called when getChild cannot find a matching wchild_* method in the Controller. | |
getSubcontroller(self,
request,
node,
model,
controllerName)
| |
By default, we don't do anything | |
importControllerLibrary(self,
namespace)
| |
makeView(self,
model,
templateFile,
parentCount)
| |
Override this to recieve notification when the view rendering process is complete. | |
process(self,
request,
**kwargs)
| |
Trigger any inputhandlers that were passed in to this Page, then delegate to the View for traversing the DOM. | |
renderView(self,
request)
| |
setNode(self,
node)
| |
setSubcontrollerFactory(self,
name,
factory,
setup)
| |
setSubmodel(self,
submodel)
| |
| |
setupControllerStack(self)
| |
setView(self,
view)
| |
By default, we return ourself as the index. | |
Inherited from Resource | |
Remove a static reference for 'name'. | |
(internal) Get a child of mine dependant on a particular request. | |
Retrieve a static or dynamically generated child resource from me. | |
Subclass this to generate an entity on demand. | |
Get an entity that was added to me using putEntity. | |
A list of all name, entity that I can generate on demand. | |
Retrieve a list of the names of entities that I store references to. | |
| |
| |
Retrieve a list of all name, entity pairs that I store references to. | |
Retrieve a list of the names of entities that I store references to. | |
Register a static child. | |
| |
Inherited from ConfigCollection | |
A method that determines whether an entity may be added to me. | |
| |
| |
Inherited from Constrained | |
A method that determines whether an entity may be added to me with a given name. | |
Store an entity if it meets both constraints. | |
Inherited from Collection | |
Retrieve an entity from me. | |
Remove an entity for 'name', based on the content of 'request'. | |
Store an entity for 'name', based on the content of 'request'. |
Class Variable Summary | |
---|---|
tuple |
__implements__ = (<class twisted.web.woven.interfaces.IC...
|
int |
addSlash = 1 |
list |
controllerLibraries = []
|
int |
setupStacks = 1 |
str |
templateDirectory = ''
|
NoneType |
viewFactory = None |
Inherited from Resource | |
int |
isLeaf = 0 |
NoneType |
server = None |
Method Details |
---|
exit(self, request)We are done handling the node to which this controller was attached. |
getChild(self, name, request)Look for a factory method to create the object to handle the next segment of the URL. If a wchild_* method is found, it will be called to produce the Resource object to handle the next segment of the path. If a wchild_* method is not found, getDynamicChild will be called with the name and request.
|
getDynamicChild(self, name, request)This method is called when getChild cannot find a matching wchild_* method in the Controller. Override me if you wish to have dynamic handling of child pages. Should return a Resource if appropriate. Return None to indicate no resource found.
|
handle(self, request)By default, we don't do anything |
pageRenderComplete(self, request)Override this to recieve notification when the view rendering process is complete. |
render(self, request)Trigger any inputhandlers that were passed in to this Page, then delegate to the View for traversing the DOM. Finally, call gatheredControllers to deal with any InputHandlers that were constructed from any controller= tags in the DOM. gatheredControllers will render the page to the browser when it is done.
|
setUp(self, request, *args)
|
wchild_index(self, request)By default, we return ourself as the index. Override this to provide different behavior for a URL that ends in a slash. |
Class Variable Details |
---|
__implements__
|
addSlash
|
controllerLibraries
|
setupStacks
|
templateDirectory
|
viewFactory
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.0 on Sat Sep 13 04:21:20 2003 | http://epydoc.sf.net |