| Home | Trees | Index | Help |
|
|---|
| Package twisted :: Package web :: Package woven :: Module input :: Class DictAggregator |
|
Resource--+ |Controller--+ |InputHandler--+ |SingleValue--+ |Anything--+ | DictAggregator
An InputHandler for a <form> tag, for triggering a function when all of the form's individual inputs have been validated. Also for use gathering a dict of arguments to pass to a parent's aggregateValid if no commit function is passed.
Usage example:
<form controller="theForm" action="">
<input controller="Integer"
view="InputText" model="anInteger" />
<input controller="Anything"
view="InputText" model="aString" />
<input type="submit" />
</form>
def theCommitFunction(anInteger=None, aString=None):
'''Note how the keyword arguments match up with the leaf model
names above
'''
print "Yay", anInteger, aString
class CMyController(controller.Controller):
def wcfactory_theForm(self, request, node, m):
return input.FormAggregator(m, commit=theCommitFunction)
| Method Summary | |
|---|---|
By default we just pass this method call all the way up to the root Controller. | |
Aggregate valid input from inputhandlers below us, into a dictionary. | |
This is the node complete message | |
| Inherited from Anything | |
Check whether the input in the request is valid for this handler and return a boolean indicating validity. | |
| Inherited from SingleValue | |
Return the data associated with this handler from the request, if any. | |
| Inherited from InputHandler | |
| |
It has been determined that the input for the entire form is completely valid; it is now safe for all handlers to commit changes to the model. | |
| |
By default, we don't do anything | |
Once it has been determined that the input is invalid, we should tell our view to report this fact to the user. | |
It has been determined that the input for this handler is valid; however, that does not mean the entire form is valid. | |
| |
| |
| Inherited from Controller | |
| |
| |
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. | |
| |
| |
| |
Override this to recieve notification when the view rendering process is complete. | |
| |
Trigger any inputhandlers that were passed in to this Page, then delegate to the View for traversing the DOM. | |
| |
| |
| |
| |
| |
| |
By default, we return ourself as the index. | |
| Inherited from Resource | |
| |
| |
Retrieve a static or dynamically generated child resource from me. | |
| |
| |
| |
| |
| |
| |
| |
| |
Register a static child. | |
| |
Default handling of HEAD method. | |
| Class Variable Summary | |
|---|---|
| Inherited from InputHandler | |
str |
invalidErrorText = 'Error!'
|
int |
setupStacks = 0 |
| Inherited from Controller | |
tuple |
__implements__ = (<class twisted.web.woven.interfaces.IC...
|
int |
addSlash = 1 |
list |
controllerLibraries = []
|
str |
templateDirectory = ''
|
NoneType |
viewFactory = None |
| Inherited from Resource | |
int |
isLeaf = 0 |
NoneType |
server = None |
| Method Details |
|---|
aggregateInvalid(self, request, inputhandler, data)By default we just pass this method call all the way up to the root Controller.
|
aggregateValid(self, request, inputhandler, data)Aggregate valid input from inputhandlers below us, into a dictionary. |
exit(self, request)This is the node complete message
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.0 on Sat May 15 20:07:37 2004 | http://epydoc.sf.net |