Logo Search packages:      
Sourcecode: zope-cmfplone version File versions

def zope-cmfplone-2.0.4::NavigationTool::NavigationTool::getNextObject (   self,
  context,
  script,
  status,
  trace = [],
  kwargs 
)

Get the object that will perform the next action specified
by portal_properties.navigation_properties.  Returns an object
that can be placed on the traversal stack so that it will get
called during publishing.

context - the current context

script - the script/template currently being called

status - 'success' or 'failure' strings used in calculating destination

kwargs - additional keyword arguments are passed to subsequent
pages either in the REQUEST or as GET parameters if a
redirection needs to be done

trace - navigation trace for internal use

Definition at line 72 of file NavigationTool.py.

00072                                                                         :

        """ Get the object that will perform the next action specified
        by portal_properties.navigation_properties.  Returns an object
        that can be placed on the traversal stack so that it will get
        called during publishing.

        context - the current context

        script - the script/template currently being called

        status - 'success' or 'failure' strings used in calculating destination

        kwargs - additional keyword arguments are passed to subsequent
        pages either in the REQUEST or as GET parameters if a
        redirection needs to be done

        trace - navigation trace for internal use
        """
        try:
            trace.append(('Looking up transition for %s.%s.%s'
                          ) % (context, script, status))
            (transition_type, redirect, transition) = (
                self.getNavigationTransition(context, script,
                                             status))
            trace.append(('Found transition: %s, %s'
                          ) % (transition_type, transition))
            self.log(trace,'getNextObject')
            self.log("%s.%s.%s(%s) -> %s:%s" % (context, script, status,
                                                str(kwargs), transition_type,
                                                transition), 'getNextObject')

            if transition_type == 'action':
                return self._getAction(context, transition, redirect,
                                       trace, **kwargs)
            elif transition_type == 'url':
                return self._getUrl(context, transition, redirect,
                                    trace, **kwargs)
            elif transition_type == 'script':
                return self._getScript(context, transition, redirect,
                                       trace, **kwargs)
            else:
                raise KeyError('Unknown transition type %s' % transition_type)
        except ConflictError:
            raise
        except:
            self.logTrace(trace)
            raise


    def addTransitionFor(self, content, script, status, destination):


Generated by  Doxygen 1.6.0   Back to index