Class t.w.w.w.Link(Widget):

Part of twisted.web.woven.widgets View Source View In Hierarchy

Known subclasses: twisted.web.woven.widgets.RootRelativeLink

A utility class for generating <a href='foo'>bar</a> tags.

Split Table into Classes Show Methods in One Table

Line # Kind Name Docs
906 Method setUp Override this method to set up your Widget prior to generateDOM. This

Inherited from Widget:

Line # Kind Name Docs
79 Method __init__
111 Method initialize Use this method instead of __init__ to initialize your Widget, so you
118 Method setSubmodel I use the submodel to know which attribute in self.model I am responsible for
124 Method getData I have a model; however since I am a widget I am only responsible
135 Method setData If the return value of getData is a Deferred, I am called
142 Method add Add `item' to the children of the resultant DOM Node of this widget.
150 Method appendChild Add `item' to the children of the resultant DOM Node of this widget.
158 Method insert Insert `item' at `index' in the children list of the resultant DOM Node
167 Method setNode Set a node for this widget to use instead of creating one programatically.
178 Method cleanNode Do your part, prevent infinite recursion!
191 Method generate Allow a view to be used like a widget. Will look up the template
211 Method setDataCallback Undocumented
256 Method generateDOM
309 Method modelChanged Rerender this view, because our model has changed.
330 Method __setitem__ Convenience syntax for adding attributes to the resultant DOM Node of
340 Method __getitem__ Convenience syntax for getting an attribute from the resultant DOM Node
349 Method setError Convenience method for allowing a Controller to report an error to the
363 Method getTopModel Get a reference to this page's top model object.
371 Method getAllPatterns Get all nodes below this one which have a matching pattern attribute.
406 Method getPattern Get a named slot from the incoming template node. Returns a copy
434 Method addUpdateMethod Add a method to this widget that will be called when the widget
442 Method addEventHandler Add an event handler to this widget. eventName is a string
456 Method onEvent Dispatch a client-side event to an event handler that was
106 Method _reset Undocumented
199 Method _regenerate Undocumented

Inherited from View (via Widget):

Line # Kind Name Docs
85 Method getChild Undocumented
88 Method getChildWithDefault Return a child with the given name for the given request.
129 Method setupAllStacks Undocumented
137 Method setupViewStack Undocumented
147 Method importViewLibrary Import the given object or module into this View's view namespace
151 Method render Render a request. This is called on the leaf resource for
173 Method getTemplate Override this if you want to have your subclass look up its template
180 Method lookupTemplate Use acquisition to look up the template named by self.templateFile,
211 Method handleDocument Handle the root node, and send the page if there are no
236 Method handleOutstanding Undocumented
257 Method recurseChildren If this node has children, handle them.
264 Method dispatchResult Check a given result from handling a node and look up a NodeMutator
303 Method setController Set the controller that this view is related to.
315 Method getNodeModel Get the model object associated with this node. If this node has a
355 Method getNodeController Get a controller object to handle this node. If the node has no
397 Method getSubview Get a sub-view from me.
430 Method getNodeView Undocumented
476 Method handleNode Undocumented
562 Method handleControllerResults Handle a deferred from a controller.
582 Method handleNewNode Undocumented
589 Method sendPage Check to see if handlers recorded any errors before sending the page
595 Method setSubviewFactory Set the callable "factory", which takes a model and should
604 Method unlinkViews Undocumented
611 Method dispatchResultCallback Deal with a callback from a deferred, checking to see if it is
622 Method renderFailure Undocumented
Line # Kind Name Docs
340 Method __getitem__ Convenience syntax for getting an attribute from the resultant DOM Node
79 Method __init__
330 Method __setitem__ Convenience syntax for adding attributes to the resultant DOM Node of
142 Method add Add `item' to the children of the resultant DOM Node of this widget.
442 Method addEventHandler Add an event handler to this widget. eventName is a string
434 Method addUpdateMethod Add a method to this widget that will be called when the widget
150 Method appendChild Add `item' to the children of the resultant DOM Node of this widget.
178 Method cleanNode Do your part, prevent infinite recursion!
264 Method dispatchResult Check a given result from handling a node and look up a NodeMutator
611 Method dispatchResultCallback Deal with a callback from a deferred, checking to see if it is
191 Method generate Allow a view to be used like a widget. Will look up the template
256 Method generateDOM
371 Method getAllPatterns Get all nodes below this one which have a matching pattern attribute.
85 Method getChild Undocumented
88 Method getChildWithDefault Return a child with the given name for the given request.
124 Method getData I have a model; however since I am a widget I am only responsible
355 Method getNodeController Get a controller object to handle this node. If the node has no
315 Method getNodeModel Get the model object associated with this node. If this node has a
430 Method getNodeView Undocumented
406 Method getPattern Get a named slot from the incoming template node. Returns a copy
397 Method getSubview Get a sub-view from me.
173 Method getTemplate Override this if you want to have your subclass look up its template
363 Method getTopModel Get a reference to this page's top model object.
562 Method handleControllerResults Handle a deferred from a controller.
211 Method handleDocument Handle the root node, and send the page if there are no
582 Method handleNewNode Undocumented
476 Method handleNode Undocumented
236 Method handleOutstanding Undocumented
147 Method importViewLibrary Import the given object or module into this View's view namespace
111 Method initialize Use this method instead of __init__ to initialize your Widget, so you
158 Method insert Insert `item' at `index' in the children list of the resultant DOM Node
180 Method lookupTemplate Use acquisition to look up the template named by self.templateFile,
309 Method modelChanged Rerender this view, because our model has changed.
456 Method onEvent Dispatch a client-side event to an event handler that was
257 Method recurseChildren If this node has children, handle them.
151 Method render Render a request. This is called on the leaf resource for
622 Method renderFailure Undocumented
589 Method sendPage Check to see if handlers recorded any errors before sending the page
303 Method setController Set the controller that this view is related to.
135 Method setData If the return value of getData is a Deferred, I am called
211 Method setDataCallback Undocumented
349 Method setError Convenience method for allowing a Controller to report an error to the
167 Method setNode Set a node for this widget to use instead of creating one programatically.
118 Method setSubmodel I use the submodel to know which attribute in self.model I am responsible for
595 Method setSubviewFactory Set the callable "factory", which takes a model and should
906 Method setUp Override this method to set up your Widget prior to generateDOM. This
129 Method setupAllStacks Undocumented
137 Method setupViewStack Undocumented
604 Method unlinkViews Undocumented
199 Method _regenerate Undocumented
106 Method _reset Undocumented
def setUp(self, request, node, data): (source)

Override this method to set up your Widget prior to generateDOM. This is a good place to call methods like add, insert, __setitem__ and __getitem__.

Overriding this method obsoletes overriding generateDOM directly, in most cases.
Parametersrequest (type: twisted.web.server.Request. )
nodeThe DOM node which this Widget is operating on.
dataThe Model data this Widget is meant to operate upon.
API Documentation for Twisted, generated by pydoctor at 2008-10-26 16:12:37.