cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: Server-side image map in CForms ?
Date Mon, 23 May 2005 21:02:08 GMT
Luca Morandini wrote:

> Sylvain Wallez wrote:
>
>> Luca Morandini wrote:
>>
>>> 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>
>
>
> Sure, but I'd rather avoid using dynamic templates for otherwise 
> static forms...


I see. However, I'm not sure that executing a template composed of 
near-static compiled SAX events is that much slower than a regular XML 
parser.

There's also the solution of a custom cforms styling stylesheet that 
could set this src attribute from a sitemap parameter.

> morever, setting the image source from a action-handler flow script 
> would be more elegant.


That's exactly what the ${image_name} is, e.g.:
  form.showForm("my-form-pipeline", {image_name : "map-" + areaId});

Sylvain

-- 
Sylvain Wallez                        Anyware Technologies
http://apache.org/~sylvain            http://anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


Mime
View raw message