Example #1
0
    def publishTraverse(self, request, name):
        stack = request['TraversalRequestNameStack']
        stack.append(name)
        node_id = find_sql_context(self.context.id, stack)
        if node_id is not None:
            self.request.survey_session = self.context
            if stack and stack[-1] != 'actionplans' and\
                    not stack[-1].startswith('@@'):
                stack.append('@@%s' % stack.pop())

            return build_tree_aq_chain(self.context, node_id)
        stack.pop()
        view = queryMultiAdapter((self.context, request), Interface, name)
        if view is not None:
            if IAcquirer.providedBy(view):
                view = view.__of__(self.context)
            return view
        else:
            raise KeyError(name)
Example #2
0
    def publishTraverse(self, request, name):
        stack = request['TraversalRequestNameStack']
        stack.append(name)
        node_id = find_sql_context(self.context.id, stack)
        if node_id is not None:
            self.request.survey_session = self.context
            if stack and stack[-1] != 'actionplans' and\
                    not stack[-1].startswith('@@'):
                stack.append('@@%s' % stack.pop())

            return build_tree_aq_chain(self.context, node_id)
        stack.pop()
        view = queryMultiAdapter((self.context, request), Interface,
                name)
        if view is not None:
            if IAcquirer.providedBy(view):
                view = view.__of__(self.context)
            return view
        else:
            raise KeyError(name)
Example #3
0
 def find_sql_context(self, *a, **kw):
     from euphorie.client.survey import find_sql_context
     return find_sql_context(*a, **kw)
Example #4
0
 def find_sql_context(self, *a, **kw):
     from euphorie.client.survey import find_sql_context
     return find_sql_context(*a, **kw)