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

def zope-cmfplone-2.0.4::NavigationTool::NavigationTool::getNextPageFor (   self,
  context,
  script,
  status,
  kwargs 
)

Given a object, action_id and status we can fetch the next
    action for this object 

Definition at line 475 of file NavigationTool.py.

00475                                                                :
        """ Given a object, action_id and status we can fetch the next
            action for this object """

        log_deprecated('NavigationTool.getNextPageFor() has'\
                       'been marked for deprecation')
        (transition_type, redirect, action_id) = (
            self.getNavigationTransition(context, script, status))

        # If any query parameters have been specified in the transition,
        # stick them into the request before calling getActionById()
        queryIndex = action_id.find('?')
        if queryIndex > -1:
            query = parse_qs(action_id[queryIndex+1:])
            for key in query.keys():
                if len(query[key]) == 1:
                    self.REQUEST[key] = query[key][0]
                else:
                    self.REQUEST[key] = query[key]
            action_id = action_id[0:queryIndex]

        # destination in the navigation properties that are enclosed in "
        # are meant to be literal pagetemplate id that are valid
        next_action=''
        if action_id.find('"')==-1:
            next_action=context.getTypeInfo().getActionById(action_id)
        else:
            next_action=action_id[1:len(action_id)-1]
        if next_action is not None:
            return context.restrictedTraverse(next_action)
        raise KeyError, 'Could not find the transition, ' + navTransition

    # DEPRECATED -- FOR BACKWARDS COMPATIBILITY WITH PLONE 1.0 ALPHA 2 ONLY
    # USE GETNEXT() INSTEAD AND UPDATE THE NAVIGATION PROPERTIES FILE
    security.declarePublic('getNextRequestFor')
    def getNextRequestFor(self, context, script, status, **kwargs):


Generated by  Doxygen 1.6.0   Back to index