1.1 --- a/docs/in-page-updates.html Fri Jul 22 20:32:51 2005 +0000
1.2 +++ b/docs/in-page-updates.html Fri Jul 22 20:39:10 2005 +0000
1.3 @@ -129,7 +129,7 @@
1.4 responsible for displaying the type values:</p>
1.5 <pre> <p><br /> Item type:<br /> <select template:element="type" name="{template:list-attribute('type-enum', 'value')}" multiple="multiple"<br /> <span
1.6 style="font-weight: bold;">onchange="requestUpdate(</span><br
1.7 - style="font-weight: bold;" /><span style="font-weight: bold;"> '{$application-url}comments',</span><br
1.8 + style="font-weight: bold;" /><span style="font-weight: bold;"> 'comments',</span><br
1.9 style="font-weight: bold;" /><span style="font-weight: bold;"> '{template:list-attribute('type-enum', 'value')}',</span><br
1.10 style="font-weight: bold;" /><span style="font-weight: bold;"> '{template:other-elements(../options)}',</span><br
1.11 style="font-weight: bold;" /><span style="font-weight: bold;"> '{template:child-attribute('value', template:child-element('comment', 1, template:other-elements(../options)))}',</span><br
1.12 @@ -138,11 +138,10 @@
1.13 function which triggers the in-page update, and it specifies the
1.14 following things:</p>
1.15 <dl>
1.16 - <dt><span style="font-weight: bold;">'{$application-url}comments'</span></dt>
1.17 + <dt><span style="font-weight: bold;">'comments'</span></dt>
1.18 <dd>The URL which will serve the in-page update requested by this
1.19 -field. We use a special variable called <code>application-url</code>
1.20 -which will need to be provided to the template when generating the Web
1.21 -page. This will produce something like the following:<br />
1.22 +field. Since the value stated is a relative reference to a resource, it
1.23 +will produce something like the following:<br />
1.24 <pre>http://localhost:8080/comments</pre>
1.25 So the request for an in-page update will be sent to this
1.26 generated URL.</dd>
1.27 @@ -241,20 +240,9 @@
1.28 parameter directly from the request parameters; this parameter is added
1.29 to a collection of parameters that will be used to control the
1.30 stylesheet when making the final Web page output.</p>
1.31 -<p>Another parameter that will be used in stylesheet processing is
1.32 -the <code>application-url</code> parameter mentioned above. We
1.33 -obtain the address and port of the Web server environment and add the
1.34 -result as a simple URL to the <code>application-url</code>
1.35 -stylesheet parameter. Finally, we send the output to the user but
1.36 -employing the additional stylesheet parameters to configure the result:</p>
1.37 -<pre><span style="font-weight: bold;"> # Add information essential for in-page requests.</span><br
1.38 - style="font-weight: bold;" /><br style="font-weight: bold;" /><span
1.39 - style="font-weight: bold;"> if trans.get_server_port() == "80":</span><br
1.40 - style="font-weight: bold;" /><span style="font-weight: bold;"> stylesheet_parameters["application-url"] = \</span><br
1.41 - style="font-weight: bold;" /><span style="font-weight: bold;"> "http://%s%s" % (trans.get_server_name(), trans.get_path_without_query())</span><br
1.42 - style="font-weight: bold;" /><span style="font-weight: bold;"> else:</span><br
1.43 - style="font-weight: bold;" /><span style="font-weight: bold;"> stylesheet_parameters["application-url"] = \</span><br
1.44 - style="font-weight: bold;" /><span style="font-weight: bold;"> "http://%s:%s%s" % (trans.get_server_name(), trans.get_server_port(), trans.get_path_without_query())</span><br /><br /> # Complete the response.<br /><br /> self.send_output(trans, [trans_xsl], structure<span
1.45 +<p>Finally, we send the output to the user but employing the additional
1.46 +stylesheet parameters to configure the result:</p>
1.47 +<pre><span style="font-weight: bold;" /> # Complete the response.<br /><br /> self.send_output(trans, [trans_xsl], structure<span
1.48 style="font-weight: bold;">, stylesheet_parameters</span>)</pre>
1.49 <p>In order to introduce the infrastructure mentioned above which
1.50 separates requests for Web pages from requests for JavaScript files, we