Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions
CMFDefault.formlib.form.EditFormBase Class Reference
Inheritance diagram for CMFDefault.formlib.form.EditFormBase:
Inheritance graph
[legend]
Collaboration diagram for CMFDefault.formlib.form.EditFormBase:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def handle_failure

Public Attributes

 context
 request

Static Public Attributes

tuple template = ViewPageTemplateFile('editform.pt')

Private Member Functions

def _setRedirect

Detailed Description

Definition at line 56 of file form.py.


Constructor & Destructor Documentation

def CMFDefault.formlib.form.EditFormBase.__init__ (   self,
  context,
  request 
)

Definition at line 60 of file form.py.

00060 
00061     def __init__(self, context, request):
00062         self.context = context
00063         self.request = request
00064         self.request.locale = getLocale(request)


Member Function Documentation

def CMFDefault.formlib.form.EditFormBase._setRedirect (   self,
  provider_id,
  action_path,
  keys = '' 
) [private]

Definition at line 65 of file form.py.

00065 
00066     def _setRedirect(self, provider_id, action_path, keys=''):
00067         provider = self._getTool(provider_id)
00068         try:
00069             target = provider.getActionInfo(action_path, self.context)['url']
00070         except ValueError:
00071             target = self._getPortalURL()
00072 
00073         kw = {}
00074         if self.status:
00075             message = translate(self.status, self.context)
00076             if isinstance(message, unicode):
00077                 message = message.encode(self._getBrowserCharset())
00078             kw['portal_status_message'] = message
00079         for k in keys.split(','):
00080             k = k.strip()
00081             v = self.request.form.get(k, None)
00082             if v:
00083                 kw[k] = v
00084 
00085         query = kw and ( '?%s' % make_query(kw) ) or ''
00086         self.request.RESPONSE.redirect( '%s%s' % (target, query) )
00087 
00088         return ''

Here is the call graph for this function:

Here is the caller graph for this function:

def CMFDefault.formlib.form.EditFormBase.handle_failure (   self,
  action,
  data,
  errors 
)

Definition at line 89 of file form.py.

00089 
00090     def handle_failure(self, action, data, errors):
00091         if self.status:
00092             message = translate(self.status, self.context)
00093             self.request.other['portal_status_message'] = message
00094 


Member Data Documentation

Definition at line 61 of file form.py.

Definition at line 62 of file form.py.

tuple CMFDefault.formlib.form.EditFormBase.template = ViewPageTemplateFile('editform.pt') [static]

Definition at line 58 of file form.py.


The documentation for this class was generated from the following file: