Back to index

plone3  3.1.7
Public Member Functions
plone.app.contentrules.browser.formhelper.NullAddForm Class Reference
Inheritance diagram for plone.app.contentrules.browser.formhelper.NullAddForm:
Inheritance graph
[legend]
Collaboration diagram for plone.app.contentrules.browser.formhelper.NullAddForm:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __call__
def nextURL
def create

Detailed Description

An add view that will add its content immediately, without presenting
a form.

You should subclass this for rule elements that do not require any 
configuration before being added, and write a create() method that takes no 
parameters and returns the appropriate assignment instance.

Definition at line 64 of file formhelper.py.


Member Function Documentation

Definition at line 73 of file formhelper.py.

00073 
00074     def __call__(self):
00075         ob = self.create()
00076         zope.event.notify(zope.lifecycleevent.ObjectCreatedEvent(ob))
00077         self.context.add(ob)
00078         nextURL = self.nextURL()
00079         if nextURL:
00080             self.request.response.redirect(self.nextURL())
00081         return ''
    

Here is the call graph for this function:

Here is the caller graph for this function:

Reimplemented in plone.app.contentrules.actions.delete.DeleteAddForm.

Definition at line 88 of file formhelper.py.

00088 
00089     def create(self):
00090         raise NotImplementedError("concrete classes must implement create()")
00091     

Here is the caller graph for this function:

Definition at line 82 of file formhelper.py.

00082 
00083     def nextURL(self):
00084         rule = aq_parent(aq_inner(self.context))
00085         context = aq_parent(aq_inner(rule))
00086         url = str(getMultiAdapter((context, self.request), name=u"absolute_url"))
00087         return '%s/++rule++%s/@@manage-elements' % (url, rule.__name__)
    

Here is the call graph for this function:

Here is the caller graph for this function:


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