Changes for page WOActiveImage

Last modified by Pascal Robert on 2012/02/11 08:52

From version 12.1
edited by Pascal Robert
on 2011/04/27 10:38
Change comment: There is no comment for this version
To version 13.1
edited by Pascal Robert
on 2012/01/08 20:49
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -3,30 +3,42 @@
3 3  = Introduction =
4 4  
5 5  A WOActiveImage displays an image within the HTML page. If the WOActiveImage is disabled, it simply displays its image as a passive element in the page. If enabled, the image is active; that is, clicking the image generates a request.
6 +
6 6  WOActiveImages are intended to be used outside of an HTML form. WOActiveImage functions as a mapped, active image. When the user clicks in a WOActiveImage, the coordinates of the click are sent back to the server. Depending on where the user clicks, different actions are invoked. An image map file associates actions with each of the defined areas of the image. If an image map file is not specified, the method specified by the action attribute is performed when the image is clicked, or if the href attribute is specified, the image acts as a hyperlink and takes you to that destination.
8 +
7 7  Within an HTML form, a WOActiveImage functions as a graphical submit button. However, it is better to use a WOImageButton instead of WOActiveImage to create a graphic submit button or a mapped image within a form.
8 8  
11 += Generated HTML =
12 +
13 +When you use WOActiveImage, it will generate a <img> tag surrounded by a <a href> tag, like this:
14 +
15 +{{code}}
16 +<a href="/cgi-bin/WebObjects/DynamicElements.woa/wo/nSZJRma4bnNG7UdGL12KDw/3.1" name="1"><img border="0" ismap="ismap" src="/WebObjects/DynamicElements/WebServerResources/WO.jpeg" width="180" height="180"></a>
17 +{{/code}}
18 +
19 +
20 +
9 9  = Usage =
10 10  
11 11  {{code}}
12 12  
13 13  WOActiveImage {
14 - filename= imageFileName;
15 - [framework = frameworkBaseName|"app";] |
16 - src=aURL; |
17 - value=aMethod;
18 - action=aMethod |
19 - href=aURL |
20 - actionClass=aClass |
21 - directActionName=aName; |
22 - data=dataObject;
23 - mimeType=typeString;
24 - [key=cacheKey;]
25 - [imageMapFile=aString];
26 - [name=aString;]
27 - [x=aNumber; y=aNumber;]
28 - [target=frameName;]
29 - [disabled=aBoolean;]
26 + filename= imageFileName;
27 + [framework = frameworkBaseName|"app";] |
28 + src=aURL; |
29 + value=aMethod;
30 + action=aMethod |
31 + href=aURL |
32 + actionClass=aClass |
33 + directActionName=aName; |
34 + data=dataObject;
35 + mimeType=typeString;
36 + [key=cacheKey;]
37 + [imageMapFile=aString];
38 + [name=aString;]
39 + [x=aNumber; y=aNumber;]
40 + [target=frameName;]
41 + [disabled=aBoolean;]
30 30   [secure=aBoolean;]...}
31 31  
32 32  {{/code}}
... ... @@ -45,8 +45,8 @@
45 45  | mimeType | A string designating a MIME resource type, such as "image/gif", to be put in the content-type header field; this type tells the client what to do with data. If you provide data but no MIME type, an exception is thrown.
46 46  | key | A string that the application uses as a key for caching the data specified in data. If you do not provide a key, the data object must be fetched each time it is needed. For further information, see the reference documentation for the WOResourceManager class, (in particular, see the flushDataCache method).
47 47  | imageMapFile | Name of the image map file. See "The Image Map File" (page 17) for more details.
48 -| name | If name is specified then the hit point is specified as name.x=value; name.y=value; in the form. This is useful when you need to use this element to
49 -\\ submit a form to an external URL that expects the hit point to be expressed in a certain format.
60 +| name | If name is specified then the hit point is specified as name.x=value; name.y=value; in the form. This is useful when you need to use this element to
61 +\\submit a form to an external URL that expects the hit point to be expressed in a certain format.
50 50  | x, y | If specified, returns the coordinates of the user's click within the image.
51 51  | target | Frame in a frameset that will receive the page returned as a result of the user's click.
52 52  | disabled | If disabled evaluates to true, a regular image element (<IMG>) is generated rather than an active image.
... ... @@ -65,8 +65,12 @@
65 65  
66 66  == Inline bindings (WOOGNL) ==
67 67  
80 +Calling a method "doSomething" with an image named "WO.jpeg" coming from the Web server resources:
81 +
82 +
68 68  {{code}}
69 69  
85 +<wo:WOActiveImage action="~doSomething" filename="WO.jpeg" />
70 70  
71 71  {{/code}}
72 72