cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: Server-side image map in CForms ?
Date Mon, 23 May 2005 20:27:58 GMT
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"/>


Sylvain Wallez                        Anyware Technologies  
Apache Software Foundation Member     Research & Technology Director

View raw message