FormKit.FormKitMixIn
index
/usr/local/share/webware/FormKit/FormKitMixIn.py

This file is a MixIn to make it easier to use FormKit with Webware. You can still use
FormKit (with or without Webware) and NOT use this file, but you will have to do certain
operations more manually.

 
Modules
       
time

 
Classes
       
FormKitMixIn

 
class FormKitMixIn
    IMPORTANT: This MixIn must be inherited first, because it overwrites methods
of WebKit. Those methods are preAction and postAction, and are essentially non-
destructive (no methods that get called stock do not get called here).
 
  Methods defined here:
addForm(self, formInstance)
adds the passed-in form instance to the list of forms self._forms,
AND sets the numeric id for that appended form instance.
clearCookie(self, key)
just a helper method to clear cookies
clearPersistent(self)
clears any fields that are persistFields()
postAction(self, actionName)
Overwrites WebKit method so that a form can be re-painted when there are input errors.
preAction(self, actionName)
Overwrites WebKit method so that a form can be processed by FormKit.
resetForms(self)
resets all forms in this servlet... needs to be called either from a servlet's .sleep()
or in .awake() before any seed() calls.
setCookie(self, key, value, days)
just a helper method to set cookies
storePersistent(self, days=30)
stores any fields marked as persistent into cookies.
Optionally pass days for the time.time
REQUIRES self.persistFields to work, but will not crash if it's not there.