0

Imagemap and event

asked 2006-08-21 08:15:37 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3876474

By: nobody

Hi,
I have an imagemap in the zul file. In the window tag I use a java class (use="myClass"), in the init method i add an eventlistener to an imagemap component, like Component image = main.getFellow("image"); image.addEventListener("onClick", new ColorListener());

In colorlistener I catched the event when I click on any area on my image. Thats work all fine. But how can I get the area which was clicked in the java listener, something like event.getArea I couldnt find???

Thx for any help !

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2006-08-21 09:19:55 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3876549

By: henrichen

You must set area id and the event.getArea() would return that id.

<area id="xyz" .../>

event.getArea() would return "xyz" if that area is clicked on.

Then you can use getFellow("xyz") to fetch the Area object in your event listener.

/henri

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2006-08-21 08:15:37 +0800

Seen: 395 times

Last updated: Aug 21 '06

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More