def get_produced_member(self): full_name = self.package_name + "." + self.member_name for cls in Item.schema_tree(): if cls.full_name == full_name: return cls
def __call__(self, *args, **kwargs): rel = cherrypy.request.params.get("ItemSelector-select") # Open the item selector if rel: # Load persistent collection parameters before redirecting self.user_collection pos = rel.find("-") root_content_type_name = rel[:pos] selection_parameter = str(rel[pos + 1:]) for content_type in Item.schema_tree(): if content_type.full_name == root_content_type_name: edit_stacks_manager = self.context["edit_stacks_manager"] edit_stack = edit_stacks_manager.current_edit_stack if edit_stack is None: edit_stack = edit_stacks_manager.create_edit_stack() edit_stacks_manager.current_edit_stack = edit_stack node = SelectionNode() node.content_type = content_type node.selection_parameter = selection_parameter edit_stack.push(node) raise cherrypy.HTTPRedirect(node.uri( selection = self.params.read( schema.String(selection_parameter) ), client_side_scripting = self.client_side_scripting )) return BaseBackOfficeController.__call__(self, *args, **kwargs)