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
on 2008/07/05 01:10
Change comment:
There is no comment for this version
To version 22.1
edited by Andrew Lindesay
on 2008/07/05 01:37
on 2008/07/05 01:37
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,19 +1,95 @@ 1 - h1WOContext1 += 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 - h2Example URLs5 +== 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 +{{code}} 10 +completeURLWithRequestHandlerKey( 11 + WOApplication.application().directActionRequestHandlerKey(), 12 + "default", 13 + "a=b", 14 + context().request().isSecure(), 15 + 0); 10 10 11 - This is thecase where the application is beingdeveloped in, for example, Eclipse;17 +{{/code}} 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 19 +|=Session|=Deployment|=Secure|=Generated URL 20 +|Y|Dev|N|##http:~/~/hebe.local:54791/cgi-bin/WebObjects/TestUrlCreation.woa/wa/default?a=b## 21 +|N|Dev|N|##http:~/~/hebe.local:54791/cgi-bin/WebObjects/TestUrlCreation.woa/wa/default?a=b## 22 + 23 +{{code}} 24 +completeURLWithRequestHandlerKey( 25 + "123", 26 + WOApplication.application().directActionRequestHandlerKey(), 27 + "default", 28 + "a=b", 29 + context().request().isSecure(), 30 + 0); 31 + 32 +{{/code}} 33 + 34 +|=Session|=Deployment|=Secure|=Generated URL 35 +|Y|Dev|N|##http:~/~/hebe.local:54791/cgi-bin/WebObjects/TestUrlCreation.woa/123/wa/default?a=b## 36 +|N|Dev|N|##http:~/~/hebe.local:54791/cgi-bin/WebObjects/TestUrlCreation.woa/123/wa/default?a=b## 37 + 38 +{{code}} 39 +context().componentActionURL() 40 +{{/code}} 41 + 42 +|=Session|=Deployment|=Secure|=Generated URL 43 +|Y|Dev|N|##/cgi-bin/WebObjects/TestUrlCreation.woa/wo/V4N99Ub2Zjavh6V3tvcEQM/0.15## 44 +|N|Dev|N|##/cgi-bin/WebObjects/TestUrlCreation.woa/wo/zBXy58rwSW6aU1mTXVk9uw/0.11## 45 + 46 +{{code}} 47 +componentActionURL(WOApplication.application().ajaxRequestHandlerKey()) 48 +{{/code}} 49 + 50 +|=Session|=Deployment|=Secure|=Generated URL 51 +|Y|Dev|N|##/cgi-bin/WebObjects/TestUrlCreation.woa/ja/V4N99Ub2Zjavh6V3tvcEQM/0.11## 52 +|N|Dev|N|##/cgi-bin/WebObjects/TestUrlCreation.woa/ja/zBXy58rwSW6aU1mTXVk9uw/0.13## 53 + 54 +{{code}} 55 +componentActionURL( 56 + WOApplication.application().ajaxRequestHandlerKey(), 57 + context().request().isSecure()) 58 +{{/code}} 59 + 60 +|=Session|=Deployment|=Secure|=Generated URL 61 +|Y|Dev|N|##/cgi-bin/WebObjects/TestUrlCreation.woa/ja/V4N99Ub2Zjavh6V3tvcEQM/0.13## 62 +|N|Dev|N|##/cgi-bin/WebObjects/TestUrlCreation.woa/ja/zBXy58rwSW6aU1mTXVk9uw/0.15## 63 + 64 +{{code}} 65 +directActionURLForActionNamed( 66 + "default", 67 + new NSDictionary<String,Object>(new Object[] {"b"}, new String[] {"a"}), 68 + context().request().isSecure(), 69 + true); 70 +{{/code}} 71 + 72 +|=Session|=Deployment|=Secure|=Generated URL 73 +|Y|Dev|N|##/cgi-bin/WebObjects/TestUrlCreation.woa/wa/default?a=b&wosid=V4N99Ub2Zjavh6V3tvcEQM## 74 +|N|Dev|N|##/cgi-bin/WebObjects/TestUrlCreation.woa/wa/default?a=b## 75 + 76 +{{code}} 77 +directActionURLForActionNamed( 78 + "default", 79 + new NSDictionary<String,Object>(new Object[] {"b"}, new String[] {"a"})) 80 +{{/code}} 81 + 82 +|=Session|=Deployment|=Secure|=Generated URL 83 +|Y|Dev|N|##/cgi-bin/WebObjects/TestUrlCreation.woa/wa/default?a=b&wosid=V4N99Ub2Zjavh6V3tvcEQM## 84 +|N|Dev|N|##/cgi-bin/WebObjects/TestUrlCreation.woa/wa/default?a=b## 85 + 86 +{{code}} 87 +urlWithRequestHandlerKey( 88 + WOApplication.application().ajaxRequestHandlerKey(), 89 + "default", 90 + "a=b") 91 +{{/code}} 92 + 93 +|=Session|=Deployment|=Secure|=Generated URL 94 +|Y|Dev|N|##/cgi-bin/WebObjects/TestUrlCreation.woa/ja/default?a=b## 95 +|N|Dev|N|##/cgi-bin/WebObjects/TestUrlCreation.woa/ja/default?a=b##