# HG changeset patch # User paulb # Date 1115074237 0 # Node ID 12987c960819769a98811dd769111ff390560bf7 # Parent d522f1ccbd5f513ed3deab5d8c8fb1430347353b [project @ 2005-05-02 22:50:37 by paulb] Added the application URL as a parameter to the stylesheet - needed for JavaScript request code. diff -r d522f1ccbd5f -r 12987c960819 examples/Common/Configurator/__init__.py --- a/examples/Common/Configurator/__init__.py Mon May 02 22:49:52 2005 +0000 +++ b/examples/Common/Configurator/__init__.py Mon May 02 22:50:37 2005 +0000 @@ -111,9 +111,15 @@ template_xml = os.path.join(self.resource_dir, "config_template.xhtml") XSLForms.Prepare.make_stylesheet(template_xml, trans_xsl) + # Define the parameters. + + parameters = { + "application-url" : "http://%s:%s%s" % (trans.get_server_name(), trans.get_server_port(), trans.get_path_without_query()) + } + # Complete the response. - proc = XSLOutput.Processor([trans_xsl]) + proc = XSLOutput.Processor([trans_xsl], parameters=parameters) proc.send_output(trans.get_response_stream(), trans.get_response_stream_encoding(), configuration)