Ok, found out something more.
The image has to be inside of the goLink, so this is correct:
<tr:goLink destination="test.html">
<tr:image source="#{image.url}" imageMapType="server"
inlineStyle="width:600px;" />
</tr:goLink>
But still, I only have a destination URL, and the cords get posted to it (this
works so far)
Now how do I get this cords back inside the JSF lifecycle? Or is there any
possibility to get it directly into an actionListener?
Thanks for help
Von: Döring Markus [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 25. Januar 2008 16:50
An: MyFaces Discussion
Betreff: [Trinidad] How to use ServerSide ImageMaps
Hello,
I'm trying around with tr:image and server side ImageMaps.
<tr:image> documentation says:
If a server-side image map is desired, specify "server" and place inside a
CoreGoLink component. The acceptable values are "server" or "none"; defaults to
"none".
What I have so far is the following (really straight forward)
<tr:image source="#{image.url}" imageMapType="server"
inlineStyle="width:600px;">
<tr:goLink />
</tr:image>
What I was not able to find out is how to trigger an action listener from this
goLink. GoLink only supports stuff like destination and targetFrame, but not
something like action / actionListener.
Also if I try something like
<tr:image source="#{image.url}" imageMapType="server"
inlineStyle="width:600px;">
<tr:goLink>
<f:actionListener type="my.package.ActionListener" />
</tr:goLink>
</tr:image>
This does not work because <tr:goLink> is not an JSF "action source"
(com.sun.facelets.tag.TagException: /sample.xhtml @9,116 <f:actionListener>
Parent is not of type ActionSource, type is: CoreGoLink[UIXFacesBeanImpl,
id=_id46])
So how do I manage to call an actionListener from <tr:goLink> and how to get
the coordinates of the click inside of it?
I'm using:
JBoss 4.2.0
MyFaces 1.1.5
Faclets 1.1.13
Trinidad 1.0.3
Thanks for help
Markus Döring
TCC Products GmbH