Luca Morandini wrote:
Sylvain Wallez wrote:
Luca Morandini wrote:
Hmm... I think this image-map widget should be a kind of action
widget, since the form is sent to the server when widget is clicked
upon.
You already have it :-)
Use an action with <styling type="image">. When the image is clicked,
the action's event listeners are triggered, and you can read the
click coordinates using the {action-name}.x and {action-name}.y
request parameters.
Well, but I should be able to change the image's src attribute
dynamically, wich is not allowed in action widget... right ?
Yes you can, as the image src is in the form template. Of course you
have to use a dynamic template (e.g. JXTG):
<ft:action id="map">
<fi:styling type="image" src="images/${image_name}.jpg"/>
</ft:action>
Sylvain
--
Sylvain Wallez Anyware Technologies
http://apache.org/~sylvain http://anyware-tech.com
Apache Software Foundation Member Research & Technology Director