Home | Trees | Index | Help |
|
---|
Package aquarium :: Package screen :: Module Controller :: Class Controller |
|
AquariumClass
--+
|
Controller
wizard_review
This is a mostly empty superclass for controllers.
Method Summary | |
---|---|
Save a reference to self in ctx. | |
Clear out all form parameters that would execute an action. | |
Call a method of the form doFooAction. | |
Get the name of the action executeAction would call or None. | |
Returns a bookmarkable URL for the current screen. | |
Get the name of this screen. | |
Inherited from AquariumClass | |
Set a reference to ctx. |
Method Details |
---|
__call__(self,
callNext,
*args,
**kargs)
|
clearAction(self)Clear out all form parameters that would execute an action. |
executeAction(self)Call a method of the form doFooAction. If there is a form variable named action containing something like Foo, e.g.: http://bar?action=Foo or if there is a form variable named something like action:Foo (this syntax was stolen from Zope), e.g.: <input type="submit" name="action:Foo" value="Submit" /> this method will call the doFooAction method. Since controllers must often do double duty (they change state as well as prepare for the view), this method makes it possible to put all the state changing code in methods of the form doFooAction, leaving the main __call__ method mostly free to handle the preparation for the view. The __call__ method should call self.executeAction() when it is ready for the action to be called. Having the subclass call executeAction rather than letting the superclass do it permits the subclass to do initialization in __call__ before the action method is called. I'll call clearAction right before executing the action. Otherwise, if the action forwards to another controller, the new controller may try to execute its own doFooAction, which probably isn't what you want. |
getAction(self)Get the name of the action executeAction would call or None. This is not the method name. |
getBookmark(self, vars=None, stripAction=True)Returns a bookmarkable URL for the current screen. Builds a URL that can be used to return to this location in the site. Tries to save everything in the querystring, however, by default it will strip any actions that could be picked up by executeAction. You may override this method in your own controller if you need to change the default for stripAction or if you need to do something fancy to create the bookmark URL. This method should not assume that self.screen is still set to this controller.
|
getName(self)Get the name of this screen. |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Mon Jan 1 16:34:19 2007 | http://epydoc.sf.net |