Changes for page Development-UrlCreation

Last modified by Pascal Robert on 2010/09/12 00:56

From version 19.1
edited by Andrew Lindesay
on 2008/07/05 01:10
Change comment: There is no comment for this version
To version 24.1
edited by Andrew Lindesay
on 2008/07/05 01:32
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,19 +1,75 @@
1 -h1 WOContext
1 += WOContext =
2 2  
3 3  The ##WOContext## object is used to shepherd a request through the application and then back out to the user. It is also responsible for creation of URL's within the application server. So as the the response is being generated, the application will ask the context to generate URLs back into itself.
4 4  
5 -h2 Example URLs
5 +== Example URLs ==
6 6  
7 -The ##WOContext## has a number of methods on itself to generate URLs back into the application server. Here the author has tested the generation of those URLs so it can be seen what is created by each method under different usages.
7 +The ##WOContext## has a number of methods on itself to generate URLs back into the application server. Here the author has tested the generation of those URLs so it can be seen what is created by each method under different usages. These examples have been produced with WebObjects 5.4.
8 8  
9 -h3 Development Mode
9 +=== Development Mode ===
10 10  
11 11  This is the case where the application is being developed in, for example, Eclipse;
12 12  
13 -|=Method|=Result with Session|=Result with No Session
14 -|context().completeURLWithRequestHandlerKey(
15 - WOApplication.application().directActionRequestHandlerKey(),
16 - "default",
17 - "a=b",
18 - context().request().isSecure(),
19 - 0);|http:~/~/hebe.local:54791/cgi-bin/WebObjects/TestUrlCreation.woa/wa/default?a=b|http:~/~/hebe.local:54791/cgi-bin/WebObjects/TestUrlCreation.woa/wa/default?a=b
13 +{{code}}
14 +completeURLWithRequestHandlerKey(
15 + WOApplication.application().directActionRequestHandlerKey(),
16 + "default",
17 + "a=b",
18 + context().request().isSecure(),
19 + 0);
20 +
21 +{{/code}}
22 +
23 +|=Session|=Deployment|=URL
24 +|Y|Dev|##http:~/~/hebe.local:54791/cgi-bin/WebObjects/TestUrlCreation.woa/wa/default?a=b##
25 +|N|Dev|##http:~/~/hebe.local:54791/cgi-bin/WebObjects/TestUrlCreation.woa/wa/default?a=b##
26 +
27 +{{code}}
28 +completeURLWithRequestHandlerKey(
29 + "123",
30 + WOApplication.application().directActionRequestHandlerKey(),
31 + "default",
32 + "a=b",
33 + context().request().isSecure(),
34 + 0);
35 +
36 +{{/code}}
37 +
38 +|=Session|=Deployment|=URL
39 +|Y|Dev|##http:~/~/hebe.local:54791/cgi-bin/WebObjects/TestUrlCreation.woa/123/wa/default?a=b##
40 +|N|Dev|##http:~/~/hebe.local:54791/cgi-bin/WebObjects/TestUrlCreation.woa/123/wa/default?a=b##
41 +
42 +|Method|context().componentActionURL()
43 +|Session|##/cgi-bin/WebObjects/TestUrlCreation.woa/wo/V4N99Ub2Zjavh6V3tvcEQM/0.15##
44 +|No Session|##/cgi-bin/WebObjects/TestUrlCreation.woa/wo/zBXy58rwSW6aU1mTXVk9uw/0.11##
45 +
46 +|Method|componentActionURL(WOApplication.application().ajaxRequestHandlerKey())
47 +|Session|##/cgi-bin/WebObjects/TestUrlCreation.woa/ja/V4N99Ub2Zjavh6V3tvcEQM/0.11##
48 +|No Session|##/cgi-bin/WebObjects/TestUrlCreation.woa/ja/zBXy58rwSW6aU1mTXVk9uw/0.13##
49 +
50 +|Method|componentActionURL(
51 + WOApplication.application().ajaxRequestHandlerKey(),
52 + context().request().isSecure())
53 +|Session|##/cgi-bin/WebObjects/TestUrlCreation.woa/ja/V4N99Ub2Zjavh6V3tvcEQM/0.13##
54 +|No Session|##/cgi-bin/WebObjects/TestUrlCreation.woa/ja/zBXy58rwSW6aU1mTXVk9uw/0.15##
55 +
56 +|Method|directActionURLForActionNamed(
57 + "default",
58 + new NSDictionary<String,Object>(new Object[[]] {"b"}, new String[[]] {"a"}),
59 + context().request().isSecure(),
60 + true);
61 +|Session|##/cgi-bin/WebObjects/TestUrlCreation.woa/wa/default?a=b&amp;wosid=V4N99Ub2Zjavh6V3tvcEQM##
62 +|No Session|##/cgi-bin/WebObjects/TestUrlCreation.woa/wa/default?a=b##
63 +
64 +|Method|directActionURLForActionNamed(
65 + "default",
66 + new NSDictionary<String,Object>(new Object[[]] {"b"}, new String[[]] {"a"}))
67 +|Session|##/cgi-bin/WebObjects/TestUrlCreation.woa/wa/default?a=b&wosid=V4N99Ub2Zjavh6V3tvcEQM##
68 +|No Session|##/cgi-bin/WebObjects/TestUrlCreation.woa/wa/default?a=b##
69 +
70 +|Method|urlWithRequestHandlerKey(
71 + WOApplication.application().ajaxRequestHandlerKey(),
72 + "default",
73 + "a=b")
74 +|Session|##/cgi-bin/WebObjects/TestUrlCreation.woa/ja/default?a=b##
75 +|No Session|##/cgi-bin/WebObjects/TestUrlCreation.woa/ja/default?a=b##