Table of Contents

Class: InputHandler Twisted-0.19.0/twisted/web/domhandlers.py

A handler is like a controller, but it operates on something contained inside of self.model instead of directly on self.model. For example, a Handler whose id has been set to "foo" will handle self.model.foo

The handler's job is to interpret the request and:

1) Check for valid input 2) If the input is valid, update the model 3) Use any special API of the view widget to change the view (other than what the view updates automatically from the model) e.g. in the case of an error, tell the view to report an error to the user 4) Return a success value; by default these values are simply recorded and the page is rendered, but these values could be used to determine what page to display next, etc

Base Classes   
Controller
Methods   
check
getInput
handle
handleInvalid
handleValid
setId
setSubmodel
  check 
check (
        self,
        request,
        data,
        )

Check whether the input in the request is valid for this handler and return a boolean indicating validity.

Exceptions   
NotImplementedError
  getInput 
getInput ( self,  request )

Return the data associated with this handler from the request, if any

  handle 
handle ( self,  request )

  handleInvalid 
handleInvalid (
        self,
        request,
        data,
        )

Once it has been determined that the input is invalid, we should tell our view to report this fact to the user.

  handleValid 
handleValid (
        self,
        request,
        data,
        )

Once it has been determined that the input is valid, we should update our submodel and notify the model that it has changed.

  setId 
setId ( self,  id )

  setSubmodel 
setSubmodel ( self,  submodel )


Table of Contents

This document was automatically generated on Sun Jul 14 19:53:39 2002 by HappyDoc version 2.0