# HG changeset patch # User paulb # Date 1121546147 0 # Node ID 155c22486811e3a3f1e797fe9bdffd1993ac0f6f # Parent 89febc48a5e324202e4fb8fa1b213ff9dd4716d8 [project @ 2005-07-16 20:35:47 by paulb] Changed the identification of in-page resources (so that the application can reside within the demo application). diff -r 89febc48a5e3 -r 155c22486811 examples/Common/Configurator/__init__.py --- a/examples/Common/Configurator/__init__.py Sat Jul 16 20:35:26 2005 +0000 +++ b/examples/Common/Configurator/__init__.py Sat Jul 16 20:35:47 2005 +0000 @@ -25,9 +25,9 @@ "configuration" : ("config_template.xhtml", "config_output.xsl") } in_page_resources = { - "/cpu" : ("config_output_cpu.xsl", "cpu-node"), - "/memory" : ("config_output_memory.xsl", "memory-node"), - "/hard-disks" : ("config_output_harddisks.xsl", "hard-disks-node") + "cpu" : ("config_output_cpu.xsl", "cpu-node"), + "memory" : ("config_output_memory.xsl", "memory-node"), + "hard-disks" : ("config_output_harddisks.xsl", "hard-disks-node") } def respond_to_form(self, trans, form): @@ -37,7 +37,7 @@ 'form' information. """ - path_info = trans.get_path_info() + in_page_resource = self.get_in_page_resource(trans) parameters = form.get_parameters() documents = form.get_documents() selectors = form.get_selectors() @@ -88,8 +88,8 @@ # Ensure that an output stylesheet exists. - if path_info in self.in_page_resources.keys(): - trans_xsl = self.prepare_fragment("configuration", path_info) + if in_page_resource in self.in_page_resources.keys(): + trans_xsl = self.prepare_fragment("configuration", in_page_resource) element_path = parameters.get("element-path", [""])[0] stylesheet_parameters["element-path"] = element_path else: